Project

General

Profile

« Previous | Next » 

Revision 9439f455

Added by Leszek Koltunski over 4 years ago

Fix sa bug which showed itself only on Android API 21 and 22.

View differences:

src/main/java/org/distorted/states/RubikStatePlay.java
22 22
import android.content.Context;
23 23
import android.content.SharedPreferences;
24 24
import android.graphics.drawable.BitmapDrawable;
25
import android.os.Build;
25 26
import android.util.DisplayMetrics;
26 27
import android.view.Gravity;
27 28
import android.view.LayoutInflater;
......
122 123
          mLayout.setOrientation(vertical ? LinearLayout.VERTICAL:LinearLayout.HORIZONTAL);
123 124

  
124 125
          int width  = view.getWidth();
126
          int layhei = mLayoutWidth * (vertical? total:1);
125 127
          int laywid = mLayoutWidth * (vertical? 1:total);
126 128

  
127 129
          mPopup.showAsDropDown(view, (width-laywid)/2, 0, Gravity.LEFT);
130

  
131
          if( android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1 )
132
            {
133
            mPopup.update(view, laywid, layhei);
134
            }
128 135
          }
129 136
        }
130 137
      });

Also available in: Unified diff