Last active
February 9, 2018 06:05
-
-
Save Nipun2016/ff633e42d003b6a67181ccc1ec7f847c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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