Revision af133d41
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/states/RubikStatePattern.java | ||
---|---|---|
118 | 118 |
|
119 | 119 |
setTrioState(false); |
120 | 120 |
|
121 |
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1); |
|
121 |
LinearLayout.LayoutParams paramsL = new LinearLayout.LayoutParams((int)(width/2),LinearLayout.LayoutParams.MATCH_PARENT); |
|
122 |
LinearLayout.LayoutParams paramsM = new LinearLayout.LayoutParams((int)(width/6),LinearLayout.LayoutParams.MATCH_PARENT); |
|
123 |
LinearLayout.LayoutParams paramsR = new LinearLayout.LayoutParams((int)(width/3),LinearLayout.LayoutParams.MATCH_PARENT); |
|
122 | 124 |
|
123 | 125 |
LinearLayout layoutLeft = new LinearLayout(act); |
124 |
layoutLeft.setLayoutParams(params); |
|
126 |
layoutLeft.setLayoutParams(paramsL); |
|
127 |
LinearLayout layoutMid = new LinearLayout(act); |
|
128 |
layoutMid.setLayoutParams(paramsM); |
|
125 | 129 |
LinearLayout layoutRight = new LinearLayout(act); |
126 |
layoutRight.setLayoutParams(params); |
|
130 |
layoutRight.setLayoutParams(paramsR);
|
|
127 | 131 |
|
128 | 132 |
layoutLeft.addView(mPrevButton); |
129 | 133 |
layoutLeft.addView(mMovesText); |
... | ... | |
134 | 138 |
layoutRight.addView(mBackButton); |
135 | 139 |
|
136 | 140 |
layoutBot.addView(layoutLeft); |
141 |
layoutBot.addView(layoutMid); |
|
137 | 142 |
layoutBot.addView(layoutRight); |
138 | 143 |
} |
139 | 144 |
|
src/main/java/org/distorted/states/RubikStateSolution.java | ||
---|---|---|
79 | 79 |
LinearLayout layoutBot = act.findViewById(R.id.lowerBar); |
80 | 80 |
layoutBot.removeAllViews(); |
81 | 81 |
|
82 |
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1); |
|
82 |
LinearLayout.LayoutParams paramsL = new LinearLayout.LayoutParams((int)(width/2),LinearLayout.LayoutParams.MATCH_PARENT); |
|
83 |
LinearLayout.LayoutParams paramsM = new LinearLayout.LayoutParams((int)(width/6),LinearLayout.LayoutParams.MATCH_PARENT); |
|
84 |
LinearLayout.LayoutParams paramsR = new LinearLayout.LayoutParams((int)(width/3),LinearLayout.LayoutParams.MATCH_PARENT); |
|
85 |
|
|
86 |
LinearLayout layoutLeft = new LinearLayout(act); |
|
87 |
layoutLeft.setLayoutParams(paramsL); |
|
88 |
LinearLayout layoutMid = new LinearLayout(act); |
|
89 |
layoutMid.setLayoutParams(paramsM); |
|
90 |
LinearLayout layoutRight = new LinearLayout(act); |
|
91 |
layoutRight.setLayoutParams(paramsR); |
|
83 | 92 |
|
84 | 93 |
setupPrevButton(act,width); |
85 | 94 |
setupNextButton(act,width); |
86 | 95 |
setupTextView(act,width); |
87 | 96 |
|
88 |
LinearLayout layoutLeft = new LinearLayout(act); |
|
89 |
layoutLeft.setLayoutParams(params); |
|
90 |
|
|
91 | 97 |
layoutLeft.addView(mPrevButton); |
92 | 98 |
layoutLeft.addView(mMovesText); |
93 | 99 |
layoutLeft.addView(mNextButton); |
94 | 100 |
|
95 | 101 |
setupBackButton(act,width); |
96 | 102 |
|
97 |
LinearLayout layoutRight = new LinearLayout(act); |
|
98 |
layoutRight.setLayoutParams(params); |
|
99 |
|
|
100 | 103 |
layoutRight.addView(mBackButton); |
101 | 104 |
|
102 | 105 |
layoutBot.addView(layoutLeft); |
106 |
layoutBot.addView(layoutMid); |
|
103 | 107 |
layoutBot.addView(layoutRight); |
104 | 108 |
} |
105 | 109 |
|
src/main/java/org/distorted/states/RubikStateSolver.java | ||
---|---|---|
98 | 98 |
LinearLayout layoutTop = act.findViewById(R.id.upperBar); |
99 | 99 |
layoutTop.removeAllViews(); |
100 | 100 |
|
101 |
LinearLayout.LayoutParams paramsL = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1); |
|
102 |
|
|
103 |
LinearLayout layoutLeft = new LinearLayout(act); |
|
104 |
layoutLeft.setLayoutParams(paramsL); |
|
105 |
LinearLayout layoutMid = new LinearLayout(act); |
|
106 |
layoutMid.setLayoutParams(paramsL); |
|
107 |
LinearLayout layoutRight = new LinearLayout(act); |
|
108 |
layoutRight.setLayoutParams(paramsL); |
|
109 |
|
|
101 | 110 |
if( mNumFaces>0 ) |
102 | 111 |
{ |
103 | 112 |
setupBitmaps(); |
... | ... | |
114 | 123 |
setupSolveButton(act,width); |
115 | 124 |
setupBackButton(act,width); |
116 | 125 |
|
117 |
layoutBot.addView(mSolveButton); |
|
118 |
layoutBot.addView(mBackButton); |
|
126 |
layoutLeft.addView(mSolveButton); |
|
127 |
layoutRight.addView(mBackButton); |
|
128 |
|
|
129 |
layoutBot.addView(layoutLeft); |
|
130 |
layoutBot.addView(layoutMid); |
|
131 |
layoutBot.addView(layoutRight); |
|
119 | 132 |
} |
120 | 133 |
|
121 | 134 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Progress with UI