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

Commit d4f03ec8 authored by Jason Monk's avatar Jason Monk
Browse files

Add suggestions to settings

Use an XML to define the categories that Settings will look for,
and surface enabled activities under those categories as suggestions.

When clicked on the activity will be started for result.  If the result
is not cancelled, then the operation is assumed successful and the
suggestion is disabled.  Users can also use an overflow -> remove
flow to get rid of unwanted suggestions.

Change-Id: I767abf8efe103af0509bc6b6b55888ae82643512
parent c24d3603
Loading
Loading
Loading
Loading
+17 −18
Original line number Diff line number Diff line
@@ -17,13 +17,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/category"
    android:layout_width="match_parent"
        android:layout_height="wrap_content"
    android:layout_height="@dimen/dashboard_category_height"
    android:paddingStart="@dimen/dashboard_category_padding_start"
    android:paddingEnd="@dimen/dashboard_category_padding_end"
    android:orientation="vertical"
    android:paddingBottom="8dip"
        android:background="@color/card_background"
        android:elevation="@dimen/dashboard_category_elevation" >
    android:background="@color/card_background" >

    <View
        android:layout_width="match_parent"
@@ -32,7 +31,7 @@

    <TextView android:id="@android:id/title"
        android:layout_width="match_parent"
            android:layout_height="@dimen/dashboard_category_title_height"
        android:layout_height="match_parent"
        android:paddingStart="@dimen/dashboard_category_title_margin_start"
        android:singleLine="true"
        android:ellipsize="marquee"
+1 −2
Original line number Diff line number Diff line
@@ -21,8 +21,7 @@
        android:gravity="center_vertical"
        android:minHeight="@dimen/dashboard_tile_minimum_height"
        android:clickable="true"
        android:background="@drawable/selectable_card"
        android:elevation="@dimen/dashboard_category_elevation" >
        android:background="@drawable/selectable_card" >

    <ImageView
            android:id="@android:id/icon"
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="@dimen/dashboard_category_title_height"
          android:layout_height="@dimen/dashboard_category_height"
          android:paddingStart="@dimen/search_title_padding_start"
          android:singleLine="true"
          android:ellipsize="marquee"
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="@dimen/dashboard_category_title_height"
          android:layout_height="@dimen/dashboard_category_height"
          android:paddingStart="@dimen/search_title_padding_start"
          android:singleLine="true"
          android:ellipsize="marquee"
+1 −2
Original line number Diff line number Diff line
@@ -21,8 +21,7 @@
        android:gravity="center_vertical"
        android:minHeight="@dimen/dashboard_tile_minimum_height"
        android:clickable="true"
        android:background="@drawable/selectable_card"
        android:elevation="@dimen/dashboard_category_elevation">
        android:background="@drawable/selectable_card">

    <View
            android:layout_width="@dimen/dashboard_tile_image_size"
Loading