Handling the missing MENU button in new versions of Android (3.x and up)

Let me share another scenario where Menu Button becomes critical even though it is not a game. I have app implement its own tool bars which behave to some extent like ActionBar. Well I did that coz my app was released with 1.5 sdk. At that time there is no such concept. And to accomodate … Read more

Does the Android ICS API have a native equivalent to ViewPager support lib?

Does the Android ICS API have a native equivalent to ViewPager support lib? No. I know about ViewPager and all the support libs for earlier version but i don’t get why I should use a support library consider the fact that I use the lastest version of the api and don’t plan to support earlier … Read more

Exception when I run my application from Eclipse

Try adding one more thing in Manifest file, I am sure you have already tried.. <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”[my package]” android:versionCode=”1″ android:versionName=”1.0″ android:sharedUserId=”com.mj.app” > It seems like in your project you have multiple PACKAGES, like com.package.p1 , com.package.p2 ,com.package.p3.. And while starting you are in p1 and then moves on to p2 – p3… and at … Read more

How can I force the Action Bar to be at the bottom in ICS?

I’ve tried adding the line in the application manifest, as described in the docs, but haven’t got it working thus far. It worked for me in this sample project. Here is the manifest: <?xml version=”1.0″ encoding=”utf-8″?> <manifest package=”com.commonsware.android.actionbarbc” xmlns:android=”http://schemas.android.com/apk/res/android”> <application android:hardwareAccelerated=”true” android:icon=”@drawable/cw” android:label=”@string/app_name”> <activity android:label=”@string/app_name” android:name=”.InflationDemo” android:uiOptions=”splitActionBarWhenNarrow”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.LAUNCHER” /> </intent-filter> … Read more

Android Ice Cream Sandwich Edittext: Disabling Spell Check and Word Wrap

Disabling Spell-Checking In order to get rid of spell checking you must specify the EditText’s InputType in the XML as the following: android:inputType=”textNoSuggestions” However, my EditText needed also to be multiline, so I have added the following line to the EditText’s XML: android:inputType=”textMultiLine|textNoSuggestions” Disabling Word-Wrap As noted, the XML attribute android:scrollHorizontally=”true” does not work. However, … Read more

Issue: Passing large data to second Activity

You are probably getting TransactionTooLargeException As suggested by google android guide, you could use static fields or singletons to share data between activities. They recommend it “For sharing complex non-persistent user-defined objects for short duration” From your code it seems that’s exactly what you need. So your code in ActivitySearch.class could look something like this: … Read more

WebView “flashing” with white background if hardware acceleration is enabled (Android 3.0+)

I found the most effective fix for this, first mentioned here, was to set a transparent background color after the layout has been inflated: webView.setBackgroundColor(Color.argb(1, 0, 0, 0)); Yes, it’s a total hack, but it’s the only solution I’ve found to work well without disabling hardware acceleration. Note that this does not work through setting … Read more

How to disable/hide three-dot indicator(Option menu indicator) on ICS handsets

Override onPrepareOptionsMenu() in the fragment of the preference with this: @Override public boolean onPrepareOptionsMenu(Menu menu) { MenuItem item= menu.findItem(R.id.menu_settings); item.setVisible(false); super.onPrepareOptionsMenu(menu); return true; } if you have more then one item set all the items visibility flag to false and add the command setHasOptionsMenu(true); to the onCreate command after you will set all the visibility … Read more

Custom Translucent Android ActionBar

If you want your activity to be fullscreen but still show an actionbar, but with an alpha you have to request overlaymode for the actionbar in onCreate() of your activity: getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY); //getWindow().requestFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY); << Use this for API 7+ (v7 support library) Then after you call setContentView(..) (since setContentView(..) also initializes the actionbar next to setting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)