Goal: avoid the system update issue – android 9 I have enrolled to try the new android system before the final release. Everything was fine until a disturbing issue. I tried to refresh the system and the following happened. How we can avoid this? if you can see on the top right corner I used […]
Archive for the 'android' Category
Google Pixel Android P – Couldn’t download
11:17 |
android, pixel, tricky |
757 views
Set the ProgressBar foreColor
12:52 |
android |
767 views
Goal: find an easy way to set the default magenta color of progressbar to an other one just put into the xml file:
Goal: find an easy way to set the default magenta color of progressbar to an other one just put into the xml file:
change the status bar color
0:07 |
android |
792 views
Goal: fit the full screen coloring to our application Sometimes we need to change the status bar color to create a harmony on the whole screen. Put this into the main activity: Simple… and no more blue top on the screen…
Goal: fit the full screen coloring to our application Sometimes we need to change the status bar color to create a harmony on the whole screen. Put this into the main activity: Simple… and no more blue top on the screen…
using Context in a static environment (simple way)
11:54 |
android |
767 views
Goal: find a simple way to reach a usable context in a static method I have found many complicated ways to get a usable context, but I have an easy and simple way. 1. we need a static class, with a global context variable 2. set this variable in the main activity 3. and of […]
Goal: find a simple way to reach a usable context in a static method I have found many complicated ways to get a usable context, but I have an easy and simple way. 1. we need a static class, with a global context variable 2. set this variable in the main activity 3. and of […]
get the cpu version
11:45 |
android |
692 views
Goal: find out the heart of a device It is easy to find the version of the central unit in my device. Seemingly… 1. the android way Use the Build class like this: 2. get info from the company (as I see they can give what they want…) Read the /proc/cpuinfo file. So in a […]
Goal: find out the heart of a device It is easy to find the version of the central unit in my device. Seemingly… 1. the android way Use the Build class like this: 2. get info from the company (as I see they can give what they want…) Read the /proc/cpuinfo file. So in a […]
get the current battery level
18:01 |
android |
737 views
Goal: check the device battery level In a static function like this: The result is between 0-100 (0 is not very common 🙂 )
Goal: check the device battery level In a static function like this: The result is between 0-100 (0 is not very common 🙂 )
using Context in a static environment
16:33 |
android |
771 views
Goal: get Context in a static method Sometimes we need a context in a static method, but we don’t have… Let’s dig one. example: get the device ID (IMEI) in a static function.
Goal: get Context in a static method Sometimes we need a context in a static method, but we don’t have… Let’s dig one. example: get the device ID (IMEI) in a static function.
get the device id (IMEI)
1:51 |
android |
807 views
Goal: get the unique device identifier This is the IMEI/MEID number. We need permission to read this information.
Goal: get the unique device identifier This is the IMEI/MEID number. We need permission to read this information.
set the font style and size in a SearchView
16:06 |
android |
844 views
Goal: let’s customize a SearchView appearance First of all the SearchView is a complex control. We need to find the child TextView to do this changes. Set the following style: here is the code: The findChildrenByClass function like this: public static Collection findChildrenByClass(ViewGroup viewGroup, Class clazz) { return gatherChildrenByClass(viewGroup, clazz, new ArrayList()); } private static […]
Goal: let’s customize a SearchView appearance First of all the SearchView is a complex control. We need to find the child TextView to do this changes. Set the following style: here is the code: The findChildrenByClass function like this: public static Collection findChildrenByClass(ViewGroup viewGroup, Class clazz) { return gatherChildrenByClass(viewGroup, clazz, new ArrayList()); } private static […]
generate random numbers
12:25 |
android |
743 views
Goal: we need this 🙂 We need to know about this. How we can generate a random number between minimum and a maximum value.
Goal: we need this 🙂 We need to know about this. How we can generate a random number between minimum and a maximum value.