How get Android SDK location on PC with Eclipse
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\
396LW NO topic_id
AD
Další témata ....(Topics)
Window>Preference>Java>Editor>Typing and check the "Escape text when pasting into a string literal".
Error for example:
webcoreglue(2075): The real object has been deleted
Solution:
If this error message shows if orientation the screen is changed
try insert into AndroidManifest.xml this code:
android:configChanges="keyboard|keyboardHidden|orientation"
webcoreglue(2075): The real object has been deleted
Solution:
If this error message shows if orientation the screen is changed
try insert into AndroidManifest.xml this code:
android:configChanges="keyboard|keyboardHidden|orientation"
<activity
android:label="@string/app_name"
android:name=".MyActivity"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation"
>
Date getDate is deprecated Java Android example code:
long dayInMili = 100000000;
GregorianCalendar calToDay = new GregorianCalendar();
int nD = calToDay.get((Calendar.MILLISECOND)); // +dayInMili;
System.out.println(nD);
long lTime = calToDay.getTimeInMillis();
System.out.println(lTime);
Date dtA = new Date(lTime); // today
///@SuppressWarnings("deprecation")
int nD1 = dtA.getDate(); // DEPRECATED Day Of Month 1 - 31
System.out.println(nD1+" nD1");
GregorianCalendar cal = new GregorianCalendar();
int nD2 = calToDay.get(Calendar.DATE); // Day Of Month
System.out.println(nD2+" nD2");
cal.setTimeInMillis(lTime+dayInMili);// setTime(dtA);
int nD3 = cal.get(Calendar.DATE); // Day Of Month + 1 day
System.out.println(nD3+" nD3");
How include layout defined in other xml file into another xml file example:
res/layout/my_layout.xml into
main.xml
res/layout/my_layout.xml into
main.xml
<include layout="@layout/my_layout" android:id="@+id/idMyLayout" />
Constructor SimpleCursorAdapter is deprecated.
If using api 11 and above, you can try add last parameter 0.
If using api 11 and above, you can try add last parameter 0.
Cursor cursor = managedQuery(...........,,,,);
// Specify the columns we want to display in the result
String[] from = new String[] { KEY_WORD,
KEY_DEFINITION };
// Specify the corresponding layout elements where we want the columns to go
int[] to = new int[] { R.id.word,
R.id.definition };
// deprecated
SimpleCursorAdapter words =
new SimpleCursorAdapter(this,
R.layout.result, cursor, from, to);
// working
SimpleCursorAdapter words =
new SimpleCursorAdapter(this,
R.layout.result, cursor, from, to, 0); // to, 0!!!!
//working in Fragment
SimpleCursorAdapter mAdapter = new SimpleCursorAdapter(getActivity(),
android.R.layout.simple_list_item_2, null,
new String[] { "name", "age" }, // cursor parameters
new int[] { android.R.id.text1, android.R.id.text2 }, 0);
Editace: 2014-02-15 20:48:09
Počet článků v kategorii: 396
Url:how-get-android-sdk-location-on-pc-with-eclipse