Questions tagged [settext]

The concept of assigning text to a UI element

The concept of assigning text to a UI element.

Does not specifically refer to a programming language-specific or library-specific API but the general concept.

793 questions
10
votes
8 answers

Android setText / R.string / values

I am having trouble with setting text in a text view with format and multiple values. holder.car.setText(R.string.mycar + lm.getCarName() + R.string.year + lm.getYear()); this is giving me " 2143545 Camero 2143213 1977 " I have tried few other…
S Arumik
  • 633
  • 2
  • 10
  • 21
9
votes
2 answers

Android setting with TextView for Hebrew text?

I am setting text in TextView from string resource. Normally, Hebrew works in Right-To-Left format. When I set a text, it sets the text Right-To-Left format in LG, Samsung, Sony Phone but in HTC it does not work. It works in Left-To-Right format in…
user744881
9
votes
2 answers

How to update a UILabel in Xcode programmatically without XIB files?

I'm stuck :( In my application I require an update from CLLocationManager every time it gets an update to a new position. I am not using XIB/NIB files, everything I coded I have done programmatically. To the code: the .h @interface…
dcrawkstar
  • 505
  • 1
  • 5
  • 11
8
votes
1 answer

android-TextView setText in Html.fromHtml to display image and text

I try to display the text and image in Html.fromHtml() but it is doesn't work in image display. message = (TextView) findViewById (R.id.message); message.setText(Html.fromHtml( "

First,
" + "Please press the" + "

user2274349
  • 415
  • 2
  • 5
  • 12
8
votes
5 answers

setText doesn't set text to EditText

I'm having a problem that I've never had before in almost three years of developing with Android... I want to take a picture and after the picture is taked, the EditTexts of the activity become clear. What I'm doing is set the values of the EditText…
anonymous
  • 1,320
  • 5
  • 21
  • 37
8
votes
2 answers

Set text of spinner before item is selected

I have a spinner with three items and I use an XML string-array resource to feed it. When you open an activity the spinner normally shows the first item that's in the array list. I'd like to change that and show the text "Select one" in the spinner,…
JohnD
  • 201
  • 2
  • 4
  • 12
6
votes
3 answers

How to set view or Activity for dealing with previous listactivity? for example "see full detail page"

This is my ListActivity after clicking on the list it will start a new activity which shows Full detail of each attraction place. I have no idea how to implement Full detail page. Can you guys show me some code of full detail activity which…
6
votes
4 answers

Swing/Java: How to use the getText and setText string properly

I'm trying to make input nameField appear in a Label called label1 after a Button called button1 is clicked. Right now it says: 'txt' and I understand why. But I don't know how I can use the string! Can anyone explain me what I'm doing wrong and how…
Opoe
  • 1,337
  • 8
  • 30
  • 56
5
votes
2 answers

Changing tab text in a Honeycomb Action Bar tab after it has been created

I'm trying to get use to Android Honeycomb by creating a simple text editing application which utilizes the Action Bar and tabs. I am running into an annoying issue though. After a tab has been created and added to the Action Bar I would like to…
5
votes
1 answer

Supported html tags on Android TextView

I need an official list of supported HTML tags on Android TextView. I'm using textView.setText(Html.fromHtml(label)); but I don't know which tags are supported.
Giovesoft
  • 580
  • 6
  • 21
5
votes
2 answers

How to Dynamically set text to TextView?

I want to display the connected ssid and ip address when the activity starts. It contais an image view (for title, because i'm not using the action bar) and 4 text view (ssid label, ssid value, ipaddr label, and ipaddr value) I've tested the codes…
grayfield
  • 129
  • 1
  • 1
  • 8
5
votes
3 answers

UITextView setText should not jump to top in ios8

Following iOS 8 code is called every second: - (void)appendString(NSString *)newString toTextView:(UITextView *)textView { textView.scrollEnabled = NO; textView.text = [NSString stringWithFormat:@"%@%@%@", textView.text, newString, @"\n"]; …
5
votes
1 answer

How to position the cursor in AutoCompleteTextView

In My app I'm using AutoCompleteTextView. When the user select a result item, one of the option is inserting the selected text into the AutoCompleteTextView. After inserting text, the cursor returns to the initial position. How can i position it in…
eyal
  • 2,379
  • 7
  • 40
  • 54
5
votes
6 answers

setText on a TextView will overwrite previous text

I have a text view that is by itself as part of a linear layout. The XML is: In the main program…
Craig Roll
  • 106
  • 1
  • 5