Last active
February 9, 2018 06:03
-
-
Save Nipun2016/a313d9a884356a64ac53e4e9b2047d9f 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 static class OnLocaleChangeReceiver extends BroadcastReceiver{ | |
com.hypersoft.walletapp.ui.customviews.LocaleTextView v; | |
public void setTextView(com.hypersoft.walletapp.ui.customviews.LocaleTextView v){ | |
this.v = v; | |
} | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
//Utility.debugger("onReceive called "+v); | |
if(v != null && v.getStringResId() != null && !v.getStringResId().equalsIgnoreCase("")){ | |
Utility.debugger("String "+context.getResources().getString(v.getResources().getIdentifier(v.getStringResId(), "string", context.getPackageName()))); | |
v.setText(v.getResources().getIdentifier(v.getStringResId(), "string", context.getPackageName())); | |
}else{ | |
if(v != null){ | |
v.invalidate(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment