开发者

Textview not showing complete text on Phone.linear layout

开发者 https://www.devze.com 2023-03-13 14:05 出处:网络
i have linear layout.inside there i开发者_如何学编程s textview.which sometiomes contains large information.

i have linear layout.inside there i开发者_如何学编程s textview.which sometiomes contains large information. on pc if run application with emulator it works fine but on phone whole text is not showing. left sided text is gone,cant c it,n only 1 line it is showing. i think text wrapping is not working.

     android:scrollHorizontally="true"

android:ellipsize="end" android:ellipsize="marquee"

i tired this but not working

plz urgent help needed


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<EditText  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    android:id="@+id/Text1"
    />


</LinearLayout>

Try this...

You do not need to scroll your screen when using this code.


Just put the TextView in ScollView ie:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/white">
    <ScrollView android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:scrollbars="vertical"> 
        <TextView android:id="@+id/about_detail"
            android:layout_height="fill_parent"
            android:layout_width="match_parent"
            android:padding="2dp"
            android:textSize="16dp"
            android:textColor="@android:color/black"
            android:background="@color/white"/>
    </ScrollView>     
</LinearLayout>

Hope this works\

0

精彩评论

暂无评论...
验证码 换一张
取 消