Created
February 27, 2015 11:02
-
-
Save SammyVimes/46b0c181ff97ac981b2b to your computer and use it in GitHub Desktop.
Deriving from CardFragment
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 MyCardFragment create(CharSequence title, CharSequence text, int iconRes) { | |
MyCardFragment fragment = new MyCardFragment(); | |
Bundle args = new Bundle(); | |
if (title != null) args.putCharSequence("CardFragment_title", title); | |
if (text != null) args.putCharSequence("CardFragment_text", text); | |
if (iconRes != 0) args.putInt("CardFragment_icon", iconRes); | |
fragment.setArguments(args); | |
return fragment; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment