You need to use a Theme.AppCompat theme (or descendant) with this activity

AndroidAndroid Layout

Android Problem Overview


Android Studio 0.4.5

Android documentation for creating custom dialog boxes: http://developer.android.com/guide/topics/ui/dialogs.html

If you want a custom dialog, you can instead display an Activity as a dialog instead of using the Dialog APIs. Simply create an activity and set its theme to Theme.Holo.Dialog in the <activity> manifest element:

<activity android:theme="@android:style/Theme.Holo.Dialog" >

However, when I tried this I get the following exception:

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity

I am supporting the following, and I can't using something greater than 10 for the min:

minSdkVersion 10
targetSdkVersion 19

In my styles I have the following:

<!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

And in my manifest I have this for the activity:

 <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:theme="@android:style/Theme.Holo.Light.Dialog"
            android:name="com.ssd.register.Dialog_update"
            android:label="@string/title_activity_dialog_update" >
        </activity>

Creating the dialog box like this was something I was hopping to do, as I have already completed the layout.

Can anyone tell me how I can get around this problem?

Android Solutions


Solution 1 - Android

The reason you are having this problem is because the activity you are trying to apply the dialog theme to is extending ActionBarActivity which requires the AppCompat theme to be applied.

Update: Extending AppCompatActivity would also have this problem

In this case, change the Java inheritance from ActionBarActivity to Activity and leave the dialog theme in the manifest as it is, a non Theme.AppCompat value


The general rule is that if you want your code to support older versions of Android, it should have the AppCompat theme and the java code should extend AppCompatActivity. If you have *an activity that doesn't need this support, such as you only care about the latest versions and features of Android, you can apply any theme to it but the java code must extend plain old Activity.


NOTE: When change from AppCompatActivity (or a subclass, ActionBarActivity), to Activity, must also change the various calls with "support" to the corresponding call without "support". So, instead of getSupportFragmentManager, call getFragmentManager.

Solution 2 - Android

All you need to do is add android:theme="@style/Theme.AppCompat.Light" to your application tag in the AndroidManifest.xml file.

Solution 3 - Android

Copying answer from @MarkKeen in the comments above as I had the same problem.

I had the error stated at the top of the post and happened after I added an alert dialog. I have all the relevant style information in the manifest. My problem was cured by changing a context reference in the alert builder - I changed:

new android.support.v7.app.AlertDialog.Builder(getApplicationContext())

to:

new android.support.v7.app.AlertDialog.Builder(this)

And no more problems.

Solution 4 - Android

If you are using the application context, like this:

final AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());

change it to an activity context like this:

final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);

Solution 5 - Android

min sdk is 10. ActionBar is available from api level 11. So for 10 you would be using AppCompat from the support library for which you need to use Theme.AppCompat or descendant of the same.

Use

android:theme="@style/Theme.AppCompat" >

Or if you dont want action bar at the top

android:theme="@style/Theme.AppCompat.NoActionBar">

More info @

http://developer.android.com/guide/topics/ui/actionbar.html

Edit:

I might have misread op post.

Seems op wants a Dialog with a Activity Theme. So as already suggested by Bobbake4 extend Activity instead of ActionBarActivity.

Also have a look @ Dialog Attributes in the link below

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/frameworks/base/core/res/res/values/themes.xml/

Solution 6 - Android

I was experiencing this problem even though my Theme was an AppCompat Theme and my Activity was an AppCompatActivity (or Activity, as suggested on other's answers). So I cleaned, rebuild and rerun the project.

(Build -> Clean Project ; Build -> Rebuild Project ; Run -> Run)

It may seem dumb, but now it works great!

Just hope it helps!

Solution 7 - Android

This is what fixed it for me: instead of specifying the theme in manifest, I defined it in onCreate for each activity that extends ActionBarActivity:

@Override
protected void onCreate(Bundle savedInstanceState) {
    setTheme(R.style.MyAppTheme);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.my_activity_layout);
...
}

