Open abbasfisal opened 9 years ago
Up ! Need to improve the rendering of this menu ! Pls ! :-)
is it possible to change font size, reply asap really imp?
Faced the same problem. Basicly problem is that the TextView of ResideMenuItem is declared as private, and you can't access them, unless you use reflection. So what I've done, is extended ResideMenuItem and create a method setTypeface(), in which i hacked superClass to get the TextView and set the Typeface. The code of this method is below.
public void setTypeface(Typeface typeface) {
try {
// getting type of the field from superClass
Field privateTextView = ResideMenuItem.class.getDeclaredField("tv_title");
// transform this field to public
privateTextView.setAccessible(true);
// getting value from this field which is reference to a TextView
TextView tv = (TextView)privateTextView.get(this);
//finaly setting the Typface
tv.setTypeface(typeface);
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
how to extend ResideMenuItem? I got an error that "there is no default constructor available in ResideMenuItem"
how to extend ResideMenuItem? I got an error that "there is no default constructor available in ResideMenuItem"
Just override other constructors.. ` public class CustomizableResideMenuItem extends ResideMenuItem {
public CustomizableResideMenuItem(Context context) {
super(context);
}
public CustomizableResideMenuItem(Context context, int icon, int title) {
super(context, icon, title);
}
public CustomizableResideMenuItem(Context context, int icon, String title) {
super(context, icon, title);
}`
tnx for sharing your lib
how can i change the font size and the typeface of reside menu?
it possible?