textview

How to hide underbar in EditText

我的梦境 提交于 2020-01-18 11:12:09
问题 How can I hide the EditText underbar (the prompt line with little serifs at the ends)? There might be a better way to do what I want: I have a layout with an EditText. Normally, this displays fine where the user can tap on it and begin entering or editing text. Sometimes, however, I would like to use the same layout (simplifies other logic) to display the same data in a read-only manner. I want the presentation to be similar - it should have the same height and same font, but not have the

How to hide underbar in EditText

一世执手 提交于 2020-01-18 11:10:44
问题 How can I hide the EditText underbar (the prompt line with little serifs at the ends)? There might be a better way to do what I want: I have a layout with an EditText. Normally, this displays fine where the user can tap on it and begin entering or editing text. Sometimes, however, I would like to use the same layout (simplifies other logic) to display the same data in a read-only manner. I want the presentation to be similar - it should have the same height and same font, but not have the

How to hide underbar in EditText

萝らか妹 提交于 2020-01-18 11:10:20
问题 How can I hide the EditText underbar (the prompt line with little serifs at the ends)? There might be a better way to do what I want: I have a layout with an EditText. Normally, this displays fine where the user can tap on it and begin entering or editing text. Sometimes, however, I would like to use the same layout (simplifies other logic) to display the same data in a read-only manner. I want the presentation to be similar - it should have the same height and same font, but not have the

textIsSelectable not working with Edittext

时光总嘲笑我的痴心妄想 提交于 2020-01-17 08:04:02
问题 I have seen many question like this here and lots of solution but nothing is working for me. below is my EditText xml <EditText android:id="@+id/summary_edittextview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:layout_marginTop="10dp" android:lines="15" android:maxLength="1000" android:textIsSelectable="true" android:textSize="16dp" android:backgroundTint="@color/colorPrimaryDark"/> I tried

textIsSelectable not working with Edittext

…衆ロ難τιáo~ 提交于 2020-01-17 08:03:08
问题 I have seen many question like this here and lots of solution but nothing is working for me. below is my EditText xml <EditText android:id="@+id/summary_edittextview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:layout_marginTop="10dp" android:lines="15" android:maxLength="1000" android:textIsSelectable="true" android:textSize="16dp" android:backgroundTint="@color/colorPrimaryDark"/> I tried

textIsSelectable not working with Edittext

╄→гoц情女王★ 提交于 2020-01-17 08:03:01
问题 I have seen many question like this here and lots of solution but nothing is working for me. below is my EditText xml <EditText android:id="@+id/summary_edittextview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:layout_marginTop="10dp" android:lines="15" android:maxLength="1000" android:textIsSelectable="true" android:textSize="16dp" android:backgroundTint="@color/colorPrimaryDark"/> I tried

Why is each element in the table row still taking the same amount of space

寵の児 提交于 2020-01-17 05:23:06
问题 Here is what I am getting when I run my application on my device The part that I have problems with is the rows - with text, quote, and web. I dynamically inserted those rows into the scroll view at runtime. Here is my xml code that I used for layout inflating <?xml version="1.0" encoding="utf-8"?> <TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" >

TextView always showing value as “0” on UI

三世轮回 提交于 2020-01-17 02:26:08
问题 I am using a simple TextView and updating its value in onPostExecute of a AsyncTask. But every time its showing "0" on UI. My code is: TextView tv = (TextView)findViewById(R.id.tv); tv.setText(calculation()); private int calculation(){ return output; } What is going wrong here, no error comming in stack trace? please help me? 回答1: Your code tv.setText(calculation()); tryind to take string from Resourses cause you set value as int. Use tv.setText(String.valueOf(calculation())); 回答2: try this

How to word wrap the hint of a single line AutoCompleteTextView?

与世无争的帅哥 提交于 2020-01-16 14:31:51
问题 I have an AutoCompleteTextView where the user is to write in a single-line search, i.e. no line breaks are allowed. Using android:singleLine="true" allows this to work properly. However, I also wish to set a hint to display when no other text has been entered, and this text does require more than one line. My problem is that with Android 4+, the hint is not wrapped to several lines. With Android 2.3, however, the content does get wrapped and multiple lines are displayed. Users are still not

How to word wrap the hint of a single line AutoCompleteTextView?

送分小仙女□ 提交于 2020-01-16 14:31:16
问题 I have an AutoCompleteTextView where the user is to write in a single-line search, i.e. no line breaks are allowed. Using android:singleLine="true" allows this to work properly. However, I also wish to set a hint to display when no other text has been entered, and this text does require more than one line. My problem is that with Android 4+, the hint is not wrapped to several lines. With Android 2.3, however, the content does get wrapped and multiple lines are displayed. Users are still not