package com.qiyou.mb.android.utils;

import android.content.Context;
import android.graphics.Color;
import android.view.Gravity;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class TextDrawableViewKm extends LinearLayout{
	private final String TAG = "TextDrawableView";
	TextView tv = null;
	ImageView iv = null;
	public TextDrawableViewKm(Context context, String text) {
		super(context);
		this.setOrientation(VERTICAL);
		tv = new TextView(context);
		tv.setText(text);
		tv.setTextSize(12);   
		tv.setGravity(Gravity.CENTER);
 		tv.setPadding(0, 5, 0,0);
 		 
		 
		this.addView(tv, new LayoutParams(-1, -1));
	}

	
	public void reWriteText(String text){
		tv.setText(text);
	}
	
	public String getText(){
		return tv.getText().toString();
	}

	public void setBackGround(int background){
		tv.setBackgroundResource(background);
	}
	public void setTextColor(int color){
		tv.setTextColor(color);
	}
	public void setBackgroundColor(int color){
		tv.setBackgroundColor(color);
	}
}
