【问题标题】:Text overflows on an EditTextPreferenceEditTextPreference 上的文本溢出
【发布时间】:2013-07-28 02:19:18
【问题描述】:

对不起,如果这是另一个基本问题,但我很难解决这个问题......

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" 

    <EditTextPreference android:negativeButtonText="Cancel" 
        android:dialogMessage="@string/SettingChangeListOrder"
        android:dialogTitle="Change the order of the list" 
        android:positiveButtonText="Save"
        android:defaultValue="1,2,3,4"      
        android:key="MAINLISTorder" 
        android:title="Change list order"
        android:summary="@string/SCLsummary"/>

</PreferenceScreen> 

字符串 SCLsummary 和 SettingChangeListOrder 有点长。在 android 4.1(模拟器)中,它看起来如预期,当文本不适合一行时,它会在另一行中继续。但是在 android 2.3.6 上,无论文本是 1 个字符还是 1k 个字符,它都只显示在一行中,所以只能读取 3 个或 4 个单词,我该如何解决这个问题?我尝试在字符串中添加 /n 乘数,但它没有用,我的意思是,也许它有效......但另一行在 EditText 下,所以它毫无价值

【问题讨论】:

    标签: android android-preferences preferenceactivity edittextpreference


    【解决方案1】:

    请参阅https://stackoverflow.com/a/2615650/6391 看起来您必须创建自己的自定义首选项。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-02-07
      • 2011-11-18
      • 2014-05-22
      • 1970-01-01
      • 1970-01-01
      • 2014-10-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多