I created an app which shows a few text lines upon startup. It starts to scale this text up until it fills the screen (DisplayHeight) using setTextSize and a CustomLinearLayout overriding onSizeChanged. This is similar to some "Auto-fit TextView" classes which can be found via stackoverflow/and/or/github.
My solution (showing daily bible passages for e-Books/eInk) works well upon startup.
When the app has finished showing/scaling the text it sets a timer by extending a BroadcastReceiver and setting a repeating alarm:
alarmMgr.setRepeating(
AlarmManager.RTC_WAKEUP,
dayStart.getTimeInMillis(),
AlarmManager.INTERVAL_DAY,
alarmIntent
);
Altough it took me some time to get this wakeup functional I got it working. When the app wakes up it updates the texts and sets the text sizes to the initial "minimal" size and should start scaling them up again.
Now the problem is that the "TextView" containing the sized-up texts does not "shrink" its real (measured) height again after changing the TextView value and font size as it should because it is "CONTENT_WRAP". But it did before after the one-step-scale-down (see * above)!
I guess it has something to do with going directly to sleep again after wakeup, so a missing WAKE_LOCK or that the UI thread re-calculating all sizes does not get run again ...
The app works well in the simulator but not on my "real" Sony ebook reader. I will post a photo of the display after the failed font-size update.