Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9039389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:43:07+00:00 2026-06-16T09:43:07+00:00

I want to apply a style like the Graphical Layout shows as Theme.DeviceDefault.Dialog.Alert .

  • 0

I want to apply a style like the Graphical Layout shows as Theme.DeviceDefault.Dialog.Alert. I know that it’s a private style now, and I can’t take it as parent.

What can I do to have that style to my DialogFragment?

(I’m targeting API 15, and maybe I want to minSdk API 12).

This reports me an error (the parent, like I read, it’s private now):

<style name="MyDialogStyle" parent="@android:style/Theme.DeviceDefault.Dialog.Alert">

No resource found that matches the given name.

I just read that I must “copy” the items of style, but I don’t find where is it?

Could anyone help me, please? I need to “clone” that style to my custom style.

Thanks in advance.

Things I have tried:

Hardcoded background for DialogFragment

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(0));

    return super.onCreateView(inflater, container, savedInstanceState);
}

My Custom Style

<style name="MyDialogStyle">    
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:background">@android:color/transparent</item>
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

I have visited these links:

http://developer.android.com/reference/android/app/AlertDialog.html
http://developer.android.com/guide/topics/ui/themes.html

http://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=18659

No resource found that matches the given name '@android:style/AlertDialog' error after the latest android 3.2 sdk update

http://daniel-codes.blogspot.com/2011/08/new-to-android-more-style-restrictions.html

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/styles.xml

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/themes.xml

https://android.googlesource.com/platform/frameworks/base/+/d11e6151fe88314505fa7adca6278de2e772b11c/core/res/res/values/themes_device_defaults.xml

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:43:08+00:00Added an answer on June 16, 2026 at 9:43 am

    Finally I solved this problem with a Dialog instead a DialogFragment because this last one doesn’t support transparency layout. It was easy set the transparent background making a new activity and set the style in Manifest. Otherwise I had to change the structure of dialogs using activities instead fragments.

    I hope this saves someone many hours of research.

    Bye!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom style that I would like to apply to my views.
I want to apply a class to the table, that allows me to style
Hi i want to apply style on every 2nd <li> i have tried <script>
I want to apply the following Style to my Polygon : <Style xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:s=clr-namespace:System;assembly=mscorlib
I want to apply a different hyper link style to the following two things:
I have a style rule I want to apply to a tag when it
i want to apply masking over the textinput that need to get SSN from
I want to apply a Storyboard to my Rectangle Fill like this: <Rectangle Name=MyRectangle
I have an inline style I want to apply to a partial view based
Is there a way to apply a style to elements that contain multiple classes?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.