Saturday, 16 June 2012

Text bold in android


Text bold in android(Bold pgm in lap)

package com.bold;

import android.app.Activity;

import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;

public class BoldActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView tv = new TextView(this);
        tv.setText(Html.fromHtml("<b> Html View hi i did it not too tough " + "</b><br>Hello, Android hi how r u"));
        //ab.setMessage(Html.fromHtml("<b><font color=#ff0000> Html View " +"</font></b><br>Androidpeople.com"));
     
     
        setContentView(tv);
    }
}

No comments:

Post a Comment

Pass a HashMap from Angular Client to Spring boot API

This example is for the case where fileData is very huge and in json format   let map = new Map<string, string>()      map.set(this.ge...