This is how you can make an app with a screen using tabs and swipe.
Let’s put together the last two snippets and build some kind of a nice custom toggle.
The easiest way to make a button with text color changing on press.
This is how to make a button with background changed on press without drawables
Use this to test if there is enough space on your device.
Do you want to copy some string to clipboard? Use this.
Do you want to access the accelerometer (or some other sensor) in your device and use its data in your application? Here is a way of doing that. Let’s see the basic form of an application that monitors changes to the accelerometer sensor
Do you want your application to run only in Portrait mode, or maybe in Landscape only? Or maybe you want to force a change of orientation during execution despite of the real orientation of the device? Or maybe you want the orientation not to change when the mini-keyboard is opened? Here’s what you can do
Do you want to open from your code some mp3 or image file with the default media player/image viewing application? Use this
Did you want to display a Dialog to the user asking him “Do you really want to quit?” when he presses the back button thus ending your current Activity? Here’s how to do it