Android: Sugerencia EditText en una sola línea
Para establecer la Línea Única en EditText
usamos android:singleLine="true"
pero quiero establecer la línea única para el Texto de Sugerencia, es grande y quiero mostrarlo en una línea como:
Estoy usando el siguiente código:
<EditText android:id="@+id/editText1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/defaultUrl"
android:singleLine="true" />
Nota: defaultUrl
es una URL dinámica y muy larga.
21
2 answers
Puede usar
android:ellipsize="end"
android:maxLines="1"
Para mostrar su texto de sugerencia en una sola línea, pero no podrá ver todo el texto porque
android:ellipsize="end"
trunca el texto al final.
49
Author: Vikas Patidar,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-02-02 06:27:23
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-02-02 06:27:23
Puede intentar usar
android:maxLines="1"
-1
Author: amiekuser,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-02-02 05:51:54
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-02-02 05:51:54