example:
![Example of using android:singleLine Example of using android:singleLine](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIqO52Fn29-0hF9-3i4_zmdZSQq2j5Tuj5FluCmBlf8LHSrE5OP2px7XjvcNxHdE9hbtmr7ju0D8X3x2lMka1WUtWlwd2K48-mGhEi0IdjL6tW7Zx8gkYP728s7qDdixBp165RanZ2WUxr/s400/singleLine.png)
<?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"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TextView without singleLine\n - default text: abcdefghijklmnopqrstuvwxyz! "
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="TextView WITH singleLine\n - default text: abcdefghijklmnopqrstuvwxyz! "
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="EditText without singleLine\n - default text: abcdefghijklmnopqrstuvwxyz! "
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="EditText WITH singleLine\n - default text: abcdefghijklmnopqrstuvwxyz! "
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button without singleLine\n - default text: abcdefghijklmnopqrstuvwxyz! "
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="Button WITH singleLine\n - default text: abcdefghijklmnopqrstuvwxyz! "
/>
</LinearLayout>
Related Post:
- android.text.InputType
No comments:
Post a Comment