Revision 6bc01aa4
Added by Leszek Koltunski almost 4 years ago
| src/main/java/org/distorted/dialogs/RubikDialogTutorialView.java | ||
|---|---|---|
| 83 | 83 |
|
| 84 | 84 |
int numTutorials = list.getNumTutorials(); |
| 85 | 85 |
|
| 86 |
int colorB = getResources().getColor(R.color.light_grey); |
|
| 87 |
int colorT = getResources().getColor(R.color.white); |
|
| 88 |
|
|
| 86 | 89 |
for(int i=0; i<numTutorials; i++) |
| 87 | 90 |
{
|
| 88 | 91 |
String coun = list.getTutorialLanguage(i); |
| ... | ... | |
| 92 | 95 |
|
| 93 | 96 |
int countryID = res.getIdentifier( coun, "drawable", packageName); |
| 94 | 97 |
|
| 95 |
View row = createRow(ract,countryID,desc,url,auth,widthT,objType); |
|
| 98 |
View row = createRow(ract,countryID,desc,url,auth,widthT,objType,colorB,colorT);
|
|
| 96 | 99 |
layout.addView(row); |
| 97 | 100 |
} |
| 98 | 101 |
|
| ... | ... | |
| 109 | 112 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 110 | 113 |
|
| 111 | 114 |
private View createRow(final RubikActivity act, int countryID, final String desc, final String url, |
| 112 |
final String auth, int width, final ObjectType obj) |
|
| 115 |
final String auth, int width, final ObjectType obj, int colorB, int colorT)
|
|
| 113 | 116 |
{
|
| 114 | 117 |
View row = inflate( act, R.layout.dialog_tutorial_row, null); |
| 115 | 118 |
Button butt = row.findViewById(R.id.tutorialButton); |
| 116 | 119 |
|
| 117 | 120 |
butt.setText(R.string.view); |
| 121 |
butt.setTextColor(colorT); |
|
| 122 |
butt.setBackgroundColor(colorB); |
|
| 118 | 123 |
butt.setTextSize(TypedValue.COMPLEX_UNIT_PX, 0.5f*width); |
| 119 | 124 |
butt.setHeight(width); |
| 120 | 125 |
|
| src/main/res/values/styles.xml | ||
|---|---|---|
| 20 | 20 |
<item name="android:windowActionBar">false</item> |
| 21 | 21 |
<item name="android:windowFullscreen">true</item> |
| 22 | 22 |
<item name="android:windowContentOverlay">@null</item> |
| 23 |
</style> |
|
| 23 |
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item> |
|
| 24 |
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item> |
|
| 25 |
</style> |
|
| 26 |
|
|
| 27 |
<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> |
|
| 28 |
<item name="android:textColor">#ffffff</item> |
|
| 29 |
</style> |
|
| 30 |
|
|
| 31 |
<style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> |
|
| 32 |
<item name="android:textColor">#ffffff</item> |
|
| 33 |
</style> |
|
| 24 | 34 |
|
| 25 | 35 |
</resources> |
Also available in: Unified diff
Correct the style.