Goal: get the time difference between two dates The following code gives the difference between two times in this form: 1h 12m The seconds and the days not used. Just good to know how can calculate these values.
Archive for the 'android' Category
date difference calculation
12:22 |
android |
670 views
date manipulation
12:18 |
android |
608 views
Goal: sometimes we need to modify a date… Like in this simple case. Let’s add 5 minutes to the actual time. Easy with the java.util.Calendar class. Nota bene: this class can use years, hours, minutes… as well
Goal: sometimes we need to modify a date… Like in this simple case. Let’s add 5 minutes to the actual time. Easy with the java.util.Calendar class. Nota bene: this class can use years, hours, minutes… as well
scrollable TextView in android
11:09 |
android |
627 views
Goal: making a TextView scrollable put two lines to the layout file: plus to the activity:
Goal: making a TextView scrollable put two lines to the layout file: plus to the activity:
add horizontal line to the activity
11:00 |
android |
576 views
Goal: create an easy visual separator element Use only one line to create a line… where the dialogFragment_horizontal_line style is like this: nota bene: the color coming from style as well
Goal: create an easy visual separator element Use only one line to create a line… where the dialogFragment_horizontal_line style is like this: nota bene: the color coming from style as well
freeze portrait orientation
10:51 |
android |
588 views
Goal: avoid the screen rotation If you want to ignore the rotation of the device you can freeze the orientation like this. Put the following line into the manifest file (AndroidManifest.xml) under the activity section:
Goal: avoid the screen rotation If you want to ignore the rotation of the device you can freeze the orientation like this. Put the following line into the manifest file (AndroidManifest.xml) under the activity section: