简体   繁体   English

Textview在Phone.linear布局上未显示完整文本

[英]Textview not showing complete text on Phone.linear layout

i have linear layout.inside there is textview.which sometiomes contains large information. 我有线性layout.inside有textview。哪些一些包含大量信息。 on pc if run application with emulator it works fine but on phone whole text is not showing. 在PC上,如果使用模拟器运行应用程序,则可以正常运行,但在电话上不会显示整个文本。 left sided text is gone,cant c it,n only 1 line it is showing. 左侧的文本不见了,只显示了1行。 i think text wrapping is not working. 我认为文字换行不起作用。

     android:scrollHorizontally="true"

android:ellipsize="end" android:ellipsize="marquee" 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: 只需将TextView放在ScollView中即可:

<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\\ 希望这行得通\\

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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