Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 016d7e93 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Using spring layout for widget sheet

Bug: 72811152
Change-Id: Ifd4ade7327589871532288eb2982cf5b4f084979
parent 5c143255
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -31,21 +31,22 @@
            android:id="@+id/widgets_list_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            />
            android:clipToPadding="false" />

        <!-- Fast scroller popup -->
        <TextView
            android:id="@+id/fast_scroller_popup"
            style="@style/FastScrollerPopup"
            android:layout_gravity="top|end"
            android:layout_alignParentEnd="true"
            android:layout_alignParentTop="true"
            android:layout_marginEnd="@dimen/fastscroll_popup_margin" />

        <com.android.launcher3.views.RecyclerViewFastScroller
            android:id="@+id/fast_scroller"
            android:layout_width="@dimen/fastscroll_width"
            android:layout_height="match_parent"
            android:layout_gravity="end"
            android:layout_alignParentEnd="true"
            android:layout_alignParentTop="true"
            android:layout_marginEnd="@dimen/fastscroll_end_margin" />
    </com.android.launcher3.views.TopRoundedCornerView>
</com.android.launcher3.widget.WidgetsFullSheet>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import com.android.launcher3.util.Themes;
/**
 * View with top rounded corners.
 */
public class TopRoundedCornerView extends FrameLayout {
public class TopRoundedCornerView extends SpringRelativeLayout {

    private final RectF mRect = new RectF();
    private final Path mClipPath = new Path();
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ public class WidgetsFullSheet extends BaseWidgetSheet
        mRecyclerView.setAdapter(mAdapter);
        mAdapter.setApplyBitmapDeferred(true, mRecyclerView);

        TopRoundedCornerView springLayout = (TopRoundedCornerView) mContent;
        springLayout.addSpringView(R.id.widgets_list_view);
        mRecyclerView.setEdgeEffectFactory(springLayout.createEdgeEffectFactory());
        onWidgetsBound();
    }