StackView and OnItemSelectedListener

Posted by & filed under Android, Java, Tipps & Tricks.

Ever wanted to use a StackView and have a X out of Y counter to show the number of the currently selected View. Nope. Not possible. I don’t know what the folks at google thought but neither the StackView, nor the AdapterViewAnimator call the OnItemSelectedListener as soon as the user selects another View from the… Read more »

Switch Button for Android 2.3 Gingerbread

Posted by & filed under Android, Java, Tipps & Tricks.

Important notice: I have a newer version available right here I was coding for my new app and wanted it to be available for a large user base, so Android API Level 10 (Gingerbread) had to be the minimum SDK version. I also wanted to have a Switch button introduced in API Level 14 with… Read more »

AutoScale TextView

Posted by & filed under Android, Java, Tipps & Tricks.

I was in need of a TextView that has a fixed with but dynamic content, so I needed the content to automatically scale. The AutoScaleTextView takes the android:textSize value and uses it as the preferred text size. You can also set the minimum text size. The default for the minimum text size is 10dp. The… Read more »