File tree 1 file changed +12
-9
lines changed
happy-bubble/src/main/java/com/xujiaji/happybubble
1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -189,17 +189,20 @@ private void onAutoPosition()
189
189
spaces [2 ] = Util .getScreenWH (getContext ())[0 ] - clickedViewLocation [0 ] - mClickedView .getWidth ();//右距离
190
190
spaces [3 ] = Util .getScreenWH (getContext ())[1 ] - clickedViewLocation [1 ] - mClickedView .getHeight () - (mCalBar ? Util .getStatusHeight (getContext ()) : 0 );//下距离
191
191
192
- switch (mAuto )
192
+ if (mAuto != null )
193
193
{
194
- case AROUND :
195
- break ;
196
- case UP_AND_DOWN :
197
- mPosition = spaces [1 ] > spaces [3 ] ? Position .TOP : Position .BOTTOM ;
198
- return ;
199
- case LEFT_AND_RIGHT :
200
- mPosition = spaces [0 ] > spaces [2 ] ? Position .LEFT : Position .RIGHT ;
201
- return ;
194
+ switch (mAuto )
195
+ {
196
+ case AROUND :
197
+ break ;
198
+ case UP_AND_DOWN :
199
+ mPosition = spaces [1 ] > spaces [3 ] ? Position .TOP : Position .BOTTOM ;
200
+ return ;
201
+ case LEFT_AND_RIGHT :
202
+ mPosition = spaces [0 ] > spaces [2 ] ? Position .LEFT : Position .RIGHT ;
203
+ return ;
202
204
default :
205
+ }
203
206
}
204
207
205
208
int max = 0 ;
You can’t perform that action at this time.
0 commit comments