This is the code where I applied Locale in Activity. Leanback is used in this fragment.
`public class M3uMovieDetailsPage extends FragmentActivity {
Fragment fragment;
public ImageView background_image;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_m3umoviesdetailspage);
}
@Override
protected void attachBaseContext(Context newBase) {
LocaleHelper.setLocale(newBase, Constants.selected_language);
super.attachBaseContext(newBase);
}
`
I tried to apply locale on Activity extended with fragment. But locale not applying.
New contributor
Zeeshan Ahmed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.