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

Commit f7748e4a authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Update zen rule type selection and view.

Separate rule type selection from naming, launch 3P UI for non-system rules.

Bug: 22977552
Change-Id: Ifbd82da2192c4aaf5f239a188a016d9e1af542d6
parent a3b0c07a
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
@@ -43,37 +43,4 @@
        android:textColor="@color/zen_rule_name_warning"
        android:text="@string/zen_mode_rule_name_warning" />

    <RadioGroup
        android:id="@+id/rule_types"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="22dp"
        android:layout_marginRight="22dp"
        android:orientation="vertical"
        android:checkedButton="@+id/rule_type_schedule" >

        <RadioButton android:id="@+id/rule_type_schedule"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/zen_schedule_rule_type_name" />

        <RadioButton android:id="@+id/rule_type_event"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/zen_event_rule_type_name" />

        <RadioButton android:id="@+id/rule_type_3"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <RadioButton android:id="@+id/rule_type_4"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <RadioButton android:id="@+id/rule_type_5"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </RadioGroup>

</LinearLayout>
+62 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:minHeight="?android:attr/listPreferredItemHeight"
              android:gravity="center_vertical"
              android:paddingEnd="?android:attr/scrollbarSize"
              android:background="?android:attr/selectableItemBackground" >

    <ImageView
            android:id="@+id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            />

    <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="15dip"
            android:layout_marginEnd="6dip"
            android:layout_marginTop="6dip"
            android:layout_marginBottom="6dip"
            android:layout_weight="1">

        <TextView android:id="@+id/title"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:singleLine="true"
                  android:textSize="16sp"
                  android:ellipsize="marquee"
                  android:textAppearance="@android:style/TextAppearance.Material.Body1"
                  android:fadingEdge="horizontal" />

        <TextView android:id="@+id/subtitle"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@id/title"
                  android:layout_alignStart="@id/title"
                  android:textSize="14sp"
                  android:textColor="?android:attr/textColorSecondary"
                  android:textAppearance="@android:style/TextAppearance.Material.Subhead"
                  android:maxLines="2"
                  android:visibility="gone" />

    </RelativeLayout>

</LinearLayout>
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scrollbarStyle="outsideOverlay"
            android:fastScrollEnabled="true"
            android:paddingStart="24dp"
            android:paddingEnd="24dp"
            android:paddingTop="20dp"
            android:paddingBottom="24dp">

    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:id="@+id/rule_container" />


</ScrollView>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -6214,6 +6214,9 @@
    <!-- [CHAR LIMIT=40] Zen mode settings: Delete rule menu option name -->
    <string name="zen_mode_delete_rule">Delete rule</string>
    <!-- [CHAR LIMIT=60] Zen mode settings: Choose rule type dialog title -->
    <string name="zen_mode_choose_rule_type">Choose rule type</string>
    <!-- [CHAR LIMIT=40] Zen mode settings: Delete rule dialog confirmation message -->
    <string name="zen_mode_delete_rule_confirmation">Delete \u201c<xliff:g id="rule" example="Weekends">%1$s</xliff:g>\u201d rule?</string>
+0 −2
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ import com.android.settings.notification.OtherSoundSettings;
import com.android.settings.notification.ZenAccessSettings;
import com.android.settings.notification.ZenModeAutomationSettings;
import com.android.settings.notification.ZenModeEventRuleSettings;
import com.android.settings.notification.ZenModeExternalRuleSettings;
import com.android.settings.notification.ZenModePrioritySettings;
import com.android.settings.notification.ZenModeSettings;
import com.android.settings.notification.ZenModeScheduleRuleSettings;
@@ -348,7 +347,6 @@ public class SettingsActivity extends Activity
            ZenModeAutomationSettings.class.getName(),
            ZenModeScheduleRuleSettings.class.getName(),
            ZenModeEventRuleSettings.class.getName(),
            ZenModeExternalRuleSettings.class.getName(),
            ProcessStatsUi.class.getName(),
            PowerUsageDetail.class.getName(),
            ProcessStatsSummary.class.getName(),
Loading