textview

Save NSTextView in NSMutableArray and read it

Hi Everyone! My question is the following, I have an NSTextView and I want to do 2 things : First save this textview in an NSMutableArray and assign a X,Y position to it in this array. Secondly, get this textview from the NSMutableArray and display it at the position I've set when I saved it in the array. Anyone have an idea of ho...

How to nicely scale a background image of a TextView for Android

Hi stackies, I'm battleing with extending a TextView for my Android app. I'd like to create "bubbles" to display text messages in a conversation, similar to the native iPhone SMS conversations. Is there a way to implement the resizing of a background image without just stretching it? I'd like to have a single background image that kee...

set font at runtime, Textview

hi all, How to set font to textview, which is created at runtime,? i created tectview Textview tv = new TextView(this); tv.setTextSize(20); like Size i want to set font style to "Verdana". How to do this?? regards shishir ...

Click TextView and Changing the Text

I am making my TextView clickable and want the text to change as I click on it. So the TextView starts out saying "Al" and when its clicked I want it to change to say, let just say "Hi" for now. And then also go back when clicked again. Here is my code. package table.periodic; import android.app.Activity; import android.conten...

textview Inset setting

Hi All ! We all know that in interfacebuilder you can set an inset to an NSTextView. But in my case I needed to create it programaticly whitch is ok but I cannot find a way to define an Inset for the text so it's always on the top left corner of my textview and as I have a background picture for this textview I would like the text to be...

how to put a border around an android textview

Is it possible to draw a border around a textview? ...

auto-scrolling TextView in android to bring text into view

I have a TextView that I'm dynamically adding text to. in my main.xml file I have the properties set to make my max lines 19 and scrollbars vertical. in the .java file I am using textview.setMovementMethod(new ScrollingMovementMethod()); to allow for scrolling. The scrolling works great. As soon as 19 lines are taken up, and more lin...

dynamically adding a view to activity layout

I have a custom view (an extension of a TextView) that I want to dynamically add to my Layout (don't want to include it in the main.xml file). The book says to fetch the RelativeLayout using findViewById() in my java code then create a new instance of my custom view, then use addView on the RelativeLayout to add the new view. I'm not g...

How to dynamically set textview height android

Hi all, In my application I need to set dynamic text to my textview so I want it to get resized dynamically. I have set: <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="normal" android:text="Frontview" android:layout_weight="1" android:gravity="center_v...

Copying text from a textview

Looking at the source of TextView (Android 2.2 version), it seems that copying from a textview is supported (Source). Anyone know how I can enable this in a TextView? ...

textview.getLineCount always 0 in android

Hi all, I'm trying to dynamically resize my textview but getlinecount() method always returns me 0 even after settext() and invalidate(). I'm using the following code: if(convertView == null){ convertView = lInflater.inflate(R.layout.listview, null); holder = new ViewHolder(); holder.text2 = ...

TextView inside LinearLayout stretches the LinearLayout and fill_parent fix causes weight flip

If I have 2 LinearLayouts split %50/%50 everything is fine. Weights are 1 and 1. As soon as I add a TextView inside the top LinearLayout, it stretches that layout. I use "wrap_content" as the documentation says I should when it comes to weights. As you can see the red and green should be split evenly and text on grey background should...

android ListView replacement for ScrollView

I have a complex layout file with many TextView's and EditText's placed on the canvas. The layout needs to be a ScrollView in order to properly work for the user. The problem is that 2 fields should really be ListView's with all the formatting that comes with them. Neither of these lists will be more then 10 lines long. I am currentl...

Android TextView and how to determine the number of visible characters

How can I determine the number of visible characters that a TextView can display. For example if I change the orientation this number may change. If I change the resolution then also the number of visible characters changes. Thanks in advance ...

Does anybody know how to justify a textview content in a ANDROID layout ???

I have been playing with android:gravity attribut but still cannot make my text content justify in the textview. Does anybody know if it is supported ? Is there a way ? Anybody succeeded ? ...

Cursor not highlighting buttons etc.

I'm trying to customize my buttons in my view a bit and give them my own look. Whenever I set a picture as a background so that the button looks different though, I seem to lose my cursor. I can use my trackball to go through the items still but when I come to one of my custom buttons the cursor does not show. I have the same problem wit...

How to place textview on right and left of layout?

I want to place a textview on the right of a layout and on the left of a layout, but they keep stacking ontop of each other: <LinearLayout android:layout_width="0dip" android:layout_weight="1" android:layout_height="fill_parent" android:orientation="horizontal"> <TextView android:id="@+id/left...

How to create column-like layout for ListView rows?

I have a relative layout which looks like this: Here is the code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/nameText" android:lay...

New Line character \n not displaying properly in textView Android

I know that if you do something like myTextView.setText("This is on first line \n This is on second line"); Then it will display properly like this: This is on first line This is on second line When I store that string in a database and then set it to the view it displays as such: This is on first line \n This is on second...

where i put html content in android to view.

I have parse the url and i get the html contents i want to show that content as a web page then what can i do to show that html contents. I am using textView then it shows same html content with tags. I have following html content which i want to display in webView. It displays only **// Please** but its original output is not this...