Android calculator layout & Click-Event
Android calculator layout: <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:orientation=”vertical” > <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” > <EditText android:id=”@+id/editText1″ android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_weight=”1″ android:ems=”10″ android:inputType=”numberDecimal” /> <Button android:id=”@+id/bc” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_weight=”1″ android:text=”C” /> </LinearLayout> <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_gravity=”center_horizontal” > <Button android:id=”@+id/b1″ android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_weight=”1″ android:text=”1″
Types of apps
Free apps Once you find an app you want to install, follow the prompts and the app will be downloaded. Note: you cannot download to your computer then move an app to your device — all downloads go directly to
images
Using the “geo” command in the emulator console To send mock location data from the command line: Launch your application in the Android emulator and open a terminal/console in your SDK’s /tools directory. Connect to the emulator console: telnet localhost
unnamed
In android xml file you can change font like bellow Some built in fonts names: Roboto regular Roboto italic Roboto bold Roboto bold italic Roboto-Light Roboto-Light italic Roboto-Thin Roboto-Thin italic Roboto-Condensed Roboto-Condensed italic Roboto-Condensed bold Roboto-Condensed bold italic Roboto-Medium Roboto-Medium
unnamed
new AlertDialog.Builder(this) .setTitle(“Title in alert dialog”) .setMessage(“Message”) .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // continue with positive input } }) .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // continue with negative