-
Recent Posts
Popular Posts List
-
Linkify text li...
0
96
-
Scroll to certa...
0
79
-
Foreach loop cy...
0
75
-
Get Resource ID...
0
68
-
How quickly res...
0
67
-
Get Assets fold...
0
54
-
Transparent Bac...
0
51
-
Timer simple Ti...
0
49
-
Android Studio ...
0
46
-
Convert Drawabl...
0
45
-
Convert Activit...
0
45
-
Compressing a b...
0
43
-
Open url with b...
0
43
-
Create Button a...
0
42
-
Timer task Time...
0
42
-
How set focus o...
0
42
-
Progressbar cha...
0
40
-
If, else if, el...
0
40
-
How update View...
0
38
-
PHP how to incl...
0
37
-
Linkify text li...
Views
- Timer simple TimerTask Java Android example - 136,316 views
- Linkify text link url in TextView text Android example - 94,913 views
- Spinner ComboBox DropDown List Android example code - 85,143 views
- How quickly restart adb.exe ADB server Android emulator example - 82,397 views
- Compressing a bitmap to JPG format Android example - 72,928 views
- Turn screen ON OFF Android sample code - 71,914 views
- Get Assets folder path and read txt file to string Android example code - 71,425 views
- Timer task TimerTask run cancel Android example - 65,060 views
- Start Activity from ListView item click Android example - 63,113 views
- How update View TextView with timer Android runnable example - 61,390 views
- If, else if, else statement Java Android example - 49,257 views
- Draw Arc Android basic example - 45,587 views
- Class File Editor – Source not found – Change Attached Source – Eclipse - 45,181 views
- Draw circle Android basic example - 44,579 views
- Scroll to certain position on application Android example code - 44,396 views
- Get Resource ID by Resources String Name Android example - 40,487 views
- Crop cropped cut bitmap image pictures Android example - 38,910 views
- Foreach loop cycle in Java Android example - 38,771 views
- AsyncTask Example Android with ProgressBar - 38,551 views
- Create bitmap and draw text into bitmap Android example - 37,517 views
Categories
- Android Examples Code (314)
- Android Software Download (4)
- Android Studio (43)
- Array,List,Collections (22)
- Bitmap, drawing (44)
- Bugs, warnings, errors (108)
- Dictionaries (22)
- Download (2)
- Eclipse (78)
- Fragments Tutorial (8)
- Javascript css html (12)
- PHP (3)
- Smartphone (31)
- Smartphones (3)
- SQLite database (7)
- Uncategorized (4)
Archives
Meta
Tag Archives: java
4,397 views
Java pass variable as reference
Integer, Float, String, List passed as reference in JAVA example source code: // List passed as reference JAVA List<Integer>list = new ArrayList<Integer>(); public void fc (List<Integer>listRef){ listRef.add(7); listRef.add(5); } fc(list); // 7, 5 // String passed as … Continue reading
Posted in Android Examples Code
Tagged example, java
Comments Off on Java pass variable as reference
Round number float – double to int – long Java example
int nf = Math.round(5.789f); System.out.print(nf); // 6 float f = 28.611f; int n3 = Math.round(f); System.out.println(n3); // 29 double d = 1234.56; long lon = Math.round(d); System.out.println(lon); // 1235 int diff = 90 – 40; // float … Continue reading
Posted in Android Examples Code
Tagged java, number
Comments Off on Round number float – double to int – long Java example
Iterate HashMap getKey getValue Java Example
HashMap<String,Locale> _mapOfLocale = new HashMap<String,Locale>(); _mapOfLocale.put("French",Locale. FRENCH ); _mapOfLocale.put("German",Locale. GERMAN ); _mapOfLocale.put("Italian",Locale. ITALIAN ); for (Entry<String, Locale> entry : _mapOfLocale.entrySet()) { System.out.println(entry.getKey()); System.out.println(entry.getValue()); }
Posted in Android Examples Code, Array,List,Collections
Tagged example, hashmap, java
Comments Off on Iterate HashMap getKey getValue Java Example
Array copy to Array Java Android example
String[] source = {"Hello","world","by","Android"}; String[] destination = new String[source.length]; System.arraycopy(source, 0, destination, 0, source.length);
Posted in Android Examples Code
Tagged array, example, java, string
Comments Off on Array copy to Array Java Android example
Map TreeMap get values to array Java Android example
import java.util.Map; import java.util.TreeMap; public class MainClass { public static void main(String[] arg) { // english;germany dictionary String[] arrayOfString = { "one;eine", "two;zwei", "two sets of;zwei" , "three;drei", "four;vier" }; Map<String, String> map = new TreeMap<String, String>(); … Continue reading
Posted in Android Examples Code, Array,List,Collections
Tagged array, example, java, map, treemap, value
Comments Off on Map TreeMap get values to array Java Android example
Map TreeMap get key by value Java Android example
Get key by value from Map Java Android example MainClass.java import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; public class MainClass { public static void main(String[] arg) { // english;germany dictionary String[] arrayOfString = … Continue reading
Posted in Android Examples Code, Array,List,Collections
Tagged example, hashset, java, map, set, treemap
Comments Off on Map TreeMap get key by value Java Android example
Hashtable key value pair add put get pair Java Android example
How add pair of strings to Hashtable, how get pair key value from Hashtable, how split string, basic Java Android example. MainClass.java import java.util.Enumeration; import java.util.Hashtable; public class MainClass { public static void main(String[] arg) { // english;germany dictionary … Continue reading
Posted in Android Examples Code, Array,List,Collections
Tagged example, hashtable, java, key, pair, value
Comments Off on Hashtable key value pair add put get pair Java Android example
Switch Statement Java basic example
Switch statement with numbers and array of strings Java example. public class MainClass { public static void main(String[] arg) { String[] arrayOfString = { "One", "Two", "Three", "Four" }; int i = 2; switch (i) { case 1: { … Continue reading
Posted in Android Examples Code
Tagged example, java, switch
Comments Off on Switch Statement Java basic example
Goto labeled statement in Java example
Goto in for cycle Java example source code. MainClass.java public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" , "bye-bye", "hello", "world!", "end" }; OuterLoop: for (int i = 0;i<6; i++) { … Continue reading
break statement in Java Android example
break statement in Java Android basic example MainClass.java public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" , "bye-bye", "hello", "world!", "end" }; for (int i = 0; i < arrayOfString.length; i++) … Continue reading
Posted in Android Examples Code
Tagged break, example, java, statement
Comments Off on break statement in Java Android example