fun Fragment.getStringSafe(@StringRes resId: Int): String?
Returns string with specified resource identifier, or null if the fragment isn't attached to an activity.
fun Fragment.getStringSafe(@StringRes resId: Int, vararg args: Any?): String?
Returns string with specified resource identifier and format arguments, or null if the fragment isn't attached to an activity.