| 26 |
26 |
import android.view.ViewGroup;
|
| 27 |
27 |
import android.view.WindowManager;
|
| 28 |
28 |
import android.widget.LinearLayout;
|
| 29 |
|
import android.widget.ScrollView;
|
| 30 |
29 |
|
| 31 |
30 |
import androidx.appcompat.app.AppCompatActivity;
|
| 32 |
31 |
|
| ... | ... | |
| 35 |
34 |
import org.distorted.dialogs.RubikDialogError;
|
| 36 |
35 |
import org.distorted.library.main.DistortedLibrary;
|
| 37 |
36 |
import org.distorted.main.R;
|
|
37 |
import org.distorted.main.RubikActivity;
|
| 38 |
38 |
import org.distorted.objectlib.main.ObjectControl;
|
| 39 |
39 |
import org.distorted.objects.RubikObject;
|
| 40 |
40 |
import org.distorted.objects.RubikObjectList;
|
| ... | ... | |
| 95 |
95 |
private void computeHeights()
|
| 96 |
96 |
{
|
| 97 |
97 |
int barHeight = (int)(mScreenHeight*RATIO_BAR);
|
| 98 |
|
int scrollHeight = (int)(mScreenHeight*RATIO_SCROLL);
|
| 99 |
|
int viewHeight = (int)(mScreenHeight*(1-RATIO_SCROLL));
|
|
98 |
int viewHeight = (int)(mScreenHeight*RATIO_SCROLL);
|
|
99 |
int objectHeight = (int)(mScreenHeight*(1-RATIO_SCROLL));
|
| 100 |
100 |
mHeightBar = barHeight;
|
| 101 |
101 |
|
| 102 |
102 |
LinearLayout layout = findViewById(R.id.lowerBar);
|
| ... | ... | |
| 104 |
104 |
paramsL.height = barHeight;
|
| 105 |
105 |
layout.setLayoutParams(paramsL);
|
| 106 |
106 |
|
| 107 |
|
ScrollView scroll = findViewById(R.id.bandagedCreatorScrollView);
|
| 108 |
|
ViewGroup.LayoutParams paramsS = scroll.getLayoutParams();
|
| 109 |
|
paramsS.height = scrollHeight;
|
| 110 |
|
scroll.setLayoutParams(paramsS);
|
|
107 |
LinearLayout view = findViewById(R.id.bandagedCreatorView);
|
|
108 |
ViewGroup.LayoutParams paramsS = view.getLayoutParams();
|
|
109 |
paramsS.height = viewHeight;
|
| 111 |
110 |
|
| 112 |
|
BandagedCreatorView view = findViewById(R.id.bandagedCreatorView);
|
| 113 |
|
ViewGroup.LayoutParams paramsV = view.getLayoutParams();
|
| 114 |
|
paramsV.height = viewHeight;
|
| 115 |
|
view.setLayoutParams(paramsV);
|
|
111 |
int p = (int)(mScreenHeight* RubikActivity.PADDING);
|
|
112 |
view.setPadding(p,p,p,p);
|
|
113 |
view.setLayoutParams(paramsS);
|
|
114 |
|
|
115 |
BandagedCreatorView creator = findViewById(R.id.bandagedCreatorObjectView);
|
|
116 |
ViewGroup.LayoutParams paramsC = creator.getLayoutParams();
|
|
117 |
paramsC.height = objectHeight;
|
|
118 |
creator.setLayoutParams(paramsC);
|
| 116 |
119 |
}
|
| 117 |
120 |
|
| 118 |
121 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| ... | ... | |
| 171 |
174 |
protected void onPause()
|
| 172 |
175 |
{
|
| 173 |
176 |
super.onPause();
|
| 174 |
|
BandagedCreatorView view = findViewById(R.id.bandagedCreatorView);
|
|
177 |
BandagedCreatorView view = findViewById(R.id.bandagedCreatorObjectView);
|
| 175 |
178 |
view.onPause();
|
| 176 |
179 |
DistortedLibrary.onPause(ACTIVITY_NUMBER);
|
| 177 |
180 |
}
|
| ... | ... | |
| 183 |
186 |
{
|
| 184 |
187 |
super.onResume();
|
| 185 |
188 |
DistortedLibrary.onResume(ACTIVITY_NUMBER);
|
| 186 |
|
BandagedCreatorView view = findViewById(R.id.bandagedCreatorView);
|
|
189 |
BandagedCreatorView view = findViewById(R.id.bandagedCreatorObjectView);
|
| 187 |
190 |
view.onResume();
|
| 188 |
191 |
|
| 189 |
192 |
if( mScreen==null ) mScreen = new BandagedCreatorScreen();
|
Progress with 'bandaged UI'