简体   繁体   中英

Some text disappears when view is focussed and accessibility is ON

I have one textview in custom titlebar.In titlebar i am displaying a textview which is responsible to show the title of the page.

Below is the code i am using

Activity:

getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
                    R.layout.custom_title_layout);

Layout file:

<RelativeLayout 
 xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="200dp"
    android:background="@color/red"
    >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:ellipsize="end"
            android:maxLines="2"
            android:layout_marginTop="5dp"
            android:layout_marginRight="5dp"
            android:layout_marginLeft="5dp"
            android:layout_marginBottom="5dp"
            android:paddingBottom="5dp"
            android:text="Test Content Transfer"
            android:textColor="#FFFFFF"
            android:textSize="25sp" />
</RelativeLayout>
 - - - - - - -
 - - - - - - - 

</RelativeLayout>

Change the fount size to huge and open the app, note that application is displaying the "title" view as "Test Content Tra..." (Observed that ... was present here) .

When user enable accessibility (Talkback) ON and select the "title" it shows the border around the view this is as expected, at this movement when the focus moves to another view of the same screen(here "title" lost the focus and other view is now active) the "title" view text is displaying as "Test Content" and "Transfer" word is missing here.

This is happening on some devices only where the resolution was low.

Any idea on this?.

This is only happening in samsung devices in recent version( I have faced this in android O).

Nothing extra need to done from developer side. It is a samsung OEM issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM