Skip to main content

Posts

Restrict Edittext input content using Input Filters in ANDROID

InputFilter filter = new InputFilter() { public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { // TODO Auto-generated method stub for (int i = start; i Here the filters will check whether the input content has only characters from 'a' to 'z'. same way use the condition below to have characters from'a' to 'z' and '0' to '9' and avoid special characters. Character.isLetterOrDigit(source.charAt(i))

Simple AutoComplete TextView in ANDROID

public class Autocomplete extends Activity { String name[]={ "John", "Angel", "Mark", "Angelina", "Jhony", "Juli", "Augustine", "Robert", "Reena", "Ancilina", "Mary", "Juliet" }; AutoCompleteTextView autotextview; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_autocomplete); autotextview=(AutoCompleteTextView) findViewById(R.id.myautocomplete); autotextview.setAdapter(new ArrayAdapter<string>(this, android.R.layout.simple_dropdown_item_1line, name)); }

View Flipper with Animationin ANDROID

Suppose you have to show an item for few minutes and then flips to next one we can use viewflipper . ViewFlipper inherits from frame layout, so it displays a single view at a time. in java class: ViewFlipper vflip; vflip=(ViewFlipper) findViewById(R.id.viewFlipper1); //when a view is displayed vflip.setInAnimation(this,android.R.anim.fade_in); //when a view disappears vflip.setOutAnimation(this, android.R.anim.fade_out); vflip.setFlipInterval(500); vflip.startFlipping();//starts flippin // vflip.stopFlipping();//stops flipping in xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <ViewFlipper android:id="@+id/viewFlipper1" android:layout_width="wrap_content" android:l...

Latest Chrome Beta for Android reduces data usage by half

The last time we reported about Chrome Beta for Android we were excited to show how Google’s popular browser can be modified to render pages in full-screen mode. This time, users with heavy mobile data usage are in for a treat: Chrome 26 Beta adds a new experimental feature that makes use of Google’s proxy servers to optimize web content, thereby saving bandwidth. The reduction in data usage is made possible by Google’s utilization of its own proxy servers, which phones running Chrome mobile establish a connection with and transmit HTTP requests. The proxy servers then pass on the request to the target resource, performs content optimization, and finally sends back a lighter load to the phones. read more: http://www.androidauthority.com/latest-chrome-beta-android-reduces-data-usage-half-165262/

BlackBerry plans security feature for Android, iPhone

BlackBerry will offer technology to separate and make secure both work and personal data on mobile devices powered by Google Inc's Android platform and by Apple Inc's iOS operating system, the company said on Thursday. The new feature could help BlackBerry sell high-margin services to enterprise clients even if many, or all, of their workers are using smartphones made by BlackBerry's competitors. That may be crucial for the company as it has lost a vast amount of market share to the iPhone and to Android devices, such as Samsung Electronics Co's Galaxy line. Jefferies analyst Peter Misek said he expects BlackBerry's device management software to gain traction this year, and boost revenue next year. read more: http://www.financialexpress.com/news/blackberry-plans-security-feature-for-android-iphone/1088255

Open wifi settings in android

final Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_LAUNCHER); final ComponentName cn = new ComponentName("com.android.settings","com.android.settings.wifi.WifiSettings"); intent.setComponent(cn); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity( intent);