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());
}
396LW NO topic_id
AD
Další témata ....(Topics)
How get Android SDK location - PATH on PC from Eclipse tutorial.
- Open dialog from menu Window -> AVD and SDK manager
- In dialog select Available packages
- On top of dialog will displayed similar path: SKD Location: C:\PROGRA~1\Android\android-sdk-windows\
I tried this Eclipse and work fine:
Eclipse Classic
//www.filehippo.com/download_eclipse_classic_32/
Eclipse Juno
Eclipse Helios
//developer.android.com/tools/sdk/eclipse-adt.html
Eclipse Classic
//www.filehippo.com/download_eclipse_classic_32/
Eclipse Juno
Eclipse Helios
//developer.android.com/tools/sdk/eclipse-adt.html
main.xml
<LinearLayout xmlns:android="//schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="top"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:gravity="top"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imageViewObrazekGeometrie"
android:layout_width="360dp"
android:layout_height="777dp"
android:src="@drawable/geometrie_vzorecky" />
</LinearLayout>
</HorizontalScrollView>
</ScrollView>
</LinearLayout>
/data/data/<package>/shared_prefs/<package>_preferences.xml
String TAG = "MyActivityName";
File f = new File("/data/data/"+this.getPackageName()
+"/shared_prefs/"+this.getPackageName()+"_preferences.xml");
if(f.exists())
Log.d(TAG, "exist");
else
Log.d(TAG, "not exist");
xml RelativeLayout Android example:
Eclipse graphical xml layout editor
[caption id="attachment_896" align="alignleft" width="261" caption="Relativelayout Eclipse graphical editor"][/caption]
res/layout/main.xml
Eclipse graphical xml layout editor
[caption id="attachment_896" align="alignleft" width="261" caption="Relativelayout Eclipse graphical editor"][/caption]
res/layout/main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="//schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/idLabel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Enter word"/>
<EditText
android:id="@+id/idEntry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background"
android:layout_below="@id/idLabel"/>
<Button
android:id="@+id/idOk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/idEntry"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dip"
android:text="OK" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/idOk"
android:layout_alignTop="@id/idOk"
android:text="Cancel" />
</RelativeLayout>
Editace: 2013-12-09 10:59:38
Počet článků v kategorii: 396
Url:iterate-hashmap-getkey-getvalue-java-example