Here MyAppTheme is a descendant of Theme.AppCompat, and is defined in xml. Note that the theme must be set before super.onCreate and setContentView.

Solution 8 - Android

go to your styles and put the parent

parent="Theme.AppCompat"

instead of

parent="@android:style/Theme.Holo.Light"

Solution 9 - Android

Change the theme of the desired Activity. This works for me:

<activity
            android:name="HomeActivity"
            android:screenOrientation="landscape"
            android:theme="@style/Theme.AppCompat.Light"
            android:windowSoftInputMode="stateHidden" />

Solution 10 - Android

In my case i have no values-v21 file in my res directory. Then i created it and added in it following codes:

  <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

Solution 11 - Android

Just Do

new AlertDialog.Builder(this)

Instead of

new AlertDialog.Builder(getApplicationContext())

Solution 12 - Android

I had such crash on Samsung devices even though the activity did use Theme.AppCompat. The root cause was related to weird optimizations on Samsung side:

- if one activity of your app has theme not inherited from Theme.AppCompat
- and it has also `android:launchMode="singleTask"`
- then all the activities that are launched from it will share the same Theme

My solution was just removing android:launchMode="singleTask"

Solution 13 - Android

If you need to extend ActionBarActivity you need on your style.xml:

<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base"/>

<style name="AppTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->

If you set as main theme of your application as android:Theme.Material.Light instead of AppTheme.Base then you’ll get an “IllegalStateException:You need to use a Theme.AppCompat theme (or descendant) with this activity” error.

Solution 14 - Android

I had the same problem, but it solved when i put this on manifest: android:theme="@style/Theme.AppCompat.

    <application
        android:allowBackup="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name_test"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat">

        ...    

    </application>

Solution 15 - Android

for me a solution, after trying all solutions from here, was to change

    <activity
        android:name="com.github.cythara.MainActivity"
        android:label="Main">
    </activity>

to include a theme:

    <activity
        android:name="com.github.cythara.MainActivity"
        android:theme="@style/Theme.AppCompat.NoActionBar"
        android:label="Main">
    </activity>

Solution 16 - Android

In my case such issue was appear when i tried to show Dialog. The problem was in context, I've use getBaseContext() which theoretically should return Activity context, but appears its not, or it return context before any Theme applied.

So I just replaced getBaseContexts() with "this", and now it work as expected.

        Dialog.showAlert(this, title, message,....);

Solution 17 - Android

You have came to this because you want to apply Material Design in your theme style in previous sdk versions to 21. ActionBarActivity requires AppThemeso if you also want to prevent your own customization about your AppTheme, only you have to change in your styles.xml (previous to sdk 21) so this way, can inherit for an App Compat theme.

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">

for this:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

Solution 18 - Android

I had an activity with theme <android:theme="@android:style/Theme.Dialog"> used for showing dialog in my appWidget and i had same problem

i solved this error by changing activity code like below:

@Override
protected void onCreate(Bundle savedInstanceState) {
    setTheme(R.style.Theme_AppCompat_Dialog); //this line i added
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_dialog);
}

Solution 19 - Android

for me was solution to use ContextThemeWrapper:

private FloatingActionButton getFAB() {
Context context = new android.support.v7.view.ContextThemeWrapper(getContext(), R.style.AppTheme);
FloatingActionButton fab = new FloatingActionButton(context);
return fab;}

from https://stackoverflow.com/questions/34555834/android-how-to-create-fab-programmatically

Solution 20 - Android

I had this problem as well and what I did to fix it, AND still use the Holo theme was to take these steps:

first I replaced this import:

import android.support.v7.app.AppCompatActivity;

with this one:

import android.app.Activity;

then changed my extension from:

