Skip to content

Instantly share code, notes, and snippets.

@Nipun2016
Last active February 9, 2018 06:05
Show Gist options
  • Save Nipun2016/ff633e42d003b6a67181ccc1ec7f847c to your computer and use it in GitHub Desktop.
Save Nipun2016/ff633e42d003b6a67181ccc1ec7f847c to your computer and use it in GitHub Desktop.
public class LocaleTextView extends TextView {
OnLocaleChangeReceiver onLocaleChangeReceiver;
String stringResId;
public LocaleTextView(Context context) {
super(context);
}
public LocaleTextView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.LocaleTextView, 0, 0);
try {
stringResId = ta.getString(0);
} finally {
ta.recycle();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment