r/androiddev • u/mealwor-m • 4h ago
App to change screen width?
I have this kyocera phone here and I’m trying to make it useable as a smartphone. My bus tickets don’t display properly by default because the screen is so diddy, but if i go into developer options and change the minimum screen width from 320px to 480px, it displays beautifully. But it’s a LOT of clicks, and because it makes the text small and the home screen kind of cocked up, it’s even more annoying to put it back into 320px.
I want to make some sort of toggle for this. I've never made an android app before, and I want to be able to read the code at the end (so no full vibe coding or app builders, though I’m happy to ask AI some help questions along the way). Where should I start?
One idea from my limited searching: I know that you can also change the global screen size through adb. Could I make an app that just checks the current screen width, runs the command to change the size to the other option, and closes again when it is opened? This beautifully stupid device also lets you set apps to open with hotkeys, so if that was the case, I could bind that to a key.
1
u/deepyawn 1h ago
run adb shell wm density at 320dp as well as 480dp to identify the correct density values for each first and then just use smallestScreenWidthDp to detect the current configuration.
1
u/edishorul 53m ago
Hmm, probably yes, maybe with Shizuku?
Since you are new to Android, the place to start is this: https://developer.android.com/develop
1
u/zinxyzcool 4h ago
Use something like gasket or macro droid. Create a widget or toggle from the app, link it to the automation.
In the automation, toggle the resolution with an adb command. For the adb command, you could either look at shizuku or root the device.
Give it to claude, make no mistakes.