Revision 8c4e4bf4
Added by Leszek Koltunski 8 months ago
src/main/java/org/distorted/bandaged/BandagedRenderer.java | ||
---|---|---|
51 | 51 |
|
52 | 52 |
public class BandagedRenderer implements GLSurfaceView.Renderer, DistortedLibrary.LibraryUser |
53 | 53 |
{ |
54 |
public static final float BRIGHTNESS = 0.333f; |
|
55 | 54 |
private static final int RESET_DURATION = 1000; |
56 | 55 |
private static final float MAX_SIZE_CHANGE = 1.70f; |
57 | 56 |
private static final float MIN_SIZE_CHANGE = 0.50f; |
... | ... | |
97 | 96 |
mSaveIcon = -1; |
98 | 97 |
|
99 | 98 |
mScreen = new DistortedScreen(); |
100 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
99 |
|
|
100 |
BandagedActivity act = (BandagedActivity)v.getContext(); |
|
101 |
act.setUpBackgroundColor(mScreen); |
|
102 |
|
|
101 | 103 |
mScale = new Static3D(1,1,1); |
102 | 104 |
mObject= LocallyBandagedList.create(ordinal,mScreen); |
103 | 105 |
|
... | ... | |
366 | 368 |
if( mFramebuffer==null ) |
367 | 369 |
{ |
368 | 370 |
mFramebuffer = new DistortedFramebuffer(FBO_WIDTH,FBO_HEIGHT,1, InternalOutputSurface.DEPTH_NO_STENCIL); |
369 |
mFramebuffer.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
371 |
BandagedActivity bact = (BandagedActivity)act; |
|
372 |
bact.setUpBackgroundColor(mFramebuffer); |
|
370 | 373 |
} |
371 | 374 |
|
372 | 375 |
mFramebuffer.setProjection( mObject.computeProjectionAngle() ,0.1f); |
src/main/java/org/distorted/config/ConfigRenderer.java | ||
---|---|---|
51 | 51 |
|
52 | 52 |
ConfigRenderer(ConfigSurfaceView v) |
53 | 53 |
{ |
54 |
final float BRIGHTNESS = 0.333f; |
|
55 |
|
|
56 | 54 |
mResettingObject = false; |
57 | 55 |
mEffectApplied = false; |
58 | 56 |
mAngle = new Static1D(0); |
... | ... | |
62 | 60 |
|
63 | 61 |
mResources = v.getResources(); |
64 | 62 |
mScreen = new DistortedScreen(); |
65 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
63 |
|
|
64 |
ConfigActivity act = (ConfigActivity)v.getContext(); |
|
65 |
act.setUpBackgroundColor(mScreen); |
|
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/dialogs/RubikDialogTutorial.java | ||
---|---|---|
108 | 108 |
|
109 | 109 |
LinearLayout layout = view.findViewById(R.id.tutLayout); |
110 | 110 |
|
111 |
int colorB = getResources().getColor(R.color.lightGrey); |
|
112 |
int colorT = getResources().getColor(R.color.white); |
|
111 |
TutorialActivity mact = (TutorialActivity)act; |
|
112 |
int backgroundC = mact.getVeryDarkColor(); |
|
113 |
|
|
114 |
int colorB = res.getColor(backgroundC); |
|
115 |
int colorT = res.getColor(R.color.white); |
|
113 | 116 |
|
114 | 117 |
int numTuts = tutorials.length; |
115 | 118 |
|
src/main/java/org/distorted/helpers/BaseActivity.java | ||
---|---|---|
22 | 22 |
import androidx.appcompat.app.AppCompatActivity; |
23 | 23 |
import androidx.preference.PreferenceManager; |
24 | 24 |
|
25 |
import org.distorted.library.main.DistortedFramebuffer; |
|
25 | 26 |
import org.distorted.main.R; |
26 | 27 |
|
27 | 28 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
44 | 45 |
protected int mScreenWidth, mScreenHeight; |
45 | 46 |
protected int mHeightLowerBar, mHeightUpperBar; |
46 | 47 |
protected float mDensity; |
47 |
protected int mDarkC, mNormalC, mMediumC, mLightC;
|
|
48 |
protected int mVeryDarkC, mDarkC, mNormalC, mMediumC, mLightC, mPassedC;
|
|
48 | 49 |
protected SharedPreferences mPreferences; |
49 | 50 |
|
50 | 51 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
60 | 61 |
switch(mCurrentTheme) |
61 | 62 |
{ |
62 | 63 |
case THEME_WHITE : setTheme(R.style.WhiteTheme); |
63 |
mDarkC = R.color.darkWhite; |
|
64 |
mNormalC = R.color.normalWhite; |
|
65 |
mMediumC = R.color.mediumWhite; |
|
66 |
mLightC = R.color.lightWhite; |
|
64 |
mVeryDarkC= R.color.veryDarkWhite; |
|
65 |
mDarkC = R.color.darkWhite; |
|
66 |
mNormalC = R.color.normalWhite; |
|
67 |
mMediumC = R.color.mediumWhite; |
|
68 |
mLightC = R.color.lightWhite; |
|
69 |
mPassedC = R.color.passedWhite; |
|
67 | 70 |
break; |
68 | 71 |
case THEME_GREEN : setTheme(R.style.GreenTheme); |
69 |
mDarkC = R.color.darkGreen; |
|
70 |
mNormalC = R.color.normalGreen; |
|
71 |
mMediumC = R.color.mediumGreen; |
|
72 |
mLightC = R.color.lightGreen; |
|
72 |
mVeryDarkC= R.color.veryDarkGreen; |
|
73 |
mDarkC = R.color.darkGreen; |
|
74 |
mNormalC = R.color.normalGreen; |
|
75 |
mMediumC = R.color.mediumGreen; |
|
76 |
mLightC = R.color.lightGreen; |
|
77 |
mPassedC = R.color.passedGreen; |
|
73 | 78 |
break; |
74 | 79 |
default : setTheme(R.style.GreyTheme); |
75 |
mDarkC = R.color.darkGrey; |
|
76 |
mNormalC = R.color.normalGrey; |
|
77 |
mMediumC = R.color.mediumGrey; |
|
78 |
mLightC = R.color.lightGrey; |
|
80 |
mVeryDarkC= R.color.veryDarkGrey; |
|
81 |
mDarkC = R.color.darkGrey; |
|
82 |
mNormalC = R.color.normalGrey; |
|
83 |
mMediumC = R.color.mediumGrey; |
|
84 |
mLightC = R.color.lightGrey; |
|
85 |
mPassedC = R.color.passedGrey; |
|
79 | 86 |
break; |
80 | 87 |
} |
81 | 88 |
|
82 | 89 |
super.onCreate(savedState); |
83 | 90 |
} |
84 | 91 |
|
92 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
93 |
|
|
94 |
public int getVeryDarkColor() |
|
95 |
{ |
|
96 |
return mVeryDarkC; |
|
97 |
} |
|
98 |
|
|
99 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
100 |
|
|
101 |
public int getDarkColor() |
|
102 |
{ |
|
103 |
return mDarkC; |
|
104 |
} |
|
105 |
|
|
106 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
107 |
|
|
108 |
public int getNormalColor() |
|
109 |
{ |
|
110 |
return mNormalC; |
|
111 |
} |
|
112 |
|
|
113 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
114 |
|
|
115 |
public int getMediumColor() |
|
116 |
{ |
|
117 |
return mMediumC; |
|
118 |
} |
|
119 |
|
|
120 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
121 |
|
|
122 |
public int getLightColor() |
|
123 |
{ |
|
124 |
return mLightC; |
|
125 |
} |
|
126 |
|
|
127 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
128 |
|
|
129 |
public void setUpBackgroundColor(DistortedFramebuffer df) |
|
130 |
{ |
|
131 |
int color = getResources().getColor(mLightC); |
|
132 |
int r = (color>>16) & 0xff; |
|
133 |
int g = (color>> 8) & 0xff; |
|
134 |
int b = (color ) & 0xff; |
|
135 |
|
|
136 |
float rC = (float)r/255; |
|
137 |
float gC = (float)g/255; |
|
138 |
float bC = (float)b/255; |
|
139 |
|
|
140 |
df.glClearColor(rC, gC, bC, 1.0f); |
|
141 |
} |
|
142 |
|
|
85 | 143 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
86 | 144 |
|
87 | 145 |
public void changeThemeTo(int theme) |
src/main/java/org/distorted/info/InfoRenderer.java | ||
---|---|---|
37 | 37 |
|
38 | 38 |
InfoRenderer(InfoSurfaceView v) |
39 | 39 |
{ |
40 |
final float BRIGHTNESS = 0.333f; |
|
41 |
|
|
42 | 40 |
mView = v; |
43 | 41 |
mResources = v.getResources(); |
44 | 42 |
mScreen = new DistortedScreen(); |
45 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
43 |
|
|
44 |
InfoActivity act = (InfoActivity)v.getContext(); |
|
45 |
act.setUpBackgroundColor(mScreen); |
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/main/MainActivity.java | ||
---|---|---|
121 | 121 |
{ |
122 | 122 |
super.onConfigurationChanged(conf); |
123 | 123 |
getWindowWidth(conf); |
124 |
if( mGrid!=null ) mGrid.updateGrid(this,mScreenWidth,mDarkC); |
|
124 |
if( mGrid!=null ) mGrid.updateGrid(this,mScreenWidth,mDarkC,mPassedC);
|
|
125 | 125 |
} |
126 | 126 |
|
127 | 127 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
144 | 144 |
restorePreferences(mJustStarted); |
145 | 145 |
|
146 | 146 |
mGrid = new MainScrollGrid(); |
147 |
mGrid.createGrid(this,mScreenWidth,mSortMode,mDarkC); |
|
147 |
mGrid.createGrid(this,mScreenWidth,mSortMode,mDarkC,mPassedC);
|
|
148 | 148 |
|
149 | 149 |
RubikNetwork network = RubikNetwork.getInstance(); |
150 | 150 |
network.signUpForUpdates(this); |
... | ... | |
419 | 419 |
{ |
420 | 420 |
mNumUpdates--; |
421 | 421 |
updateBubble(mNumUpdates); |
422 |
mGrid.updateGrid(this,mScreenWidth,mDarkC); |
|
422 |
mGrid.updateGrid(this,mScreenWidth,mDarkC,mPassedC);
|
|
423 | 423 |
} |
424 | 424 |
|
425 | 425 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
434 | 434 |
public void sortObjectsBy(int sortMode) |
435 | 435 |
{ |
436 | 436 |
mSortMode = sortMode; |
437 |
mGrid.createGrid(this,mScreenWidth,mSortMode,mDarkC); |
|
437 |
mGrid.createGrid(this,mScreenWidth,mSortMode,mDarkC,mPassedC);
|
|
438 | 438 |
} |
439 | 439 |
|
440 | 440 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/main/MainObjectPopup.java | ||
---|---|---|
44 | 44 |
|
45 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
46 | 46 |
|
47 |
MainObjectPopup(MainActivity act, int ordinal, int width, int height) |
|
47 |
MainObjectPopup(MainActivity act, int ordinal, int width, int height, int darkC, int passedC)
|
|
48 | 48 |
{ |
49 | 49 |
LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
50 | 50 |
final View layout = layoutInflater.inflate(R.layout.object_popup, null); |
... | ... | |
176 | 176 |
TextView levels = layout.findViewById(R.id.objectLevels); |
177 | 177 |
levels.setTextSize(TypedValue.COMPLEX_UNIT_PX, mMenuTextSize); |
178 | 178 |
|
179 |
setupLevelButtons(act,object,layout,width,padding,marginH); |
|
179 |
setupLevelButtons(act,object,layout,width,padding,marginH,darkC,passedC);
|
|
180 | 180 |
} |
181 | 181 |
|
182 | 182 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
183 | 183 |
|
184 |
private void setupLevelButtons(MainActivity act, RubikObject object, View layout, int width,int padding, int margin) |
|
184 |
private void setupLevelButtons(MainActivity act, RubikObject object, View layout, int width,int padding, int margin, int darkC, int passedC)
|
|
185 | 185 |
{ |
186 | 186 |
RubikScores scores = RubikScores.getInstance(); |
187 | 187 |
Resources res = act.getResources(); |
188 |
ColorStateList colorG = ColorStateList.valueOf(res.getColor(R.color.normalGreen));
|
|
189 |
ColorStateList colorD = ColorStateList.valueOf(res.getColor(R.color.darkGrey));
|
|
188 |
ColorStateList colorG = ColorStateList.valueOf(res.getColor(passedC));
|
|
189 |
ColorStateList colorD = ColorStateList.valueOf(res.getColor(darkC));
|
|
190 | 190 |
|
191 | 191 |
int layoutWidth = (int)(width*MENU_WIDTH); |
192 | 192 |
int levelHeight = (int)(width*BUTTON_HEIGHT); |
src/main/java/org/distorted/main/MainScrollGrid.java | ||
---|---|---|
31 | 31 |
|
32 | 32 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
33 | 33 |
|
34 |
void createGrid(final MainActivity act, int windowWidth, int sortMode, int color)
|
|
34 |
void createGrid(final MainActivity act, int windowWidth, int sortMode, int darkC, int passedC)
|
|
35 | 35 |
{ |
36 | 36 |
if( mCreator==null ) mCreator = new ObjectGridCreator(windowWidth); |
37 | 37 |
|
... | ... | |
41 | 41 |
ScrollView scrollView = act.findViewById(R.id.objectScroll); |
42 | 42 |
scrollView.removeAllViews(); |
43 | 43 |
|
44 |
mCreator.createObjectGrid(act,scrollView,sortMode,color);
|
|
44 |
mCreator.createObjectGrid(act,scrollView,sortMode,darkC);
|
|
45 | 45 |
|
46 | 46 |
DisplayMetrics displaymetrics = new DisplayMetrics(); |
47 | 47 |
act.getWindowManager().getDefaultDisplay().getRealMetrics(displaymetrics); |
... | ... | |
61 | 61 |
act.setCurrentObject(ordinal); |
62 | 62 |
int w = displaymetrics.widthPixels; |
63 | 63 |
int h = displaymetrics.heightPixels; |
64 |
MainObjectPopup popup = new MainObjectPopup(act,ordinal,w,h); |
|
64 |
MainObjectPopup popup = new MainObjectPopup(act,ordinal,w,h,darkC,passedC);
|
|
65 | 65 |
popup.show(v); |
66 | 66 |
} |
67 | 67 |
}); |
... | ... | |
70 | 70 |
|
71 | 71 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
72 | 72 |
|
73 |
void updateGrid(final MainActivity act, int scrW, int color)
|
|
73 |
void updateGrid(final MainActivity act, int scrW, int darkC, int passedC)
|
|
74 | 74 |
{ |
75 | 75 |
act.runOnUiThread(new Runnable() |
76 | 76 |
{ |
... | ... | |
78 | 78 |
public void run() |
79 | 79 |
{ |
80 | 80 |
if( mSortMode<0 ) mSortMode = MainSettingsPopup.SORT_DEFAULT; |
81 |
createGrid(act,scrW,mSortMode,color);
|
|
81 |
createGrid(act,scrW,mSortMode,darkC,passedC);
|
|
82 | 82 |
} |
83 | 83 |
}); |
84 | 84 |
} |
src/main/java/org/distorted/patternui/PatternRenderer.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
public class PatternRenderer implements GLSurfaceView.Renderer, DistortedLibrary.LibraryUser |
37 | 37 |
{ |
38 |
public static final float BRIGHTNESS = 0.30f; |
|
39 |
|
|
40 | 38 |
private final PatternSurfaceView mView; |
41 | 39 |
private final Resources mResources; |
42 | 40 |
private final DistortedScreen mScreen; |
... | ... | |
53 | 51 |
mErrorShown = false; |
54 | 52 |
mControl = v.getObjectControl(); |
55 | 53 |
mScreen = new DistortedScreen(); |
56 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
54 |
|
|
55 |
PatternActivity act = (PatternActivity)v.getContext(); |
|
56 |
act.setUpBackgroundColor(mScreen); |
|
57 |
|
|
57 | 58 |
mScreen.enableDepthStencil(InternalOutputSurface.DEPTH_NO_STENCIL); |
58 | 59 |
} |
59 | 60 |
|
src/main/java/org/distorted/playui/PlayRenderer.java | ||
---|---|---|
38 | 38 |
|
39 | 39 |
PlayRenderer(PlayView v) |
40 | 40 |
{ |
41 |
final float BRIGHTNESS = 0.333f; |
|
42 |
|
|
43 | 41 |
mView = v; |
44 | 42 |
mResources = v.getResources(); |
45 | 43 |
mScreen = new DistortedScreen(); |
46 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
44 |
|
|
45 |
PlayActivity act = (PlayActivity)v.getContext(); |
|
46 |
act.setUpBackgroundColor(mScreen); |
|
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/solverui/SolverRenderer.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
public class SolverRenderer implements GLSurfaceView.Renderer, DistortedLibrary.LibraryUser |
37 | 37 |
{ |
38 |
public static final float BRIGHTNESS = 0.30f; |
|
39 |
|
|
40 | 38 |
private final SolverSurfaceView mView; |
41 | 39 |
private final Resources mResources; |
42 | 40 |
private final DistortedScreen mScreen; |
... | ... | |
53 | 51 |
mErrorShown = false; |
54 | 52 |
mControl = v.getObjectControl(); |
55 | 53 |
mScreen = new DistortedScreen(); |
56 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
54 |
|
|
55 |
SolverActivity act = (SolverActivity)v.getContext(); |
|
56 |
act.setUpBackgroundColor(mScreen); |
|
57 |
|
|
57 | 58 |
mScreen.enableDepthStencil(InternalOutputSurface.DEPTH_NO_STENCIL); |
58 | 59 |
} |
59 | 60 |
|
src/main/java/org/distorted/tutorials/TutorialRenderer.java | ||
---|---|---|
12 | 12 |
import javax.microedition.khronos.egl.EGLConfig; |
13 | 13 |
import javax.microedition.khronos.opengles.GL10; |
14 | 14 |
|
15 |
import android.app.ActivityManager; |
|
16 |
import android.content.Context; |
|
17 |
import android.content.pm.ConfigurationInfo; |
|
18 | 15 |
import android.content.res.Resources; |
19 | 16 |
import android.opengl.GLSurfaceView; |
20 | 17 |
|
... | ... | |
42 | 39 |
|
43 | 40 |
TutorialRenderer(TutorialSurfaceView v) |
44 | 41 |
{ |
45 |
final float BRIGHTNESS = 0.30f; |
|
46 |
|
|
47 | 42 |
mView = v; |
48 | 43 |
mResources = v.getResources(); |
49 | 44 |
mScreen = new DistortedScreen(); |
50 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f); |
|
45 |
|
|
46 |
TutorialActivity act = (TutorialActivity)v.getContext(); |
|
47 |
act.setUpBackgroundColor(mScreen); |
|
51 | 48 |
} |
52 | 49 |
|
53 | 50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/res/drawable/black_progress.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
|
3 |
<item android:id="@android:id/background"> |
|
4 |
<shape> |
|
5 |
<solid android:color="@android:color/white" /> |
|
6 |
</shape> |
|
7 |
</item> |
|
8 |
|
|
9 |
<item android:id="@android:id/progress"> |
|
10 |
<clip> |
|
11 |
<shape> |
|
12 |
<solid android:color="@android:color/black" /> |
|
13 |
</shape> |
|
14 |
</clip> |
|
15 |
</item> |
|
16 |
|
|
17 |
</layer-list> |
|
18 |
|
src/main/res/drawable/progress_bar.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
|
3 |
<item android:id="@android:id/background"> |
|
4 |
<shape> |
|
5 |
<solid android:color="@color/white" /> |
|
6 |
</shape> |
|
7 |
</item> |
|
8 |
|
|
9 |
<item android:id="@android:id/progress"> |
|
10 |
<clip> |
|
11 |
<shape> |
|
12 |
<solid android:color="?veryDarkC" /> |
|
13 |
</shape> |
|
14 |
</clip> |
|
15 |
</item> |
|
16 |
|
|
17 |
</layer-list> |
|
18 |
|
src/main/res/layout/bandaged.xml | ||
---|---|---|
16 | 16 |
android:id="@+id/bandagedCreatorScrollView" |
17 | 17 |
android:layout_width="match_parent" |
18 | 18 |
android:layout_height="match_parent" |
19 |
android:background="@color/black">
|
|
19 |
android:background="?veryDarkC">
|
|
20 | 20 |
|
21 | 21 |
<LinearLayout |
22 | 22 |
android:id="@+id/bandagedCreatorView" |
23 | 23 |
android:layout_width="wrap_content" |
24 | 24 |
android:layout_height="match_parent" |
25 |
android:background="@color/black"
|
|
25 |
android:background="?veryDarkC"
|
|
26 | 26 |
android:orientation="horizontal"/> |
27 | 27 |
</HorizontalScrollView> |
28 | 28 |
</LinearLayout> |
src/main/res/layout/dialog_creators_pane.xml | ||
---|---|---|
43 | 43 |
android:layout_height="wrap_content" |
44 | 44 |
android:layout_gravity="bottom" |
45 | 45 |
android:gravity="center" |
46 |
android:backgroundTint="@color/black"
|
|
46 |
android:backgroundTint="?veryDarkC"
|
|
47 | 47 |
android:insetTop="0dp" |
48 | 48 |
android:insetBottom="0dp" |
49 | 49 |
android:text="@string/use_solver"/> |
src/main/res/layout/dialog_pattern_single.xml | ||
---|---|---|
5 | 5 |
android:layout_height="fill_parent" |
6 | 6 |
android:gravity="center" |
7 | 7 |
android:orientation="horizontal" |
8 |
android:background="@android:color/transparent">
|
|
8 |
android:background="?mediumC">
|
|
9 | 9 |
|
10 | 10 |
<ExpandableListView |
11 | 11 |
android:id="@+id/patternListView" |
src/main/res/layout/dialog_scores_scramble_row.xml | ||
---|---|---|
15 | 15 |
android:paddingTop="3dp" |
16 | 16 |
android:layout_weight="0.17" |
17 | 17 |
android:gravity="start" |
18 |
android:background="@color/black"/>
|
|
18 |
android:background="?veryDarkC"/>
|
|
19 | 19 |
|
20 | 20 |
<TextView |
21 | 21 |
android:id="@+id/scoresScrambleRowName" |
... | ... | |
25 | 25 |
android:textSize="20sp" |
26 | 26 |
android:maxLines="1" |
27 | 27 |
android:gravity="start|center_vertical" |
28 |
android:background="@color/black"
|
|
28 |
android:background="?veryDarkC"
|
|
29 | 29 |
android:paddingStart="5dp" |
30 | 30 |
/> |
31 | 31 |
|
... | ... | |
37 | 37 |
android:textSize="20sp" |
38 | 38 |
android:maxLines="1" |
39 | 39 |
android:gravity="end|center_vertical" |
40 |
android:background="@color/black"
|
|
40 |
android:background="?veryDarkC"
|
|
41 | 41 |
android:paddingEnd="5dp" |
42 | 42 |
/> |
43 | 43 |
</LinearLayout> |
src/main/res/layout/dialog_scrollable_panes.xml | ||
---|---|---|
11 | 11 |
android:id="@+id/dialog_scrollable_main_layout" |
12 | 12 |
android:layout_width="match_parent" |
13 | 13 |
android:layout_height="wrap_content" |
14 |
android:background="@color/black"
|
|
14 |
android:background="?veryDarkC"
|
|
15 | 15 |
android:orientation="vertical"> |
16 | 16 |
|
17 | 17 |
<TextView |
src/main/res/layout/dialog_set_name.xml | ||
---|---|---|
37 | 37 |
android:layout_marginRight="50dp" |
38 | 38 |
android:layout_marginBottom="10dp" |
39 | 39 |
android:textSize="24sp" |
40 |
android:textColor="@color/black"
|
|
40 |
android:textColor="?veryDarkC"
|
|
41 | 41 |
android:background="@color/white"/> |
42 | 42 |
|
43 | 43 |
</LinearLayout> |
src/main/res/layout/dialog_solver_error.xml | ||
---|---|---|
3 | 3 |
android:layout_width="match_parent" |
4 | 4 |
android:layout_height="match_parent" |
5 | 5 |
android:gravity="center_horizontal" |
6 |
android:background="?normalC" |
|
6 | 7 |
android:orientation="vertical"> |
7 | 8 |
|
8 | 9 |
<LinearLayout |
src/main/res/layout/dialog_solvers_pane.xml | ||
---|---|---|
43 | 43 |
android:layout_height="wrap_content" |
44 | 44 |
android:layout_gravity="bottom" |
45 | 45 |
android:gravity="center" |
46 |
android:backgroundTint="@color/black"
|
|
46 |
android:backgroundTint="?veryDarkC"
|
|
47 | 47 |
android:insetTop="0dp" |
48 | 48 |
android:insetBottom="0dp" |
49 | 49 |
android:text="@string/use_solver"/> |
src/main/res/layout/dialog_updates_pane.xml | ||
---|---|---|
47 | 47 |
android:id="@+id/updates_pane_button" |
48 | 48 |
android:layout_width="match_parent" |
49 | 49 |
android:layout_height="wrap_content" |
50 |
android:backgroundTint="@color/black"
|
|
50 |
android:backgroundTint="?veryDarkC"
|
|
51 | 51 |
android:minHeight="0dp" |
52 | 52 |
android:minWidth="0dp" |
53 | 53 |
android:insetTop="0dp" |
... | ... | |
59 | 59 |
android:layout_width="match_parent" |
60 | 60 |
android:layout_height="wrap_content" |
61 | 61 |
style="@android:style/Widget.ProgressBar.Horizontal" |
62 |
android:progressDrawable="@drawable/black_progress"
|
|
62 |
android:progressDrawable="@drawable/progress_bar"
|
|
63 | 63 |
android:max="100"/> |
64 | 64 |
|
65 | 65 |
</LinearLayout> |
src/main/res/values/attr.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="utf-8"?> |
2 | 2 |
<resources> |
3 | 3 |
|
4 |
<attr name="veryDarkC" format="reference|color" /> |
|
4 | 5 |
<attr name="darkC" format="reference|color" /> |
5 | 6 |
<attr name="normalC" format="reference|color" /> |
6 | 7 |
<attr name="mediumC" format="reference|color" /> |
7 | 8 |
<attr name="lightC" format="reference|color" /> |
9 |
<attr name="passedC" format="reference|color" /> |
|
8 | 10 |
|
9 | 11 |
</resources> |
src/main/res/values/colors.xml | ||
---|---|---|
2 | 2 |
<resources> |
3 | 3 |
|
4 | 4 |
<color name="red">#ffff0000</color> |
5 |
<color name="black">#ff010101</color> |
|
6 | 5 |
<color name="white">#ffffffff</color> |
7 | 6 |
|
8 |
<color name="darkGreen">#ff008800</color> |
|
9 |
<color name="normalGreen">#ff00a000</color> |
|
10 |
<color name="mediumGreen">#ff00b800</color> |
|
7 |
<color name="veryDarkGreen">#ff004400</color> |
|
8 |
<color name="darkGreen">#ff007700</color> |
|
9 |
<color name="normalGreen">#ff009000</color> |
|
10 |
<color name="mediumGreen">#ff00aa00</color> |
|
11 | 11 |
<color name="lightGreen">#ff00cc00</color> |
12 |
<color name="passedGreen">#ff333333</color> |
|
12 | 13 |
|
14 |
<color name="veryDarkGrey">#ff111111</color> |
|
13 | 15 |
<color name="darkGrey">#ff222222</color> |
14 | 16 |
<color name="normalGrey">#ff333333</color> |
15 | 17 |
<color name="mediumGrey">#ff444444</color> |
16 | 18 |
<color name="lightGrey">#ff555555</color> |
19 |
<color name="passedGrey">#ff00a000</color> |
|
17 | 20 |
|
21 |
<color name="veryDarkWhite">#ff080808</color> |
|
18 | 22 |
<color name="darkWhite">#ffa0a0a0</color> |
19 | 23 |
<color name="normalWhite">#ffc0c0c0</color> |
20 | 24 |
<color name="mediumWhite">#ffe0e0e0</color> |
21 | 25 |
<color name="lightWhite">#ffffffff</color> |
26 |
<color name="passedWhite">#ff00a000</color> |
|
22 | 27 |
</resources> |
src/main/res/values/styles.xml | ||
---|---|---|
13 | 13 |
</style> |
14 | 14 |
|
15 | 15 |
<style name="GreyTheme" parent="@style/BaseMaterialThemeNoActionBar"> |
16 |
<item name="veryDarkC">@color/veryDarkGrey</item> |
|
16 | 17 |
<item name="darkC">@color/darkGrey</item> |
17 | 18 |
<item name="normalC">@color/normalGrey</item> |
18 | 19 |
<item name="mediumC">@color/mediumGrey</item> |
19 | 20 |
<item name="lightC">@color/lightGrey</item> |
21 |
<item name="passedC">@color/passedGrey</item> |
|
20 | 22 |
</style> |
21 | 23 |
|
22 | 24 |
<style name="WhiteTheme" parent="@style/BaseMaterialThemeNoActionBar"> |
25 |
<item name="veryDarkC">@color/veryDarkWhite</item> |
|
23 | 26 |
<item name="darkC">@color/darkWhite</item> |
24 | 27 |
<item name="normalC">@color/normalWhite</item> |
25 | 28 |
<item name="mediumC">@color/mediumWhite</item> |
26 | 29 |
<item name="lightC">@color/lightWhite</item> |
30 |
<item name="passedC">@color/passedWhite</item> |
|
27 | 31 |
</style> |
28 | 32 |
|
29 | 33 |
<style name="GreenTheme" parent="@style/BaseMaterialThemeNoActionBar"> |
34 |
<item name="veryDarkC">@color/veryDarkGreen</item> |
|
30 | 35 |
<item name="darkC">@color/darkGreen</item> |
31 | 36 |
<item name="normalC">@color/normalGreen</item> |
32 | 37 |
<item name="mediumC">@color/mediumGreen</item> |
33 | 38 |
<item name="lightC">@color/lightGreen</item> |
39 |
<item name="passedC">@color/passedGreen</item> |
|
34 | 40 |
</style> |
35 | 41 |
|
36 | 42 |
<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> |
Also available in: Unified diff
progress with colors in styles