Android SDK - Android create OptionMenu, ContextMenu
Create OptionMenu-(Override onCreateOptionsMenu())-- public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.layout.menuex, menu); ...
View ArticleAndroid SDK - Android: Close soft keyboard when ENTER button pressed
textInput = (EditText)findViewById(R.id.textInput); textInput.setInputType( InputType.TYPE_TEXT_VARIATION_URI ); // optional - sets the keyboard to URL mode // kill keyboard when enter is ...
View ArticleAndroid SDK - android animation slidedown slideup
public void setLayoutAnim_slidedown(ViewGroup panel, Context ctx) { AnimationSet set = new AnimationSet(true); Animation animation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, ...
View ArticleAndroid SDK - Integrate Adobe Photoshop Mobile inside your Android application
// code inside an Activity method Uri imageToEditUri = … // uri of image to edit String imageToEditMimeType = … // must be of type “image/*†Intent launchEditor = new Intent ...
View ArticleAndroid SDK - Android check if service running
private Boolean isServiceRunning(String serviceName) { ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); for (RunningServiceInfo runningServiceInfo ...
View ArticleAndroid SDK - Sending Email on Android by SMTP (Gmail) Example Class
package org.apache.android.mail; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import ...
View ArticleAndroid SDK - Internet Connection in Android
private void callToWebSrvice() { ConnectivityManager connManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); if (connManager.getNetworkInfo( ...
View ArticleAndroid SDK - Android: Get current orientation of the activity
Activity.getResources().getConfiguration().orientation ...
View ArticleAndroid SDK - Sending Email On Android By SMTP (Gmail)
package org.apache.android.mail; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.mail.Message; import javax.mail.PasswordAuthentication; import ...
View ArticleAndroid SDK - Android Spinner(get selected Item)
In xml---- //Bind values to spinner through an array String[] items = new String[] {"Karnataka", "Orissa", "Andhrapradesh"}; Spinner spinner; spinner = (Spinner)this.findViewById(R.id.spnState ...
View ArticleAndroid SDK - Android: Search and replace in a string with a quoted regex..
indexString.replaceAll(Pattern.quote(notARegex), replacement ...
View ArticleAndroid SDK - Android: Open an Activity when a custom protocol is clicked in...
// This is the definition of the activity in the AndroidManifest.xml file // Here's how to get the data out inside the activity itself. Put in the onCreate function ...
View ArticleAndroid SDK - Android: Read a text file from resources
static public String readStringFromResource(Context ctx, int resourceID) { StringBuilder contents = new StringBuilder(); String sep = System.getProperty("line.separator"); try ...
View ArticleAndroid SDK - Transparenz in einer App - Android
siehe http://www.androidpit.de/de/android/wiki/view/Transparenz_in_einer_App ...
View ArticleAndroid SDK - Android Activities, Intents
Button button=(Button)findViewById(R.id.buttonID); //Override onClick method of button click-- button.setOnClickListener(new View.OnClickListener() { public void onClick(View ...
View ArticleAndroid SDK - Another Android Market Launch Snippet
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:com.example.package ...
View ArticleAndroid SDK - Use Twidroid's public intent to send Twitter messages from your...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final Button button = (Button) findViewById(R.id.sendtweet); button. ...
View ArticleAndroid SDK - Android WebView login on Android ((plz help)
i have built app that display asp pages using WebView but some of the page want the authentication (Username ,Password ) to login I want my application to auto login to this page using Username and ...
View ArticleAndroid SDK - Android: Google Maps Marker
/********************************** * Fired every time a user touches the map * MotionEvent.getAction() lets you determine * whether a user has lifted their finger ...
View ArticleAndroid SDK - Android Alert Dialog
AlertDialog.show(class.this, "Alert Title", "Alert Message", "Button", false ...
View Article