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

Commit 9813fab6 authored by Lyn Han's avatar Lyn Han
Browse files

Education view for collapsed stack; fix rtl text

- new view for stack education (similar to ManageEducationView)
- lazy init both stack and manage menu edu

fix rtl text
- set textAlignment to viewStart
- set TextView gravity to start in xml

Bug: 161939484

Test: force stack/manage edu to show, press both buttons, force rtl,
press both buttons again, change theme, change orientation, keep using
bubbles normally, no regressions

Test: don't force edu views to show; let them show once; reboot phone,
use bubbles normally (without edu views added to stack), no NPEs

Change-Id: Ia67001aef40f76d7161cc263f961375738f97939
parent ecfbd9b3
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
  ~ limitations under the License.
  -->
<LinearLayout
    android:id="@+id/stack_education_layout"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/user_education_view"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:paddingTop="48dp"
@@ -25,26 +25,29 @@
    android:paddingEnd="16dp"
    android:layout_marginEnd="24dp"
    android:orientation="vertical"
    android:background="@drawable/bubble_stack_user_education_bg">

    android:background="@drawable/bubble_stack_user_education_bg"
    >
    <TextView
        android:id="@+id/user_education_title"
        android:id="@+id/stack_education_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingBottom="16dp"
        android:fontFamily="@*android:string/config_bodyFontFamilyMedium"
        android:maxLines="2"
        android:ellipsize="end"
        android:gravity="start"
        android:textAlignment="viewStart"
        android:text="@string/bubbles_user_education_title"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Headline"/>

    <TextView
        android:id="@+id/user_education_description"
        android:id="@+id/stack_education_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:gravity="start"
        android:textAlignment="viewStart"
        android:text="@string/bubbles_user_education_description"
        android:fontFamily="@*android:string/config_bodyFontFamily"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"/>

</LinearLayout>
+62 −62
Original line number Diff line number Diff line
@@ -14,15 +14,12 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<com.android.systemui.bubbles.ManageEducationView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/manage_education_view"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
        android:id="@+id/manage_education_view"
    android:clickable="true"
    android:paddingTop="28dp"
    android:paddingBottom="16dp"
@@ -42,6 +39,8 @@
        android:fontFamily="@*android:string/config_bodyFontFamilyMedium"
        android:maxLines="2"
        android:ellipsize="end"
        android:gravity="start"
        android:textAlignment="viewStart"
        android:text="@string/bubbles_user_education_manage_title"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Headline"/>

@@ -54,6 +53,8 @@
        android:text="@string/bubbles_user_education_manage"
        android:maxLines="2"
        android:ellipsize="end"
        android:gravity="start"
        android:textAlignment="viewStart"
        android:fontFamily="@*android:string/config_bodyFontFamily"
        android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"/>

@@ -87,4 +88,3 @@
            />
    </LinearLayout>
</LinearLayout>
</com.android.systemui.bubbles.ManageEducationView>
+85 −198

File changed.

Preview size limit exceeded, changes collapsed.

+63 −35

File changed.

Preview size limit exceeded, changes collapsed.

+134 −0

File added.

Preview size limit exceeded, changes collapsed.