set to LayoutParams.
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params.setMargins(10,10,10,10);
tv1.setLayoutParams(params);
More Related Contents:
- Create Passcode view in Android
- How to make links in a TextView clickable
- How to set the part of the text view is clickable
- Set color of TextView span in Android
- Auto-fit TextView for Android
- Put constant text inside EditText which should be non-editable – Android
- how to make a specific text on TextView BOLD
- Android selector & text color
- Android: Coloring part of a string using TextView.setText()?
- Different font size of strings in the same TextView
- Remove underline from links in TextView – Android
- Is it possible to write vertically in a textview in android?
- How to set emoji by unicode in a textview?
- How do I use a compound drawable instead of a LinearLayout that contains an ImageView and a TextView
- Android intercept paste\copy\cut on editText
- Custom cut/copy action bar for EditText that shows text selection handles
- Disabling Android O auto-fill service for an application
- auto-scrolling TextView in android to bring text into view
- Convert pixels to sp
- Android SpannableString set background behind part of text
- Change clickable TextView’s color on focus and click?
- How to add bulleted list to android application?
- textview.getLineCount always 0 in android
- Integer value in TextView
- Calculate text size according to width of text area
- Right align text in android TextView
- Android Api 23 Change Navigation View headerLayout textview
- Apply two different font styles to a TextView
- Changing font size into an AlertDialog
- Copy text from TextView on Android