Hide keyboard Android example
Use this code for example in some method or function
// public Object getSystemService (String name)
// Return the handle to a system-level service by name.
// The class of the returned object varies by the requested name.
InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
//public boolean hideSoftInputFromWindow (IBinder windowToken, int flags)
//EditText myEdit = (EditText)findViewById(R.id.idEditText);
inputMethodManager .hideSoftInputFromWindow(myEdit.getWindowToken(), 0);
396LW NO topic_id
AD
Další témata ....(Topics)
Samsung S6102 Galaxy Y Duos umožňuje pracovat se dvěma aktivními SIM kartami a má GPS navigaci. Cena cca 4.500 korun / léto 2012.
Displej
Rozlišení displeje 320 x 240
Velikost displeje 3.14 "
Počet barev 262000
Rozměry 104 mm x 60 mm x 11.5 mm
Fotoaparát 3 Mpix, natačení videosekvencí
Operační system Android 2.3 (Gingerbread)
Procesor 832 MHz
Funkce Dual sim, Změny velikosti písma, Java, Internetový prohlížeč Přehrávání MP3, jack 3,5, Psaní SMS a e-mailů Multimediální zprávy MMS, Dlouhé SMS, Emailový prohlížeč, Kontakty a volání Hlasité handsfree, MP3/WMA/AAC vyzvánění, Skupiny volajících, Baterie
Typ baterie Li-Ion 1300 mAh
Doba hovoru 370 min
Pohotovostní doba 440 hodin
Uživatelská paměť 160 MB
Datové funkce GPS modul, WiFi, Bluetooth, GPRS, EDGE, Hardwarový modem
Aplikace Diktafon, Kalendář, FM rádio, Záznamník hovoru, Hry v telefonu, Kalkulačka, Budík
Mobilní telefony Samsung mají velmi dobrý poměr KVALITA / CENA
Displej
Rozlišení displeje 320 x 240
Velikost displeje 3.14 "
Počet barev 262000
Rozměry 104 mm x 60 mm x 11.5 mm
Fotoaparát 3 Mpix, natačení videosekvencí
Operační system Android 2.3 (Gingerbread)
Procesor 832 MHz
Funkce Dual sim, Změny velikosti písma, Java, Internetový prohlížeč Přehrávání MP3, jack 3,5, Psaní SMS a e-mailů Multimediální zprávy MMS, Dlouhé SMS, Emailový prohlížeč, Kontakty a volání Hlasité handsfree, MP3/WMA/AAC vyzvánění, Skupiny volajících, Baterie
Typ baterie Li-Ion 1300 mAh
Doba hovoru 370 min
Pohotovostní doba 440 hodin
Uživatelská paměť 160 MB
Datové funkce GPS modul, WiFi, Bluetooth, GPRS, EDGE, Hardwarový modem
Aplikace Diktafon, Kalendář, FM rádio, Záznamník hovoru, Hry v telefonu, Kalkulačka, Budík
Mobilní telefony Samsung mají velmi dobrý poměr KVALITA / CENA
Screen Android example source code for developers.
Get orientation of screen.
Get orientation of screen.
public int getScreenOrientation() {
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
return 1; // Portrait Mode
}else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
return 2; // Landscape mode
}
return 0;
}
C:\documents\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.ui.prefs
entry put iterate Map HashMap Java Android
Map<String, Integer> map = new HashMap<String, Integer>();
map.put("key27", 27);
for (Map.Entry<String, Integer> entry : map.entrySet())
{
String str = entry.getKey();
int n = entry.getValue();
}
Wiktionary - SDK samples Android
about.xml
protected void showAbout() {
// Inflate the about message contents
View messageView = getLayoutInflater().inflate(R.layout.about, null, false);
// When linking text, force to always use default color. This works
// around a pressed color state bug.
TextView textView = (TextView) messageView.findViewById(R.id.about_credits);
int defaultColor = textView.getTextColors().getDefaultColor();
textView.setTextColor(defaultColor);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setIcon(R.drawable.app_icon);
builder.setTitle(R.string.app_name);
builder.setView(messageView);
builder.create();
builder.show();
}
about.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
//www.apache.org/licenses/LICENSE-2.0
-->
<LinearLayout xmlns:android="//schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="20dip">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/app_descrip"
android:textColor="?android:attr/textColorPrimaryInverse" />
<TextView
android:id="@+id/about_credits"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="20dip"
android:textSize="16sp"
android:text="@string/app_credits"
android:autoLink="web"
android:textColor="?android:attr/textColorPrimaryInverse" />
</LinearLayout>
Editace: 2011-09-26 20:48:17
Počet článků v kategorii: 396
Url:hide-keyboard-android-example