Revision 068f7c2f
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/dialogs/RubikDialogBandagedSettings.java | ||
---|---|---|
84 | 84 |
ArrayAdapter<String> scrambleAdapter = new ArrayAdapter<>(act, R.layout.spinner_item, scrambleModes ); |
85 | 85 |
scrambleAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
86 | 86 |
scramble.setAdapter(scrambleAdapter); |
87 |
scramble.setSelection(mScraPos); |
|
87 |
scramble.setSelection(mScraPos,true); |
|
88 |
View v1 = scramble.getSelectedView(); |
|
89 |
((TextView)v1).setTextSize(TypedValue.COMPLEX_UNIT_PX,mTextSize); |
|
88 | 90 |
|
89 | 91 |
Spinner animation = view.findViewById(R.id.bandaged_spinner_animation); |
90 | 92 |
animation.setOnItemSelectedListener(this); |
... | ... | |
93 | 95 |
ArrayAdapter<String> animationAdapter = new ArrayAdapter<>(act, R.layout.spinner_item, animationModes ); |
94 | 96 |
animationAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
95 | 97 |
animation.setAdapter(animationAdapter); |
96 |
animation.setSelection(mAnimPos); |
|
98 |
animation.setSelection(mAnimPos,true); |
|
99 |
View v2 = animation.getSelectedView(); |
|
100 |
((TextView)v2).setTextSize(TypedValue.COMPLEX_UNIT_PX,mTextSize); |
|
97 | 101 |
} |
98 | 102 |
|
99 | 103 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/dialogs/RubikDialogFreePlaySettings.java | ||
---|---|---|
84 | 84 |
ArrayAdapter<String> scrambleAdapter = new ArrayAdapter<>(act, R.layout.spinner_item, scrambleModes ); |
85 | 85 |
scrambleAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
86 | 86 |
scramble.setAdapter(scrambleAdapter); |
87 |
scramble.setSelection(mScraPos); |
|
87 |
scramble.setSelection(mScraPos,true); |
|
88 |
View v1 = scramble.getSelectedView(); |
|
89 |
((TextView)v1).setTextSize(TypedValue.COMPLEX_UNIT_PX,mTextSize); |
|
88 | 90 |
|
89 | 91 |
Spinner animation = view.findViewById(R.id.bandaged_spinner_animation); |
90 | 92 |
animation.setOnItemSelectedListener(this); |
... | ... | |
93 | 95 |
ArrayAdapter<String> animationAdapter = new ArrayAdapter<>(act, R.layout.spinner_item, animationModes ); |
94 | 96 |
animationAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
95 | 97 |
animation.setAdapter(animationAdapter); |
96 |
animation.setSelection(mAnimPos); |
|
98 |
animation.setSelection(mAnimPos,true); |
|
99 |
View v2 = animation.getSelectedView(); |
|
100 |
((TextView)v2).setTextSize(TypedValue.COMPLEX_UNIT_PX,mTextSize); |
|
97 | 101 |
} |
98 | 102 |
|
99 | 103 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Improve setting the size of text on spinners.