List of usage examples for android.app Fragment getString
public final String getString(@StringRes int resId, Object... formatArgs)
From source file:com.android.packageinstaller.permission.ui.PermissionAppsFragment.java
private static void bindUi(Fragment fragment, PermissionApps permissionApps) { final Drawable icon = permissionApps.getIcon(); final CharSequence label = permissionApps.getLabel(); final ActionBar ab = fragment.getActivity().getActionBar(); if (ab != null) { ab.setTitle(fragment.getString(R.string.permission_title, label)); }//from www .ja va 2 s . c o m final ViewGroup rootView = (ViewGroup) fragment.getView(); final ImageView iconView = (ImageView) rootView.findViewById(R.id.lb_icon); if (iconView != null) { // Set the icon as the background instead of the image because ImageView // doesn't properly scale vector drawables beyond their intrinsic size iconView.setBackground(icon); } final TextView titleView = (TextView) rootView.findViewById(R.id.lb_title); if (titleView != null) { titleView.setText(label); } final TextView breadcrumbView = (TextView) rootView.findViewById(R.id.lb_breadcrumb); if (breadcrumbView != null) { breadcrumbView.setText(R.string.app_permissions); } }