public class MyClass extends AppCompatActivity {//...

to this:

public class MyClass extends Activity {//...

And also had to change this import:

import android.support.v7.app.AlertDialog;

to this import:

import android.app.AlertDialog;

and then you can use your theme tag in the manifest at the activity level:

android:theme="@android:style/Theme.Holo.Dialog" />

and lastly, (unless you have other classes in your project that has to use v7 appCompat) you can either clean and rebuild your project or delete this entry in the gradle build file at the app level:

compile 'com.android.support:appcompat-v7:23.2.1'

if you have other classes in your project that has to use v7 appCompat then just clean and rebuild the project.

Solution 21 - Android

Make sure you are using an activity context while creating a new Alert Dialog and not an application or base context.

Solution 22 - Android

You have many solutions to that error.

  1. You should use Activity or FragmentActivity instead of ActionbarActivity or AppCompatActivity

  2. If you want use ActionbarActivity or AppCompatActivity, you should change in styles.xml Theme.Holo.xxxx to Theme.AppCompat.Light (if necessary add to DarkActionbar)

If you don't need advanced attributes about action bar or AppCompat you don't need to use Actionbar or AppCompat.

Solution 23 - Android

In Android manifest just change theme of activity to AppTheme as follow code snippet

<activity
  android:name=".MainActivity"
  android:label="@string/app_name"
  android:theme="@style/AppTheme">
</activity>

Solution 24 - Android

I was getting this same problem. Because i was creating custom navigation drawer. But i forget to mention theme in my manifest like this

android:theme="@style/Theme.AppCompat.NoActionBar"

As soon i added the above the theme to my manifest it resolved the problem.

Solution 25 - Android

Change your theme style parent to

 parent="Theme.AppCompat"

This worked for me ...

Solution 26 - Android

This one worked for me:

<application
           android:allowBackup="true"
           android:icon="@mipmap/ic_launcher"
           android:label="@string/app_name"
           android:theme="@style/AppTheme" >
           <activity
               android:name=".MainActivity"
               android:label="@string/app_name"
               android:theme="@style/Theme.AppCompat.NoActionBar">
   
               <intent-filter>
                   <action android:name="android.intent.action.MAIN" />
   
                   <category android:name="android.intent.category.LAUNCHER" />
               </intent-filter>
           </activity>
</application>

Solution 27 - Android

Your Activity is extending ActionBarActivity which requires the AppCompat.theme to be applied. Change from ActionBarActivity to Activity or FragmentActivity, it will solve the problem.

> If you use no Action bar then :

android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" 

Solution 28 - Android

This is when you want a AlertDialog in a Fragment

            AlertDialog.Builder adb = new AlertDialog.Builder(getActivity());
            adb.setTitle("My alert Dialogue \n");
            adb.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {

                  //some code
                
            } });
            adb.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    
                 dialog.dismiss();

                } });
            adb.show();

Solution 29 - Android

In my experiences the problem was the context where I showed my dialog. Inside a button click I instantiate an AlertDialog in this way:

builder = new AlertDialog.Builder(getApplicationContext());

But the context was not correct and caused the error. I've changed it using the application context in this way:

In declare section:

Context mContext;

in the onCreate method

mContext = this;

And finally in the code where I need the AlertDialog:

