title: How to add "show text" in Android(x) password preference dialog
body: <p>There doesn't appear to be a specific password text dialog in the Androidx (or Android) library.</p>
  
  <p>I want to add a button so that the user can switch between text view and password text view (asterisks instead of letters) for this preference even though, as someone might want to tell me, it's not a fabulous idea to store passwords as preferences. Eventually I'll have a more robust approach but in the meantime this is what I've got.</p>
  
  <p>I'm using the code that Android Studio (generously) offers me for "Preference Activity". In all other respects it seems pretty good, and better than I can manage myself yet. It's just got this (annoying lack of) feature.</p>
  
  <p><a href="https://stackoverflow.com/questions/29651523/how-to-override-oncreatedialogview-and-add-custom-view-inside-dialogpreference?answertab=active#tab-top">This question</a> is a little too old to reference Androidx, and according to the (main) relevant answer to my context, I can't use AndroidX here. However, using the code from the Settings Activity I don't explicitly mention DialogPreference at all.</p>
  
  <p>So, is there a way to slot in a "reveal" button in this situation, or should I either not use the "textPassword" input type, or completely rebuild this activity?</p>