Revision 584585d0
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/dialogs/RubikDialogEffects.java | ||
---|---|---|
90 | 90 |
textView.setLayoutParams(textParams); |
91 | 91 |
textView.setGravity(Gravity.CENTER); |
92 | 92 |
textView.setPadding(padding,0,padding,0); |
93 |
textView.setTextAppearance(android.R.style.TextAppearance_Small); |
|
93 |
textView.setTextAppearance(act,android.R.style.TextAppearance_Small);
|
|
94 | 94 |
outerLayout.addView(textView); |
95 | 95 |
|
96 | 96 |
///// INNER LAYOUT1 ////////////////////////////////////////////////////////////////// |
... | ... | |
114 | 114 |
text1View.setLayoutParams(text1LayoutParams); |
115 | 115 |
text1View.setGravity(Gravity.START|Gravity.CENTER); |
116 | 116 |
text1View.setPadding(text1Padding,0,text1Padding,0); |
117 |
text1View.setTextAppearance(android.R.style.TextAppearance_Small); |
|
117 |
text1View.setTextAppearance(act,android.R.style.TextAppearance_Small);
|
|
118 | 118 |
innerLayout1.addView(text1View); |
119 | 119 |
////////////////////////////////////////////////////////////////// |
120 | 120 |
int text2Padding = (int)(scale*5 + 0.5f); |
... | ... | |
124 | 124 |
mDurationText[index].setLayoutParams(text2LayoutParams); |
125 | 125 |
mDurationText[index].setGravity(Gravity.END|Gravity.CENTER); |
126 | 126 |
mDurationText[index].setPadding(text2Padding,0,text2Padding,0); |
127 |
mDurationText[index].setTextAppearance(android.R.style.TextAppearance_Small); |
|
127 |
mDurationText[index].setTextAppearance(act,android.R.style.TextAppearance_Small);
|
|
128 | 128 |
innerLayout1.addView(mDurationText[index]); |
129 | 129 |
////////////////////////////////////////////////////////////////// |
130 | 130 |
int seekPadding = (int)(scale*10 + 0.5f); |
... | ... | |
160 | 160 |
text3View.setLayoutParams(text3LayoutParams); |
161 | 161 |
text3View.setGravity(Gravity.START|Gravity.CENTER); |
162 | 162 |
text3View.setPadding(text3Padding,0,text3Padding,0); |
163 |
text3View.setTextAppearance(android.R.style.TextAppearance_Small); |
|
163 |
text3View.setTextAppearance(act,android.R.style.TextAppearance_Small);
|
|
164 | 164 |
innerLayout2.addView(text3View); |
165 | 165 |
////////////////////////////////////////////////////////////////// |
166 | 166 |
int spinnerPadding = (int)(scale*10 + 0.5f); |
... | ... | |
204 | 204 |
{ |
205 | 205 |
super.onStart(); |
206 | 206 |
|
207 |
Window window = getDialog().getWindow(); |
|
208 |
window.setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, |
|
209 |
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL); |
|
210 |
window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); |
|
207 |
Dialog dialog = getDialog(); |
|
208 |
dialog.setCanceledOnTouchOutside(false); |
|
209 |
|
|
210 |
Window window = dialog.getWindow(); |
|
211 |
|
|
212 |
if( window!=null ) |
|
213 |
{ |
|
214 |
window.setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL, |
|
215 |
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL); |
|
216 |
window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); |
|
217 |
} |
|
211 | 218 |
} |
212 | 219 |
|
213 | 220 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
(Hopefully) make the Dialogs NOT disappear on clicks outside (previously this wasn't working on Android 9).
Lower API requirements to 21.