Reputation: 41
I have look to a lot of tutorial to how to adjust a textView but i don't really a understand how?
i am using a simple Activity that have a TextView that i went it to be the bigger as possible That is the class
public class Zoom extends Activity
{
private String productName;
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.zoom);
Intent intent = getIntent();
productName = intent.getStringExtra("ChoosenMed");
TextView productNameTextView=(TextView)findViewById(R.id.prodcutNameZoomTextView);
productNameTextView.setText(productName);
}
}
Now what i went is to adjust the productNameTextView to fit the screen each time when i use this activity, like when the word its big the text will be smaller then when the word its smaller.
Thank for helping
Upvotes: 1
Views: 2934
Reputation: 1
try some thing like this android:layout_height="80dp"
u can keep changing the dp to get the required TextView size same to layout_width="70dp" hope this answers your question
Upvotes: 0
Reputation: 54322
Did you try android:textSize=100dip
this will increase your text size.
If you want your TextView size to be increased, try providing the layout_width and layout_height in some dip value. This should work
Upvotes: 1