зеркало из https://github.com/microsoft/ace.git
allow icon only tab bar button (no text)
This commit is contained in:
Родитель
ba5578f0c4
Коммит
a0fe29db3c
|
@ -144,15 +144,17 @@ public class TabBar extends android.widget.LinearLayout implements
|
|||
ll.addView(iv);
|
||||
}
|
||||
|
||||
TextView tv = new TextView(themedContext);
|
||||
LinearLayout.LayoutParams tvp = new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
tvp.gravity = Gravity.CENTER_HORIZONTAL;
|
||||
tv.setLayoutParams(tvp);
|
||||
tv.setTypeface(null, Typeface.BOLD);
|
||||
tv.setTextSize(TEXTSIZE);
|
||||
tv.setText(abb.label.toUpperCase());
|
||||
ll.addView(tv);
|
||||
if (abb.label != null) {
|
||||
TextView tv = new TextView(themedContext);
|
||||
LinearLayout.LayoutParams tvp = new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
tvp.gravity = Gravity.CENTER_HORIZONTAL;
|
||||
tv.setLayoutParams(tvp);
|
||||
tv.setTypeface(null, Typeface.BOLD);
|
||||
tv.setTextSize(TEXTSIZE);
|
||||
tv.setText(abb.label.toUpperCase());
|
||||
ll.addView(tv);
|
||||
}
|
||||
|
||||
return ll;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче