Showing
3 changed files
with
12 additions
and
3 deletions
| ... | ... | @@ -30,6 +30,7 @@ import com.studymachine.www.action.PresentationAction; |
| 30 | 30 | import com.studymachine.www.action.TitleBarAction; |
| 31 | 31 | import com.studymachine.www.action.ToastAction; |
| 32 | 32 | import com.studymachine.www.http.model.HttpData; |
| 33 | +import com.studymachine.www.manager.ActivityManager; | |
| 33 | 34 | import com.studymachine.www.manager.EventBusManager; |
| 34 | 35 | import com.studymachine.www.other.Tool; |
| 35 | 36 | import com.studymachine.www.ui.activity.HomeActivity; |
| ... | ... | @@ -148,6 +149,7 @@ public abstract class AppActivity extends BaseActivity |
| 148 | 149 | @Override |
| 149 | 150 | public void onGlassDeviceDisconnected() { |
| 150 | 151 | connectStatus.setValue(false); |
| 152 | + ActivityManager.getInstance().finishAllActivities(); | |
| 151 | 153 | // mControllerBid.setVisibility(View.GONE); |
| 152 | 154 | } |
| 153 | 155 | }); | ... | ... |
| ... | ... | @@ -337,6 +337,10 @@ public abstract class AppPresentation extends Presentation implements TitleBarAc |
| 337 | 337 | mControllerImage.layout(left, top, right, bottom); |
| 338 | 338 | if (move) { |
| 339 | 339 | View view = getViewAtActivity(x, y); |
| 340 | + if (view == null){ | |
| 341 | + break; | |
| 342 | + } | |
| 343 | + | |
| 340 | 344 | MotionEvent motionEvent = MotionEvent.obtain(event.getDownTime(), event.getEventTime(), MotionEvent.ACTION_DOWN, 0, 0, 0); |
| 341 | 345 | view.dispatchTouchEvent(motionEvent); |
| 342 | 346 | MotionEvent moveEvent = MotionEvent.obtain(event.getDownTime(), event.getEventTime(), MotionEvent.ACTION_MOVE, 0 - scollX, 0 - scollY, 0); |
| ... | ... | @@ -346,6 +350,9 @@ public abstract class AppPresentation extends Presentation implements TitleBarAc |
| 346 | 350 | } |
| 347 | 351 | } else { |
| 348 | 352 | View view = getViewAtActivity(x, y); |
| 353 | + if (view == null){ | |
| 354 | + break; | |
| 355 | + } | |
| 349 | 356 | MotionEvent motionEvent = MotionEvent.obtain(event.getDownTime(), event.getEventTime(), MotionEvent.ACTION_DOWN, 0, 0, 0); |
| 350 | 357 | view.dispatchTouchEvent(motionEvent); |
| 351 | 358 | MotionEvent moveEvent = MotionEvent.obtain(event.getDownTime(), event.getEventTime(), MotionEvent.ACTION_MOVE, 0 - distanceX, 0 - distanceY, 0); | ... | ... |
| ... | ... | @@ -8,15 +8,15 @@ |
| 8 | 8 | tools:context="com.studymachine.www.ui.activity.AiListActivity"> |
| 9 | 9 | |
| 10 | 10 | <androidx.appcompat.widget.AppCompatImageView |
| 11 | - android:layout_width="wrap_content" | |
| 12 | - android:layout_height="wrap_content" | |
| 11 | + android:layout_width="match_parent" | |
| 12 | + android:layout_height="match_parent" | |
| 13 | 13 | android:src="@drawable/ai_person_bg" |
| 14 | 14 | android:translationZ="@dimen/dp_2" /> |
| 15 | 15 | |
| 16 | 16 | |
| 17 | 17 | <androidx.appcompat.widget.AppCompatImageView |
| 18 | 18 | android:id="@+id/iv_person" |
| 19 | - android:layout_width="@dimen/dp_300" | |
| 19 | + android:layout_width="@dimen/dp_500" | |
| 20 | 20 | android:layout_centerVertical="true" |
| 21 | 21 | android:layout_height="wrap_content" |
| 22 | 22 | android:src="@drawable/ai_person_to" | ... | ... |