Project

General

Profile

« Previous | Next » 

Revision cbde5100

Added by Leszek Koltunski about 5 hours ago

progress with remembering solves

View differences:

src/main/java/org/distorted/main/MainActivity.java
354 354
      if( rot!=null )
355 355
        {
356 356
        intent.putExtra("rot0", rot.get0() );
357
        intent.putExtra("rot1", rot.get0() );
358
        intent.putExtra("rot2", rot.get0() );
359
        intent.putExtra("rot3", rot.get0() );
357
        intent.putExtra("rot1", rot.get1() );
358
        intent.putExtra("rot2", rot.get2() );
359
        intent.putExtra("rot3", rot.get3() );
360 360
        }
361 361
      if( quats!=null )
362 362
        {
src/main/java/org/distorted/main/MainSolvesPopup.java
91 91
        int elapsed = solves.getElapsed(object);
92 92
        Static4D rotQuat = solves.getRotQuat(object);
93 93
        int[] quats = solves.getQuats(object);
94
        View pane = createOldPane(act, s, time, elapsed, rotQuat, quats, pL, pT);
94
        View pane = createOldPane(act, time, elapsed, rotQuat, quats, pL, pT);
95 95
        mLayout.addView(pane);
96 96
        }
97 97
      }
......
122 122

  
123 123
///////////////////////////////////////////////////////////////////////////////////////////////////
124 124

  
125
  private View createOldPane(MainActivity act, int index, long time, int elapsed, Static4D rot,
126
                             int[] quats, LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pText)
125
  private View createOldPane(MainActivity act, long time, int elapsed, Static4D rot, int[] quats,
126
                             LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pText)
127 127
    {
128 128
    View view = act.getLayoutInflater().inflate(R.layout.dialog_solve_old_pane, null);
129 129
    TextView title = view.findViewById(R.id.solves_pane_title);
......
144 144
    dt.setLayoutParams(pText);
145 145
    tm.setLayoutParams(pText);
146 146

  
147
    Button but1 = view.findViewById(R.id.solves_pane_delete);
148
    but1.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
147
    Button butDel = view.findViewById(R.id.solves_pane_delete);
148
    butDel.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
149 149

  
150
    but1.setOnClickListener( new View.OnClickListener()
150
    butDel.setOnClickListener( new View.OnClickListener()
151 151
        {
152 152
        @Override
153 153
        public void onClick(View v)
154 154
          {
155
          mLayout.removeViewAt(index);
155
          mLayout.removeView(view);
156 156
          int level = mLevel==LEVELS_SHOWN ? mLevel : mLevel+1;
157 157
          RubikRememberedSolves solves = RubikRememberedSolves.getInstance();
158 158
          solves.deleteSolve(act, mObject.getLowerName(), level, time);
159 159
          }
160 160
        });
161 161

  
162
    Button but2 = view.findViewById(R.id.solves_pane_resume);
163
    but2.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
162
    Button butRes = view.findViewById(R.id.solves_pane_resume);
163
    butRes.setTextSize(TypedValue.COMPLEX_UNIT_PX, mFontSize);
164 164

  
165
    but2.setOnClickListener( new View.OnClickListener()
165
    butRes.setOnClickListener( new View.OnClickListener()
166 166
        {
167 167
        @Override
168 168
        public void onClick(View v)
src/main/java/org/distorted/play/PlayActivity.java
193 193
          changeIfDifferent(mObjectName, mObjectLocal, mObjectOrdinal, control, mQuats);
194 194
          }
195 195

  
196
        control.setRotateOnCreation(false);
196 197
        control.rotateNow(mRotQuat);
197 198
        ScreenList curr = ScreenList.getCurrentScreen();
198 199

  

Also available in: Unified diff