Tag Archives: list

3,412 views

ArrayList Sublist Join Compare Loop Synchronize HashMap Sort Tree

Link to tutorial ArrayList Sublist of ArrayList Join two ArrayList Compare ArrayList Initialize ArrayList Loop ArrayList Sort ArrayList Array to ArrayList ArrayList to Array Synchronize ArrayList Serialize ArrayList LinkedList Loop LinkedList Vector ArrayList vs Vector ArrayList vs LinkedList HashMap Loop … Continue reading

Posted in Android Examples Code | Tagged , , , , | Comments Off on ArrayList Sublist Join Compare Loop Synchronize HashMap Sort Tree
1,254 views

Start Activity from list – launches other activities from list

Activities launcher public class MainActivity extends ListActivity { private class Sample { private CharSequence title; private Class<? extends Activity> activityClass;   public Sample(int titleResId, Class<? extends Activity> activityClass) { this.activityClass = activityClass; this.title = getResources().getString(titleResId); }   @Override public String … Continue reading

Posted in Android Examples Code, Android Studio | Tagged | Comments Off on Start Activity from list – launches other activities from list
4,059 views

Save Restore Array List Android Example

int[] mArrayOfInt; String[] mArrayOfString; List<String> mList; public void saveState(Bundle map) { map.putIntArray("mArrayOfInt", mArrayOfInt); map.putStringArray("mArrayOfString", mArrayOfString); map.putStringArrayList("mList", mList); }   public void restoreState(Bundle map) { mArrayOfInt= map.getIntArray("mArrayOfInt"); mArrayOfString = map.getStringArray("mArrayOfString"); mList = map.getStringArrayList("mList");   }

Posted in Android Examples Code, Array,List,Collections | Tagged , , | Comments Off on Save Restore Array List Android Example
6,164 views

Shuffle List ArrayList Collections Java example

Add and shuffle elements in LinkedList or ArrayList Java basic example. import java.util.Collections; import java.util.LinkedList; import java.util.List;   public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" , "bye-bye", "hello", "world!", "End" }; … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , | Comments Off on Shuffle List ArrayList Collections Java example
5,746 views

List LinkedList add sort find Item in Java example

List LinkedList Collections add sort find search Item, get searched item to string in Java example. MainClass.java import java.util.Collections; import java.util.LinkedList; import java.util.List;   public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" … Continue reading

Posted in Android Examples Code, Array,List,Collections | Tagged , , , , , , | Comments Off on List LinkedList add sort find Item in Java example