Window background behavior different for PreferenceActivity header screen and other PreferenceFragmentsCustom View with Layer-List background drawable renders black screenandroid view pager image is stretchedChange color of the active item in the Fragment Navigation Menu on AndroidEmpty PreferenceActivity though a PreferenceFragment was addedSet back the actionbar in mainactivity/navigation drawer?Add Image To Navigation Drawer Toolbar and Set Custom BackgroundNo ripple on menu item if actionBar/Toolbar is whiteHow to change a PreferenceFragment style/theme?PreferenceFragment getActivity().finish() not working (PreferenceActivity)What is a difference between PreferenceFragment class and PreferenceActivity class and what they do?

Phrase origin: "You ain't got to go home but you got to get out of here."

gzip compress a local folder and extract it to remote server

Performance of loop vs expansion

Should I hide my travel history to the UK when I apply for an Australian visa?

Who pays for increased security measures on flights to the US?

Can the word "coexist" be used for more than two things/people/subjects/... etc?

Can you use a reaction to affect initiative rolls?

What do you call the angle of the direction of an airplane?

Bypass with wrong cvv of debit card and getting OTP

What is the right way to query an I2C device from an interrupt service routine?

Mixing Acrylic Paint With Water ( And Storing It )

Has there ever been a cold war other than between the U.S. and the U.S.S.R.?

What do you call the motor that fuels the movement of a robotic arm?

PhD: When to quit and move on?

Should I warn my boss I might take sick leave

Should I cross-validate metrics that were not optimised?

What is a "tittering order"?

Why are symbols not written in words?

Puzzling Knight has a Message for all- Especially Newcomers

Why did my leaking pool light trip the circuit breaker, but not the GFCI?

How did sloshing prevent the Apollo Service Module from moving safely away from the Command Module and how was this fixed?

How is /a/ pronounced before n/m in French?

What could a Medieval society do with excess animal blood?

Contributing to a candidate as a Foreign National US Resident?



Window background behavior different for PreferenceActivity header screen and other PreferenceFragments


Custom View with Layer-List background drawable renders black screenandroid view pager image is stretchedChange color of the active item in the Fragment Navigation Menu on AndroidEmpty PreferenceActivity though a PreferenceFragment was addedSet back the actionbar in mainactivity/navigation drawer?Add Image To Navigation Drawer Toolbar and Set Custom BackgroundNo ripple on menu item if actionBar/Toolbar is whiteHow to change a PreferenceFragment style/theme?PreferenceFragment getActivity().finish() not working (PreferenceActivity)What is a difference between PreferenceFragment class and PreferenceActivity class and what they do?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















The window background (image) appears different in a PreferenceFragment when compared to the PreferenceActivity's header fragment.



I use a custom style which is derived from another custom style "AppTheme" - which provides a Toolbar to the activity.



 <style name="AppTheme.SettingsTheme" parent="AppTheme">
<item name="android:windowBackground">@drawable/test_tbr</item>
<item name="android:alertDialogTheme">@style/AlertDialogStyle</item>
<item name="android:textColor">@android:color/black</item>
<item name="android:textColorSecondary">@android:color/black</item>
</style>


The background image applied using the style appears different in the PreferenceFragment when compared to the PreferenceActivity's header fragment. (A) In the header fragment fits the image bounded by the toolbar and the navigation bar. Background image bound between toolbar and navigation bar



Where as (B) in the header fragment the image is applied to the window. Background image applied to the whole window



I would like to have the behavior of background image as (B) even for the header fragment since the background image I have suits that way better.



Apart from just using the style, I have tried applying the window background programmatically in the activity using the setBackgroundDrawableResource method on the window, but no improvements.










share|improve this question




























    0















    The window background (image) appears different in a PreferenceFragment when compared to the PreferenceActivity's header fragment.



    I use a custom style which is derived from another custom style "AppTheme" - which provides a Toolbar to the activity.



     <style name="AppTheme.SettingsTheme" parent="AppTheme">
    <item name="android:windowBackground">@drawable/test_tbr</item>
    <item name="android:alertDialogTheme">@style/AlertDialogStyle</item>
    <item name="android:textColor">@android:color/black</item>
    <item name="android:textColorSecondary">@android:color/black</item>
    </style>


    The background image applied using the style appears different in the PreferenceFragment when compared to the PreferenceActivity's header fragment. (A) In the header fragment fits the image bounded by the toolbar and the navigation bar. Background image bound between toolbar and navigation bar



    Where as (B) in the header fragment the image is applied to the window. Background image applied to the whole window



    I would like to have the behavior of background image as (B) even for the header fragment since the background image I have suits that way better.



    Apart from just using the style, I have tried applying the window background programmatically in the activity using the setBackgroundDrawableResource method on the window, but no improvements.










    share|improve this question
























      0












      0








      0


      0






      The window background (image) appears different in a PreferenceFragment when compared to the PreferenceActivity's header fragment.



      I use a custom style which is derived from another custom style "AppTheme" - which provides a Toolbar to the activity.



       <style name="AppTheme.SettingsTheme" parent="AppTheme">
      <item name="android:windowBackground">@drawable/test_tbr</item>
      <item name="android:alertDialogTheme">@style/AlertDialogStyle</item>
      <item name="android:textColor">@android:color/black</item>
      <item name="android:textColorSecondary">@android:color/black</item>
      </style>


      The background image applied using the style appears different in the PreferenceFragment when compared to the PreferenceActivity's header fragment. (A) In the header fragment fits the image bounded by the toolbar and the navigation bar. Background image bound between toolbar and navigation bar



      Where as (B) in the header fragment the image is applied to the window. Background image applied to the whole window



      I would like to have the behavior of background image as (B) even for the header fragment since the background image I have suits that way better.



      Apart from just using the style, I have tried applying the window background programmatically in the activity using the setBackgroundDrawableResource method on the window, but no improvements.










      share|improve this question














      The window background (image) appears different in a PreferenceFragment when compared to the PreferenceActivity's header fragment.



      I use a custom style which is derived from another custom style "AppTheme" - which provides a Toolbar to the activity.



       <style name="AppTheme.SettingsTheme" parent="AppTheme">
      <item name="android:windowBackground">@drawable/test_tbr</item>
      <item name="android:alertDialogTheme">@style/AlertDialogStyle</item>
      <item name="android:textColor">@android:color/black</item>
      <item name="android:textColorSecondary">@android:color/black</item>
      </style>


      The background image applied using the style appears different in the PreferenceFragment when compared to the PreferenceActivity's header fragment. (A) In the header fragment fits the image bounded by the toolbar and the navigation bar. Background image bound between toolbar and navigation bar



      Where as (B) in the header fragment the image is applied to the window. Background image applied to the whole window



      I would like to have the behavior of background image as (B) even for the header fragment since the background image I have suits that way better.



      Apart from just using the style, I have tried applying the window background programmatically in the activity using the setBackgroundDrawableResource method on the window, but no improvements.







      android preferenceactivity preferencefragment






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 25 at 18:08









      BharathBharath

      11 bronze badge




      11 bronze badge






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55344059%2fwindow-background-behavior-different-for-preferenceactivity-header-screen-and-ot%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55344059%2fwindow-background-behavior-different-for-preferenceactivity-header-screen-and-ot%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript