SQLite Drop and Recreate Table

How do I drop and recreate a table with updated information? For example; I have a table in my application with 5 records. ID Entry 1 a 2 b 3 c 4 d 5 e Now when I delete a record lets say, ID 3 the table becomes ID Entry 1 a 2 b 4 […]

Grid view item not hightlight when press

My app has a grid view, By default, Its item does not highlight when I click on it (I don’t know why? ). I try to add it a list selector as below, But it does not work too, <GridView android:id=”@android:id/list” android:layout_width=”fill_parent” android:layout_height=”match_parent” android:layout_above=”@+id/load_more_process_id” android:layout_alignParentTop=”true” android:drawSelectorOnTop=”false” android:listSelector=”@drawable/grid_selector” > </GridView> Here my selector: <selector xmlns:android=”http://schemas.android.com/apk/res/android” > […]

Is there a way to display a custom exception in an alert under Android?

I’m a newbie Android developer. I would like to know if there exists a way to listen for a custom exception in Android and display its text using an alert. Thank you.

Chrome custom tabs and intent-filter

The application has Activity to show the content of the specific website e.g. “example.com”. So to show the content of “example.com/product/123” inside the app I have intent filter: <activity android:name=”.LinkInterceptorActivity”> <intent-filter android:priority=”999″> <action android:name=”android.intent.action.VIEW” /> <category android:name=”android.intent.category.DEFAULT” /> <category android:name=”android.intent.category.BROWSABLE” /> <data android:host=”www.example.com” android:scheme=”http” /> </intent-filter> </activity> But in some cases I have to show […]

Custom View with Layer-List background drawable renders black screen

I’m trying to build a custom android view and apply a background drawable that is a layer-list. The layer-list has two items: A background color (white) A simple shape drawable that is a stroked rectangle with rounded-corners here’s the drawable xml: <?xml version=”1.0″ encoding=”utf-8″?> <layer-list xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:drawable=”@android:color/white”/> <item> <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle”> <corners android:radius=”1dp” /> […]

Passing parameters from a java activity to Adobe AIR app

How can we pass parameters from a Java Activity while launching another application of type AIR? The way we do for java activities is using Intent’s extra. What are the parameter passing mechanism when it’s java Activity and AIR app on Android. Currently we are passing parameters by sharing a common place (sqlite db) and […]

An issue with Android Studio running on Linux

I have recently installed Android Studio on Manjaro Linux, but I am experiencing issues every time I have to run the application from the scratch. Namely, in order to start application, I have to be logged in as root, then I have to validate JAVA_HOME environmental variable and finally start the application with ./studio.sh Here […]

Draw a circle on an existing image

I’m trying to draw a circle on an image which placed as res/drawable/schoolboard.png. the image fills the activity background. the following does not work: Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.schoolboard); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setColor(Color.BLUE); Canvas canvas = new Canvas(bitmap); canvas.drawCircle(60, 50, 25, paint); ImageView imageView = (ImageView)findViewById(R.drawable.schoolboard); imageView.setAdjustViewBounds(true); imageView.setImageBitmap(bitmap); any help will be […]

Eclipse: multiple project from single source

at first i have to say that i’m not very good with english, so i’m sorry if i can explain very well what i mean 🙂 I have one project that i need to replicate n times; every new project must have the same source code, but different resources (ex: images, html files, sounds, pdf, […]

OpenGL for Android and iPhone

In discussion with some colleagues we were wondering whether OpenGL work developed for Android or iPhone are effectively interchangeable given that both support the spec. Or is the reality of sharing OpenGL between the two platforms more a case of quirks, tweaks and not as easy as one might have hoped.

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