Debugging in Eclipse with real Android phone on Ubuntu 10.10

I can’t get adb to recognising my HTC Desire on my new upgrade of Ubuntu 10.10 Maverick Meerkat. adb devices shows List of devices attached ???????????? no permissions Now, there are plenty of tutorials for changing rule files under /etc/udev/rules.d/. However, I cannot find one specific for 10.10. Can anyone tell me whether the rule […]

After orientation change buttons on a widget are not responding

I have two buttons on a widget that change some items in a widget, if an orientation is changed on a phone, buttons do nothing. I read but this is all about activity not widget. @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget); Intent active = […]

Android: drawable id change after resources modify

I have an android application that use a gallery component to choose an icon and assign it to a button. The icon set is located in res/drawable folder and is accessed in the gallery with the typical adapter of the guide: private Integer[] Imgid = { R.drawable.icon_home, R.drawable.icon_home2, … } After an icon choosing, i […]

Android: How to write multiple selectors in a single xml file

In my application,I have 4 ImageButtons and each ImageButton have different source image based on their states.So maintaining 4 separate xml files for each of the button. Is there any way to write all the selectors in a single xml file ?

Height of ListView fills the whole screen, although set as wrap_content

i have this ListView inside a LinearLayout: <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:orientation=”vertical” > <TextView …/> <EditText /> … </EditText> <ListView android:id=”@+id/words_list” android:layout_width=”match_parent” android:layout_height=”wrap_content” > </ListView> </LinearLayout> The List is populated programmatically by a SimpleCursorAdapter: adapter = new SimpleCursorAdapter(this, R.layout.list_row_search, mCursor, from, to); list_row_search has a TableLayout with two TableRows: <?xml version=”1.0″ encoding=”utf-8″?> […]

build android with clang instead of gcc ? and the clang stl lib instead of gnustl lib?

Am trying to build an android ndk app using clang instead of gcc, for know i have tried this in the NDK_TOOLCHAIN_VERSION := clang LOCAL_CLANG :=true LOCAL_LDLIBS := -lc++_static LOCAL_CFLAGS := -std=c++11 and in the APP_PLATFORM := android-9 APP_STL := libc++_static APP_CPPFLAGS := -fexceptions -frtti APP_ABI := armeabi-v7a but it always give me […]

How do I configure the ADT plugin in the eclipse

On the developer website there are these instructions: Configure the ADT Plugin Once Eclipse restarts, you must specify the location of your Android SDK directory: In the “Welcome to Android Development” window that appears, select Use existing SDKs. Browse and select the location of the Android SDK directory you recently downloaded and unpacked. Click Next. […]

Android, libgdx and box2d basics

I wrote couple of simple board games since i started on android learning, Please let me know is there any tutorial or links, where i can start with physics library with libgdx, looking for something like basics of physics with libgdx

How do I make it only landscape for tablets and only portrait for phones?

how can it so that when a tablet is running the application, it is forced to run it in landscape and when a phone is running the application, it is forced to run it in portrait? I’ve managed to force it to run in lets say portrait, but then it run portrait for tablets too… […]

ThreeTen-Backport error on Android – ZoneRulesException: No time-zone data files registered

I’m using ThreeTen-Backport library for my Android project (because java.time is not yet implemented in android development). When I write LocalDate; or LocalTime; I get the following exception: Caused by: No time-zone data files registered at at at org.threeten.bp.ZoneRegion.ofId( at org.threeten.bp.ZoneId.of( at org.threeten.bp.ZoneId.of( at org.threeten.bp.ZoneId.systemDefault( at org.threeten.bp.Clock.systemDefaultZone( at The […]

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