PickFragmentpublic class PickFragment extends android.app.Fragment Display pick confirmation bar, usually for selecting a directory. |
Fields Summary |
---|
public static final String | TAG | private com.android.documentsui.model.DocumentInfo | mPickTarget | private android.view.View | mContainer | private android.widget.Button | mPick | private View.OnClickListener | mPickListener |
Methods Summary |
---|
public static com.android.documentsui.PickFragment | get(android.app.FragmentManager fm)
return (PickFragment) fm.findFragmentByTag(TAG);
| public android.view.View | onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
mContainer = inflater.inflate(R.layout.fragment_pick, container, false);
mPick = (Button) mContainer.findViewById(android.R.id.button1);
mPick.setOnClickListener(mPickListener);
setPickTarget(null, null);
return mContainer;
| public void | setPickTarget(com.android.documentsui.model.DocumentInfo pickTarget, java.lang.CharSequence displayName)
mPickTarget = pickTarget;
if (mContainer != null) {
if (mPickTarget != null) {
mContainer.setVisibility(View.VISIBLE);
final Locale locale = getResources().getConfiguration().locale;
final String raw = getString(R.string.menu_select).toUpperCase(locale);
mPick.setText(TextUtils.expandTemplate(raw, displayName));
} else {
mContainer.setVisibility(View.GONE);
}
}
| public static void | show(android.app.FragmentManager fm)
final PickFragment fragment = new PickFragment();
final FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.container_save, fragment, TAG);
ft.commitAllowingStateLoss();
|
|