start_stop = (Button) findViewById(R.id.start_stop);
start_stop.setOnClickListener( new View.OnClickListener()
     {
                @Override
                public void onClick(View v)
                {
                    if (!is_running)
                    {
                        builder = new AlertDialog.Builder(mContext);
                        builder.setMessage("MYTEXT")
                                .setCancelable(false)
                                .setPositiveButton("SI", new DialogInterface.OnClickListener() {
                                    public void onClick(DialogInterface dialog, int id) {
                                    Task_Started = false;
                                    startTask();
                                    }
                                })
                                .setNegativeButton("NO",
                                        new DialogInterface.OnClickListener() {
                                    public void onClick(DialogInterface dialog, int id) {
                                        dialog.cancel();
                                    }
                                });
                        AlertDialog alert = builder.create();
                        alert.show();
                    }
            }
        }

This is the solution for me.

Solution 30 - Android

In case the AndroidX SplashScreen library brought you here ...

This is because Theme.SplashScreen also has no R.styleable.AppCompatTheme_windowActionBar:

if (!a.hasValue(R.styleable.AppCompatTheme_windowActionBar)) {
    a.recycle();
    throw new IllegalStateException(
            "You need to use a Theme.AppCompat theme (or descendant) with this activity.");
}

This requires switching the theme to the postSplashScreenTheme, before calling super():

@Override
protected void onCreate(Bundle savedInstanceState) {

    /* When switching the theme to dark mode. */
    if (savedInstanceState != null) {
        this.setTheme(R.style.AppTheme);
    }
    super.onCreate(savedInstanceState);
    
    /* When starting the Activity. */
    if (savedInstanceState == null) {
        SplashScreen.installSplashScreen(this);
    }
}

Then the Theme.SplashScreen from AndroidManifest.xml won't interfere.

Solution 31 - Android

Quick solution.

Change your base theme parent in styles.xml

Replace from

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

to

<style name="AppTheme" parent="Theme.AppCompat">

Solution 32 - Android

My Activity with SectionsPagerAdapter and ViewPager & Fragment

public class MyActivity extends AppCompatActivity implements ActionBar.TabListener
...
...
     @Override
        public void onPostResume(){
            super.onPostResume();
            try {
               getSupportActionBar().setDisplayShowTitleEnabled(false);
            }catch (NullPointerException ignored){
            }
        }

Solution 33 - Android

This solution worked for me.

Design library depends on the Support v4 and AppCompat Support Libraries, so don't use different version for appcompat and design library in gradle.

use

 compile 'com.android.support:appcompat-v7:23.0.0'
 compile 'com.android.support:design:23.0.0'

instead of

 compile 'com.android.support:appcompat-v7:23.0.0'
 compile 'com.android.support:design:23.1.0'

Solution 34 - Android

For me none of the above answers worked even after I had Theme.AppCompat as my base theme for the application. I was using com.android.support:design:24.1.0 So I just changed the version to 24.1.1. After the gradle sync, Its working again and the exception went away. Seems to me the issue was with some older versions of design support libraries.

Just putting this here in case other answers don't work for some people.

Solution 35 - Android

In my case, i was inflating a view with ApplicationContext. When you use ApplicationContext, theme/style is not applied, so although there was Theme.Appcompat in my style, it was not applied and caused this exception. More details: https://stackoverflow.com/questions/2118251/theme-style-is-not-applied-when-inflater-used-with-applicationcontext

Solution 36 - Android

This really forced me to post my own answer.

Since I am using Theme.AppCompat.Light.NoActionBar, and also replaced all AlertDialog instances with support compatibility imports and still faced problems below v21 (Lollipop).

I didn't like the idea of changing the theme which was proper. So after 2 days, I finally gave some thought about the other libraries that are specifying AppTheme for their AndroidManifest.xml.

I found out that there is yet another one: Paytm Checkout SDK.

Thus, the following changes fixed the problem.

  1. Renaming AppTheme using for my app to 'XYZAppTheme'

  2. using tools:replace method in AndroidManifest of my project(app).

    http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.xyz">

    <uses-permission android:name="android.permission.INTERNET" />
    
    <application
        android:name=".XYZ"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher_v2"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:roundIcon="@mipmap/ic_launcher_v2_round"
        android:supportsRtl="true"
        android:theme="@style/XYZAppTheme"
        tools:replace="android:icon,android:theme">
    
        <activity
            android:name=".xyz.SplashActivity"
            android:launchMode="singleTask"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    

Solution 37 - Android

In your app/build.gradle add this dependency:

implementation "com.google.android.material:material:1.1.0-alpha03"

Update your styles.xml AppTheme's parent:

<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"/>

Solution 38 - Android

When You're Using Kotlin, nothing solved my problem until I change the Builder parameter from 'applicationContext' to 'this'.

This Does Not Work

val dialogDelete = AlertDialog.Builder(applicationContext)
            .setTitle("Confirmation")
            .setMessage("Delete this photo?")
            .setNegativeButton(android.R.string.no){ it, which ->
                it.dismiss()
            }
dialogDelete.show()

Following Code Works

val dialogDelete = AlertDialog.Builder(this)
            .setTitle("Confirmation")
            .setMessage("Delete this photo?")
            .setNegativeButton(android.R.string.no){ it, which ->
                it.dismiss()
            }
dialogDelete.show()

Solution 39 - Android

If you are struggling with the Recyclerview Adapter class then use

view.getRootView().getContext()

instead of

getApplicationContext() or activity.this

Solution 40 - Android

I have faced same problem.

If you are providing context to any class or method then provide YourActivityName.this instead of getApplicationContext().

Do this

builder = new AlertDialog.Builder(YourActivity.this);

Instead of

builder = new AlertDialog.Builder(getApplicationContext());

Solution 41 - Android

NOTE: I had intended this as an answer, but further testing reveals it still fails when built using maven from the command line, so I've had to edit it to be a problem! :-(

In my case when I got this error I was already using a AppCompat Theme and the error didn't make much sense.

I was in the process of mavenizing my android build. I had already dependencies on the apklib and jar versions of app compat, thus:

	<!-- See https://github.com/mosabua/maven-android-sdk-deployer -->
		<dependency>
			<groupId>android.support</groupId>
			<artifactId>compatibility-v7-appcompat</artifactId>
			<version>${compatibility.version}</version>
			<type>apklib</type>
		</dependency>

		<dependency>
			<groupId>android.support</groupId>
			<artifactId>compatibility-v7-appcompat</artifactId>
			<type>jar</type>
		</dependency>

		<dependency>
			<groupId>android.support</groupId>
			<artifactId>compatibility-v7</artifactId>
			<type>jar</type>
		</dependency>

		<dependency>
			<groupId>android.support</groupId>
			<artifactId>compatibility-v4</artifactId>
		</dependency>

Now, when I import the maven project and build and run from IntelliJ it's fine.

But when I build and deploy and run from the command line with maven I still get this exception.

Solution 42 - Android

In Android Studio: Add support library to the gradle file and sync. Edit build.gradle(Module:app) to have dependencies as follows:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    implementation 'com.android.support:appcompat-v7:23.1.1'
    implementation 'com.android.support:design:23.1.1'
    implementation 'com.android.support:support-v4:23.1.1'
}

