Project

General

Profile

« Previous | Next » 

Revision 18b0ae9c

Added by Leszek Koltunski 6 months ago

Progress with the generic PlayActivity.

View differences:

src/main/java/org/distorted/playui/ScreenScrambling.java
1 1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
2
// Copyright 2023 Leszek Koltunski                                                               //
3 3
//                                                                                               //
4 4
// This file is part of Magic Cube.                                                              //
5 5
//                                                                                               //
......
21 21

  
22 22
///////////////////////////////////////////////////////////////////////////////////////////////////
23 23

  
24
public class ScreenScrambling extends ScreenBase
24
public class ScreenScrambling extends ScreenAbstract
25 25
  {
26 26
  private TransparentImageButton mBackButton;
27
  private TextView mLabel;
27 28

  
28 29
///////////////////////////////////////////////////////////////////////////////////////////////////
29 30

  
......
43 44
    // TOP ////////////////////////////
44 45
    LinearLayout layoutTop = act.findViewById(R.id.upperBar);
45 46
    layoutTop.removeAllViews();
46
    TextView label = (TextView)inflater.inflate(R.layout.upper_text, null);
47
    label.setTextSize(TypedValue.COMPLEX_UNIT_PX, titleSize);
48
    label.setText(R.string.ready);
49
    layoutTop.addView(label);
47
    mLabel = (TextView)inflater.inflate(R.layout.upper_text, null);
48
    mLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX, titleSize);
49
    layoutTop.addView(mLabel);
50

  
51
    // BOT ////////////////////////////
52
    LinearLayout layoutBot = act.findViewById(R.id.lowerBar);
53
    layoutBot.removeAllViews();
54

  
55
    LinearLayout.LayoutParams paramsL = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,1);
56
    LinearLayout.LayoutParams paramsR = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT,2);
57

  
58
    LinearLayout layoutLeft = new LinearLayout(act);
59
    layoutLeft.setLayoutParams(paramsL);
60
    LinearLayout layoutRight = new LinearLayout(act);
61
    layoutRight.setLayoutParams(paramsR);
50 62

  
51 63
    setupBackButton(act);
52
    createBottomPane(act,mBackButton);
64

  
65
    layoutRight.addView(mBackButton);
66
    layoutBot.addView(layoutLeft);
67
    layoutBot.addView(layoutRight);
68
    }
69

  
70
///////////////////////////////////////////////////////////////////////////////////////////////////
71

  
72
  void setReady()
73
    {
74
    mLabel.setText(R.string.ready);
53 75
    }
54 76

  
55 77
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff