Project

General

Profile

« Previous | Next » 

Revision 214e301a

Added by Leszek Koltunski about 3 years ago

Fix the problem reported by Samsung -

1. Fire off the app
2. minimize it, select 'Multi window'
3. put some other app in the lower half of the screen
4. close the lower app
5. our app used to fail to display the upper and lower menu bars.

View differences:

src/main/java/org/distorted/main/RubikActivity.java
133 133
      int barHeight = (int)(height*RATIO_BAR);
134 134
      mHeightLowerBar = barHeight;
135 135
      mHeightUpperBar = barHeight;
136

  
137
      LinearLayout layoutTop = findViewById(R.id.upperBar);
138
      LinearLayout layoutBot = findViewById(R.id.lowerBar);
139

  
140
      ViewGroup.LayoutParams paramsTop = layoutTop.getLayoutParams();
141
      paramsTop.height = mHeightUpperBar;
142
      layoutTop.setLayoutParams(paramsTop);
143
      ViewGroup.LayoutParams paramsBot = layoutBot.getLayoutParams();
144
      paramsBot.height = mHeightLowerBar;
145
      layoutBot.setLayoutParams(paramsBot);
136 146
      }
137 147

  
138 148
///////////////////////////////////////////////////////////////////////////////////////////////////
......
179 189
        layoutHid.setLayoutParams(paramsHid);
180 190
        mHeightUpperBar += paramsHid.height;
181 191
        }
182

  
183
      float height = getScreenHeightInPixels();
184

  
185
      LinearLayout layoutTop = findViewById(R.id.upperBar);
186
      LinearLayout layoutBot = findViewById(R.id.lowerBar);
187

  
188
      ViewGroup.LayoutParams paramsTop = layoutTop.getLayoutParams();
189
      paramsTop.height = (int)(height*RATIO_BAR);
190
      layoutTop.setLayoutParams(paramsTop);
191
      ViewGroup.LayoutParams paramsBot = layoutBot.getLayoutParams();
192
      paramsBot.height = (int)(height*RATIO_BAR);
193
      layoutBot.setLayoutParams(paramsBot);
194 192
      }
195 193

  
196 194
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff