Merge "Fix bug with resize frame disappearing." into sc-dev
This commit is contained in:
commit
6d593d891e
2 files changed
+8
-5
No files matched your search
@@ -34,6 +34,7 @@
|
||||
|
||||
<!-- Left -->
|
||||
<ImageView
|
||||
android:id="@+id/widget_resize_left_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
@@ -43,6 +44,7 @@
|
||||
|
||||
<!-- Top -->
|
||||
<ImageView
|
||||
android:id="@+id/widget_resize_top_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
@@ -52,6 +54,7 @@
|
||||
|
||||
<!-- Right -->
|
||||
<ImageView
|
||||
android:id="@+id/widget_resize_right_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
@@ -61,6 +64,7 @@
|
||||
|
||||
<!-- Bottom -->
|
||||
<ImageView
|
||||
android:id="@+id/widget_resize_bottom_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
|
||||
@@ -20,7 +20,6 @@ import android.util.SizeF;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -139,10 +138,10 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
|
||||
ViewGroup content = (ViewGroup) getChildAt(0);
|
||||
for (int i = 0; i < HANDLE_COUNT; i ++) {
|
||||
mDragHandles[i] = content.getChildAt(i);
|
||||
}
|
||||
mDragHandles[INDEX_LEFT] = findViewById(R.id.widget_resize_left_handle);
|
||||
mDragHandles[INDEX_TOP] = findViewById(R.id.widget_resize_top_handle);
|
||||
mDragHandles[INDEX_RIGHT] = findViewById(R.id.widget_resize_right_handle);
|
||||
mDragHandles[INDEX_BOTTOM] = findViewById(R.id.widget_resize_bottom_handle);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user