Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public class MySingleton extends AppCompatActivity {
  2.  
  3. private static MySingleton mInstance;
  4.  
  5. public static MySingleton getInstance() {
  6. if (mInstance == null) {
  7. mInstance = new MySingleton();
  8. }
  9. return mInstance;
  10. }
  11.  
  12. private MySingleton() {}
  13.  
  14. private Drawable getDrawable() {
  15. return getResources().getDrawable(R.drawable.ic_favorite);
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement