Add rounded corners to customizer decoration

Test: manual
Fixes: 187436887
Change-Id: I2f8dabfb0fc778afc43b1af6901ee878544070ad
This commit is contained in:
Fabian Kozynski
2021-05-07 13:22:48 -04:00
parent d245565acc
commit 2bdd775bbf
5 changed files with 15 additions and 11 deletions

View File

@@ -13,5 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<color xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorBackground"/>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?android:attr/colorBackground"/>
<corners android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>

View File

@@ -20,8 +20,9 @@
android:id="@android:id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:paddingTop="20dp"
android:paddingBottom="13dp"
android:paddingTop="24dp"
android:paddingBottom="24dp"
android:textAppearance="@style/TextAppearance.QSEdit.Headers"
android:text="@string/drag_to_add_tiles" />

View File

@@ -27,9 +27,9 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginLeft="@dimen/notification_side_paddings"
android:layout_marginRight="@dimen/notification_side_paddings"
android:orientation="vertical"
android:paddingStart="@dimen/qs_customize_internal_side_paddings"
android:paddingEnd="@dimen/qs_customize_internal_side_paddings"
android:background="@drawable/qs_customizer_background">
<Toolbar
android:id="@*android:id/action_bar"
@@ -45,7 +45,10 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingStart="@dimen/qs_customize_internal_side_paddings"
android:paddingEnd="@dimen/qs_customize_internal_side_paddings"
android:paddingBottom="28dp"
android:clipChildren="false"
android:clipToPadding="false"
android:scrollIndicators="top"
android:scrollbars="vertical"

View File

@@ -549,6 +549,7 @@
(Toolbar_minWidth (56dp) + qs_tile_margin_top_bottom (4dp))
-->
<dimen name="qs_customize_header_min_height">54dp</dimen>
<dimen name="qs_customize_internal_side_paddings">8dp</dimen>
<dimen name="qs_tile_margin_top">18dp</dimen>
<dimen name="qs_tile_icon_background_stroke_width">-1dp</dimen>
<dimen name="qs_tile_background_size">56dp</dimen>

View File

@@ -690,11 +690,7 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
continue;
}
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int top = child.getTop() + params.topMargin +
Math.round(ViewCompat.getTranslationY(child));
// Draw full width, in case there aren't tiles all the way across.
final int top = child.getTop() + Math.round(ViewCompat.getTranslationY(child));
mDrawable.setBounds(0, top, width, bottom);
mDrawable.draw(c);
break;