I know this is so easy (doh...) but I am looking for a way to run a method on tapping or clicking a TextView line of text in an Android App.
I keep thinking about button listeners and anonymous method listener calls, but it just does not seem to apply to TextView.
Can someone point me at some code snippet to show how clicking or tappin...
Hi,
I would like to set the height of a TextView to WRAP_CONTENT remotely.
How would I do that, since there is no remoteviews.setLayoutParams(viewId, param) function?
I tried remoteviews.setInt.(viewId, "setHeight", -2), but that just sets the height of the TextView to zero...
Thanks!
...
I have tried to use marquee and its not working
here is my code, please let me know where im going wrong
<TextView
android:text="lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00 | lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00"
android:id="@+id/TextView02"
android:layout_width="200dip"
android:layout_he...
Hello,
In an Android application I have a ListActivity. After creating it I have a broadcast receiver which has to disable some items in the list. So I have a pice of code ike this one:
View child = getListView().getChildAt(i);
child.setEnabled(false);
It works in the way it changes the color of the disabled views to gray. But I need...
Hi
I'm using textview objects to hold labels such as Score, Level etc on my game screen but they don't seem to be displayed where I want them to be. I understand about view hierarchies (parents, children) and am using the gravity tags in the XML layout file but it doesnt seem to have any effect.
Could someone just quickly provide a gu...
Hey everyone. I'm not big into UI programming so this may be an easy thing I overlooked. I am trying have a screen that shows 8 TextView in a 2 column x 4 row table. And, of course, I want the TextViews, that might have different lengths, to be centered. I tried this in a table layout, for obvious reasons but I feel like this is not the ...
I have a layout question.
Say I have a RelativeLayout appearing at the bottom of my screen. In this, I want to add 2 textviews, in the center, one in the top center and one in the bottom center.
|--------------------------|
| Text1 |
| Text2 |
|--------------------------|
Something like that :-...
Whoa SDK, whoa...
So I'm attempting to add an ellipse to the end of my TextView (single line) before it runs off screen. I've read that ellipses are broke (developing for 2.1)? After Google searching, everyone seems to suggest setting inputType to text and maxLines to 1 and you will get an ellipse.
There are two problems with this:
1...
Trying to have a ListView (scrollable list) of rows made of two TextViews. I have a list of items from a database that I want to populating into the LinearLayout->ListView->TextView but can't get to the id...
Layout somewhat like this instructional link, but have backed away from RelativeLayout and using LinearLayout to get it workin...
what is the difference between setHeight and setTextSize?
...
Hi
I have a large TextView. I want to select and extract particular word or some text from that.
Is it possible in Android. If yes then how
...
I have a layout that looks something like this:
[TextView 1] [TextView 2]
[ TextView 2 spill-over ]
Essentially, I need the contents of TextView 2 to wrap to the next line, but start where TextView 1 starts. I was thinking that if I knew how much text would fit into TextView 2 before it runs out of space on line one, I could take the ...
I have formatted data with commands embedded with tags. I use the HTML class to populate the TextView. Is there a way to intercept the click on the link and get what was clicked?
Html.fromHtml("<a href='CMD:Bahai'>Some Command Link</a>");
...
Hi,
I'm having issues with TextViews and centering the text within the text region. Specifically, I have a TextView, but when I have text inside that contains letters that straddle down the bottom margin (i.e. p, g, q, y, etc), those letters are getting cut-off. I'm trying to center the text within the region but haven't had much luck...
<TextView
android:layout_height="wrap_content"
android:id="@+id/LineNumberTextView"
android:hint="Number"
android:textSize="15sp"
android:layout_width="wrap_content"
android:paddingRight="10sp">
</TextView>
The above code creates a wrong view: when the text is replaced (in code) to a short (1-3 digits) numbe...
I have a TextView and I want to add a bullet symbol in my text through XML. Is it possible?
Pleas help
...
I can't call setContentView to show XML layouts - I can only get a RelativeLayout which I can programmatically modify. Now, what I need to do is add a simple TextView, aligned at the bottom of that RelativeLayout. With XML it would be as simple as:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orient...
Hi all!
How can I set the degree symbol to an TextView in Android?
...
I have a class, TextViewStyled, which extends TextView
In my theme XML, how do I apply a style to all my TextViewStyled widgets on Activities with a chosen theme?
I have this simple theme, but I want to limit the Black Gold style to TextViewStyled Widgets without specifying the Black Gold in the TextViewStyled style attribute. This is ...
I know how to center the text in the TextView and how to center the TextView inside its parent layout, but what I'm looking for is how to center a title (text centered but second line starting at the same point).
What I'm looking for is this:
| Centered |
| right! |
or this:
| Center |
Not this (text centered):
| ...