My support Library version is 23.1.1; use your support library version as applicable.

Solution 43 - Android

For me issue resolved by changing the inheritance from AppCompatActivity to Activity in my customDialog class. No changes required in manifest for Theme.Dialog.

Solution 44 - Android

If using getApplicationContext() as the parameter while inflating the layout, you can try to use getBaseContext() instead. e.g.

    View.inflate(getBaseContext(),
            getLayoutId() == 0 ? R.layout.page_default : getLayoutId(),
            null);
     

Solution 45 - Android

If someone sees this error while running Android 12 Splash screen then follow these simple steps

  1. The app theme in values/themes.xml and values-night/themes.xml should have Theme.AppCompat as the parent theme.

    <style name="Theme.Ace" parent="Theme.AppCompat.DayNight.NoActionBar">
    
  2. Use this theme in postSplashScreenTheme for the splash screen theme

    <style name="Theme.App.Starting" parent="Theme.SplashScreen">
    <item name="windowSplashScreenBackground">@color/orange_900</item>
    <item name="windowSplashScreenAnimatedIcon">@drawable/ic_help_outline</item>
    <item name="windowSplashScreenAnimationDuration">2000</item>
    <item name="postSplashScreenTheme">@style/Theme.Ace</item>
    

  3. Remove any theme from the starting activity and use Theme.App.Starting as an application theme

    <application...
    android:theme="@style/Theme.App.Starting">
    

