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 […]
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” > […]
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.
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 […]
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” /> […]
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 […]
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 […]
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 […]
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, […]
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.