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

Commit cb2064ab authored by Jay Aliomer's avatar Jay Aliomer Committed by Automerger Merge Worker
Browse files

Merge "Image inline reply" into sc-dev am: f99023b5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14096492

Change-Id: I75ab1e1ee3f05c63496687a70dd07becc4f7c3e3
parents cdb8de2a f99023b5
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2021 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.
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <size android:height="48dp"
        android:width="48dp" />
    <solid android:color="@android:color/transparent" />
    <corners android:radius="4dp"></corners>
</shape>
+23 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2021 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    android:shape="oval">
    <size android:height="24dp"
        android:width="24dp" />
    <solid android:color="#FFFFFF" />
</shape>
+68 −21
Original line number Diff line number Diff line
@@ -22,18 +22,64 @@
        android:id="@+id/remote_input"
        android:layout_height="match_parent"
        android:layout_width="match_parent">
    <LinearLayout
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:id="@+id/remote_input_content"
        android:orientation="vertical"
        android:clipToPadding="false"
        android:layout_marginEnd="20dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="16dp"
        android:layout_weight="1">
        <FrameLayout
            android:id="@+id/remote_input_content_container"
            android:layout_marginTop="-6dp"
            android:layout_height="60dp"
            android:layout_width="60dp"
            android:layout_marginStart="4dp"
            android:layout_marginBottom="12dp"
            android:visibility="gone"
            android:layout_gravity="center_vertical">
            <ImageView
                android:id="@+id/remote_input_attachment_image"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="start|bottom"
                android:clipToOutline="true"
                android:background="@drawable/rounded_rect_background"
                android:scaleType="centerCrop" />
            <ImageView
                android:id="@+id/remote_input_delete_bg"
                android:paddingStart="24dp"
                android:paddingBottom="24dp"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="end|top"
                android:src="@drawable/thumbnail_delete_btn_bg"/>
            <ImageView
                android:id="@+id/remote_input_delete"
                android:paddingTop="3dp"
                android:paddingEnd="3dp"
                android:paddingStart="27dp"
                android:paddingBottom="27dp"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="end|top"
                android:src="@drawable/ic_close"
                android:contentDescription="@string/notif_inline_reply_remove_attachment_description"/>
        </FrameLayout>

        <view class="com.android.systemui.statusbar.policy.RemoteInputView$RemoteEditText"
                android:id="@+id/remote_input_text"
                android:layout_height="wrap_content"
            android:layout_width="0dp"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:paddingTop="2dp"
            android:paddingStart="16dp"
                android:paddingStart="4dp"
                android:paddingBottom="4dp"
                android:paddingEnd="12dp"
            android:layout_marginLeft="16dp"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="16dp"
                android:layout_gravity="start|center_vertical"
                android:textAppearance="?android:attr/textAppearance"
                android:textColor="@color/remote_input_text"
@@ -44,6 +90,7 @@
                android:ellipsize="start"
                android:inputType="textShortMessage|textMultiLine|textAutoCorrect|textCapSentences"
                android:imeOptions="actionSend|flagNoExtractUi|flagNoFullscreen" />
    </LinearLayout>

    <FrameLayout
            android:layout_width="wrap_content"
+2 −1
Original line number Diff line number Diff line
@@ -2096,7 +2096,8 @@
    <string name="keyboard_key_num_lock">Num Lock</string>
    <!-- Name used to refer to keys on the numeric pad of the keyboard, e.g. "Numpad 9". -->
    <string name="keyboard_key_numpad_template">Numpad <xliff:g id="name">%1$s</xliff:g></string>

    <!-- Content description for the delete button on an image attachment when using inline reply via notification [CHAR LIMIT=NONE] -->
    <string name="notif_inline_reply_remove_attachment_description">Remove attachment</string>
    <!-- User visible title for the system-wide keyboard shortcuts list. -->
    <string name="keyboard_shortcut_group_system">System</string>
    <!-- User visible title for the keyboard shortcut that takes the user to the home screen. -->
+7 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.statusbar.notification.row;
import android.annotation.ColorInt;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.view.View;

@@ -93,14 +94,16 @@ public class FooterView extends StackScrollerDecorView {
    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        int textColor = getResources().getColor(R.color.notif_pill_text);
        Resources.Theme theme = getContext().getTheme();
        mDismissButton.setBackground(
                getResources().getDrawable(R.drawable.notif_footer_btn_background));
        mDismissButton.setTextColor(getResources().getColor(R.color.notif_pill_text));
                getResources().getDrawable(R.drawable.notif_footer_btn_background, theme));
        mDismissButton.setTextColor(textColor);
        mManageButton.setBackground(
                getResources().getDrawable(R.drawable.notif_footer_btn_background));
        mManageButton.setTextColor(getResources().getColor(R.color.notif_pill_text));
                getResources().getDrawable(R.drawable.notif_footer_btn_background, theme));
        mManageButton = findViewById(R.id.manage_text);
        mDismissButton.setText(R.string.clear_all_notifications_text);
        mManageButton.setTextColor(textColor);
        mDismissButton.setContentDescription(
                mContext.getString(R.string.accessibility_clear_all));
        showHistory(mShowHistory);
Loading