Zeeshan Ahmed
Zeeshan Ahmed

Reputation: 1

Trying to applying locale on Activity extended with Fragment Activity, Then Locale is not applying on Fragment

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);
    }
`

*This is the fragment code.*

public class StalkerMovieDetailsFragment extends DetailsSupportFragment implements Palette.PaletteAsyncListener{

 @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        }

    }

I tried to apply locale on Activity extended with the fragment. But locale not applying.

Upvotes: 0

Views: 16

Answers (0)

Related Questions