Answers for "android"

0

android

@Override
public void onCreate() {
    super.onCreate();
    LocaleUtil.setLocale(new Locale(LocaleUtil.with(this).getPreference()));
    LocaleUtil.updateConfig(this,getBaseContext().getResources().getConfiguration());
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    LocaleUtil.setLocale(new Locale(LocaleUtil.with(this).getPreference()));
    LocaleUtil.updateConfig(this, newConfig);
}
Posted by: Guest on August-17-2021
0

android

holder.text.setTextColor(Color.RED);
Posted by: Guest on June-08-2021
0

android

textView.setTextColor(getResources().getColor(R.color.errorColor));
Posted by: Guest on June-08-2021
0

android

text.setTextColor(Color.parseColor("#FFFFFF"));
Posted by: Guest on June-08-2021
0

android

Drawable mIcon= ContextCompat.getDrawable(getActivity(), R.drawable.your_icon);
    mIcon.setColorFilter(ContextCompat.getColor(getActivity(), R.color.new_color), PorterDuff.Mode.MULTIPLY);
    mImageView.setImageDrawable(mIcon);
Posted by: Guest on June-09-2021
0

android

Inactivity, disconnecting from the service
Posted by: Guest on June-04-2021
0

android

ContextCompat.getColor(context, R.color.your_color);
Posted by: Guest on June-08-2021

Code answers related to "android"

Browse Popular Code Answers by Language