Example usage for android.widget TextView setMinimumWidth

List of usage examples for android.widget TextView setMinimumWidth

Introduction

In this page you can find the example usage for android.widget TextView setMinimumWidth.

Prototype

public void setMinimumWidth(int minWidth) 

Source Link

Document

Sets the minimum width of the view.

Usage

From source file:com.yojiokisoft.yumekanow.activity.MainActivity.java

/**
 * ????????.//ww  w.j a v  a2 s.c o m
 * 
 * @param width
 * @param height
 * @param title
 * @return 
 */
private TextView getTabView(int width, int height, String title) {
    TextView view = new TextView(this);
    view.setMinimumWidth(width);
    view.setMinimumHeight(height);
    view.setGravity(Gravity.CENTER);
    view.setBackgroundResource(R.drawable.tab_indicator_holo);
    view.setText(title);
    return view;
}

From source file:com.android.firewall.FirewallListPage.java

private TextView getTabView(int width, int height, String title) {
    TextView view = new TextView(this);
    view.setMinimumWidth(width);
    view.setMinimumHeight(height);/* w  ww  . j a v a2 s .com*/
    view.setGravity(Gravity.CENTER);
    view.setBackgroundResource(R.drawable.tab_indicator_holo);
    view.setText(title);
    return view;
}