How to set multiple parent activities for using android back button

I have an application that calls an activity several times from different activitys. So, im trying to implement the “back button” in the action bar for this activity. For doing this im using: switch (item.getItemId()) { case NavUtils.navigateUpFromSameTask(this); return true; default: return super.onOptionsItemSelected(item); } and: <meta-data android:name=”” android:value=”view.TweetsIndividuoActivity” /> The problem now, is that […]

Keyboard layout hiding android action bar?

In my Android application running in a XOOM device, when I click in an Edittext the keyboard opens and hides the Actionbar. I don’t want this to happen, how can I solve this? This is done by the Google Contacts app for the tablet for example. EDIT: I have several edittexts in which the user […]

android drag view smooth

I have to drag some views on screen. I am modifying their position by changing left and top of their layout parameters from motion event on ACTION_MOVE from touch listener. Is there a way to “drag” items more smooth? Because tis kind of “dragging” is no smooth at all… Here is the code public boolean […]

ScrollView not scrolling at all

I can’t make a ScrollView properly scrolling. It always cut off the content on the bottom, as if it were a normal LinearLayout. My code <ScrollView xmlns:android=”” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fillViewport=”true” > <LinearLayout android:id=”@+id/scroll_layout” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:isScrollContainer=”true” android:orientation=”vertical” > Of course, I already tried to add / remove the “fillViewport” and “isScrollContainer” properties, and it did […]

How to support all the different resolutions of android products

All the different resolutions of the different Android products are driving me nuts. My first android app that I wrote was designed so it supported the three commonly used resolutions: 240×320 (LDPI), 320×480 (MDPI) and 480×800 (HDPI). The 480×854 didn’t do any harm to the layout because it has the same width as 480×800. I’ve […]

android nGPS: get location based on magnetic field instead of gps or cell triangulation

Does anybody know how to convert results from the magnetic-field sensor from an android device to coordinates using the World Magnetic Model? Is there a webservice that does that?

Logging in with the Facebook Android SDK and Proguard

I have created a Android application with the Facebook Android SDK 3.0. I created a working application (when running from Eclipse). It will create a Facebook session (with com.facebook.UiLifecycleHelper) and a login button (with com.facebook.LoginButton) so that the user can login into Facebook. The Facebook authentication dialog is showing and after filling in the credentials […]

connect to device with Bluetooth address on String

I am doing an Android App and where I have the MAC of another device as a string (17 characters long) and need to use that one in order to connect to that device (thread that initiates a Bluetooth connection). I’ve been playing around with it all afternoon and can’t figure out how to do […]

android twitter retrieveRequestToken 401 on request token

I am trying the following sample app for twitter oauth. private void askOAuth() { try { consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET); provider = new DefaultOAuthProvider(“”, “”, “”); String authUrl = provider.retrieveRequestToken(consumer, CALLBACK_URL); Toast.makeText(this, “Please authorize this app!”, Toast.LENGTH_LONG).show(); this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl))); } catch (Exception e) { Log.e(APP, e.getMessage()); Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show(); } } When […]

Change thickness of the bottom line of EditText when wrapped into TextInputLayout

here is my code XML Markup < android:layout_width=”match_parent” android:layout_height=”wrap_content” android:theme=”@style/TextLabel”> <EditText android:id=”@+id/etContactName” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:hint=”Contact Name”/> </> Style <style name=”TextLabel” parent=”TextAppearance.AppCompat”> <item name=”android:textColorHint”>@color/hintColor</item> <item name=”colorAccent”>@color/primaryColor</item> <item name=”colorControlNormal”>@color/hintColor</item> <item name=”colorControlActivated”>@color/primaryColor</item> </style> Here is the output (normal view) (focused view) Now My Problems / Issues I want the bottom line to be thinner. where should I change […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.