Site is under maintenance mode. Please wait few min!

Checkout the Android “Only the original thread that created a view hierarchy can touch its views.”

You have to move the portion of the background task that updates the UI onto the main thread. There is a simple piece of code for this:

runOnUiThread(new Runnable() {

    public void run() {

        // Stuff that updates the UI


Create a transparent Activity on Android? | Create a transparent Activity in Android

Add the following style in your res/values/styles.xml file (if you don’t have one, create it.) Here’s a complete file:


(The value @color/transparent is the color value #00000000 which I put in the res/values/color.xml file. You can also use @android:color/transparent in later Android versions.)

Then apply the style to your activity, for example:

Categories: Android


Leave a Reply

Your email address will not be published. Required fields are marked *

Social Media Auto Publish Powered By :