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

Commit c744aaab authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Fix IMEI is not selectable

By settings textIsSelectable = true

Also unify all the similar logic into @style/device_info_dialog_value

Fix: 305248578
Test: manual - on About phone page
Change-Id: Iaa6b4ab45067a01106367de3b8d81d5df51bd6dc
parent 89a3f9b1
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@
    android:orientation="vertical">
    android:orientation="vertical">


    <TextView
    <TextView
        style="@style/device_info_dialog_value"
        style="@style/DeviceAudioSharingText"
        android:id="@+id/share_audio_subtitle1"
        android:id="@+id/share_audio_subtitle1"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="wrap_content"
@@ -31,7 +31,7 @@
        android:layout_gravity="center"/>
        android:layout_gravity="center"/>


    <TextView
    <TextView
        style="@style/device_info_dialog_value"
        style="@style/DeviceAudioSharingText"
        android:id="@+id/share_audio_subtitle2"
        android:id="@+id/share_audio_subtitle2"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="wrap_content"
+1 −2
Original line number Original line Diff line number Diff line
@@ -27,8 +27,7 @@
        style="@style/device_info_dialog_value"
        style="@style/device_info_dialog_value"
        android:id="@+id/esim_id_value"
        android:id="@+id/esim_id_value"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_height="wrap_content" />
        android:textIsSelectable="true" />


    <ImageView
    <ImageView
        android:id="@+id/esim_id_qrcode"
        android:id="@+id/esim_id_qrcode"
+9 −0
Original line number Original line Diff line number Diff line
@@ -433,6 +433,15 @@
        <item name="android:textSize">14sp</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:paddingBottom">24dp</item>
        <item name="android:paddingBottom">24dp</item>
        <item name="android:textIsSelectable">true</item>
    </style>

    <style name="DeviceAudioSharingText">
        <item name="android:textAlignment">viewStart</item>
        <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:paddingBottom">24dp</item>
    </style>
    </style>


    <style name="ContextualCardStyle">
    <style name="ContextualCardStyle">
+0 −4
Original line number Original line Diff line number Diff line
@@ -111,10 +111,7 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
            Log.d(TAG, "Fragment not attached yet.");
            Log.d(TAG, "Fragment not attached yet.");
            return;
            return;
        }
        }
        setText(viewId, text, true);
    }


    public void setText(int viewId, CharSequence text, boolean enableCopy) {
        final TextView textView = mRootView.findViewById(viewId);
        final TextView textView = mRootView.findViewById(viewId);
        if (textView == null) {
        if (textView == null) {
            return;
            return;
@@ -125,6 +122,5 @@ public class SimStatusDialogFragment extends InstrumentedDialogFragment {
            text = PhoneNumberUtil.expandByTts(text);
            text = PhoneNumberUtil.expandByTts(text);
        }
        }
        textView.setText(text);
        textView.setText(text);
        textView.setTextIsSelectable(enableCopy);
    }
    }
}
}