Solution 46 - Android

I came across this issue when using SplashScreen Api, this error is also thrown when installSplashScreen() is not called in the MainActivity

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        installSplashScreen()
        setContentView(R.layout.activity_main)
}

Solution 47 - Android

Change Theme from highlighted tab in picture.enter image description here

Solution 48 - Android

In my case, I was using a style called "FullScreenTheme", and although it seemed to be correctly defined (it was a descendant of Theme.AppCompat) it was not working.

I finally realized that I was using an AAR library that internally also had defined a style called "FullScreenTheme" and it was not descendant of Theme.AppCompat. The clashing of the names was causing the problem.

Fix it by renaming my own style name so now Android is using the correct style.

Solution 49 - Android

In my case, I had AppTheme in AndroidManifest set correctly to a style that inherited from Theme.AppCompat. However, the individual activities had style settings in AndroidManifest that were overriding that.

Solution 50 - Android

Do not forget to clean the project after VCS Local History restore

Solution 51 - Android

Instead of all of this, about changing a lot of this in your app.. just do it simple as this video does.

https://www.youtube.com/watch?v=Bsm-BlXo2SI

I already use it so... it's a 100 percent effective.

Solution 52 - Android

First of all, add this as import => import androidx.appcompat.app.AlertDialog

I am posting this being the smallest ever solution to the problem. I just changed the instantiation of

new AlertDialog.Builder(mContex)

to

new AlertDialog.Builder(mContext, R.style.PreferenceDialogLight)

Where <style name="PreferenceDialogLight" parent="Base.Theme.MaterialComponents.Dialog.Alert">

Solution 53 - Android

If you are using VCS in your project (GIT, for instance), try to:

  1. Delete your local project files;
  2. Re-import from remote.

Problem solved!

In my case, I deleted a file that contained erros, but somehow Studio was still detecting the file and therefore preventing it from building.

Hope it helps!

Solution 54 - Android

Check if you are passing the right context to your Dialog. This happened to me and then I realized I was initiating AlertDialog.Builder with applicationContext instead of Activity context.

Solution 55 - Android

For me, the Android SDK didn't seem to be able to find the styles definition. Everything was wired correctly and doing a simple project clean fixed it for me.

Solution 56 - Android

just make that

> getApplicationContext().getTheme().applyStyle(R.style.Theme_Mc, > true);

and In your values/styles.xml add this

 <style  name="Theme.Mc" parent="Theme.AppCompat.Light.NoActionBar">
         <!-- ADD Your Styles  -->
         
 
     </style>

Solution 57 - Android

I was stuck several hours at this problem. The problem was that I implemented my own .jar dependency that didn't uses the Theme.AppCompat style in it's themes.xml and AndroidManifest.xml. Even after I changed and rebuild my dependency it didn't work. After a bit of research I found out that I should use an .aar (Android Archive) library as described here. After changing my dependency module to an Android Library I could build and implement it without errors. Hope this helps.

Solution 58 - Android

For my Xamarin Android project (in MainActivity.cs), I changed…

public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity

to

public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity

…and the error went away. I realise that isn't a solution for everyone but it might give a clue to the underlying problem.

Solution 59 - Android

In case anybody still wondering about this issue.

try this :

