I am creating my own custom view. Here is the code for MyCustomView.java And my main_layout.xml file: My question is: If I change the attributes of the custom view in the .xml file, will the 2nd or 3rd constructor of MyCustomView.java file be called? Answer As described by @Zain answer the two-argument constructor is called when the layout is inflated
Tag: android-theme
Change PreferenceFragmentCompat dialog background color in Android
I recently started working with PreferenceFragmentCompat and MaterialComponents and noticed that in Dark mode, Dialogs generated by preferences like ListPreference always have that weird grey android background no matter how many background attributes I change in the style. (source: pocketnow.com) This I’ve tried: I’ve also tried with android:background and worked but it brokes everything. So I investigated a bit in-depth