new android.support.v7.app.AlertDialog.Builder(this)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionant2009View Question on Stackoverflow
Solution 1 - AndroidBobbake4View Answer on Stackoverflow
Solution 2 - AndroidiustingView Answer on Stackoverflow
Solution 3 - AndroidA.K.View Answer on Stackoverflow
Solution 4 - AndroidDarushView Answer on Stackoverflow
Solution 5 - AndroidRaghunandanView Answer on Stackoverflow
Solution 6 - AndroidGeraldo NetoView Answer on Stackoverflow
Solution 7 - Androidk29View Answer on Stackoverflow
Solution 8 - AndroidYamen NassifView Answer on Stackoverflow
Solution 9 - Androidsharma_kunalView Answer on Stackoverflow
Solution 10 - AndroidaligurView Answer on Stackoverflow
Solution 11 - AndroidAli AkramView Answer on Stackoverflow
Solution 12 - AndroidgoRGonView Answer on Stackoverflow
Solution 13 - AndroidJonasOliveiraView Answer on Stackoverflow
Solution 14 - AndroidMarc BaduqView Answer on Stackoverflow
Solution 15 - AndroidPPPView Answer on Stackoverflow
Solution 16 - AndroidVitaliy AView Answer on Stackoverflow
Solution 17 - AndroiddanigonlineaView Answer on Stackoverflow
Solution 18 - AndroidElyas NateghView Answer on Stackoverflow
Solution 19 - AndroidPeterView Answer on Stackoverflow
Solution 20 - AndroidWraithiousView Answer on Stackoverflow
Solution 21 - AndroidShivam DawarView Answer on Stackoverflow
Solution 22 - AndroidKalogluView Answer on Stackoverflow
Solution 23 - AndroidshikhaView Answer on Stackoverflow
Solution 24 - AndroidAzhar oswsView Answer on Stackoverflow
Solution 25 - AndroidFazalView Answer on Stackoverflow
Solution 26 - Androiduser1501382View Answer on Stackoverflow
Solution 27 - AndroidMd Imran ChoudhuryView Answer on Stackoverflow
Solution 28 - AndroidAvinash_ksView Answer on Stackoverflow
Solution 29 - AndroidDanteView Answer on Stackoverflow
Solution 30 - AndroidMartin ZeitlerView Answer on Stackoverflow
Solution 31 - AndroidKalogluView Answer on Stackoverflow
Solution 32 - AndroidvaleraView Answer on Stackoverflow
Solution 33 - Androidkiran boghraView Answer on Stackoverflow
Solution 34 - AndroidSharp EdgeView Answer on Stackoverflow
Solution 35 - AndroidMuratView Answer on Stackoverflow
Solution 36 - AndroidAmit TumkurView Answer on Stackoverflow
Solution 37 - AndroidMark PazonView Answer on Stackoverflow
Solution 38 - AndroidIrfandi D. VendyView Answer on Stackoverflow
Solution 39 - AndroidH A TanimView Answer on Stackoverflow
Solution 40 - AndroidNur AlamView Answer on Stackoverflow
Solution 41 - AndroidAndrew MackenzieView Answer on Stackoverflow
Solution 42 - AndroidCodeBulls Inc.View Answer on Stackoverflow
Solution 43 - AndroidvivekView Answer on Stackoverflow
Solution 44 - Androiduser1744585View Answer on Stackoverflow
Solution 45 - AndroidmihirjoshiView Answer on Stackoverflow
Solution 46 - AndroidAjay MouryaView Answer on Stackoverflow
Solution 47 - AndroidSaleem KalroView Answer on Stackoverflow
Solution 48 - AndroidtomaccoView Answer on Stackoverflow
Solution 49 - AndroidarlomediaView Answer on Stackoverflow
Solution 50 - AndroidUmer Waqas CEO FluttydevView Answer on Stackoverflow
Solution 51 - AndroidBryan J. DiazView Answer on Stackoverflow
Solution 52 - AndroidSaadurRehmanView Answer on Stackoverflow
Solution 53 - AndroidGeraldo NetoView Answer on Stackoverflow
Solution 54 - AndroidCoreggonView Answer on Stackoverflow
Solution 55 - AndroidJoe PlanteView Answer on Stackoverflow
Solution 56 - AndroidMourad MAMASSIView Answer on Stackoverflow
Solution 57 - AndroidChief BoggelView Answer on Stackoverflow
Solution 58 - AndroidAndrew JensView Answer on Stackoverflow
Solution 59 - AndroidMansoor CoolView Answer on Stackoverflow