use of android.preference.PreferenceFrameLayout in project android_packages_apps_Settings by DirtyUnicorns.
the class BackgroundCheckSummary method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// initialize the inflater
mInflater = inflater;
View rootView = mInflater.inflate(R.layout.background_check_summary, container, false);
// only when the view is added.
if (container instanceof PreferenceFrameLayout) {
((PreferenceFrameLayout.LayoutParams) rootView.getLayoutParams()).removeBorders = true;
}
FragmentTransaction ft = getChildFragmentManager().beginTransaction();
ft.add(R.id.appops_content, new AppOpsCategory(AppOpsState.RUN_IN_BACKGROUND_TEMPLATE, true), "appops");
ft.commitAllowingStateLoss();
return rootView;
}
use of android.preference.PreferenceFrameLayout in project android_packages_apps_Settings by crdroidandroid.
the class CaptionPropertiesFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.captioning_preview, container, false);
// only when the view is added.
if (container instanceof PreferenceFrameLayout) {
((PreferenceFrameLayout.LayoutParams) rootView.getLayoutParams()).removeBorders = true;
}
final View content = super.onCreateView(inflater, container, savedInstanceState);
((ViewGroup) rootView.findViewById(R.id.properties_fragment)).addView(content, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
return rootView;
}
use of android.preference.PreferenceFrameLayout in project android_packages_apps_Settings by crdroidandroid.
the class ManageApplications method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// initialize the inflater
mInflater = inflater;
mRootView = inflater.inflate(R.layout.manage_applications_apps, null);
mLoadingContainer = mRootView.findViewById(R.id.loading_container);
mListContainer = mRootView.findViewById(R.id.list_container);
if (mListContainer != null) {
// Create adapter and list view here
View emptyView = mListContainer.findViewById(com.android.internal.R.id.empty);
ListView lv = (ListView) mListContainer.findViewById(android.R.id.list);
if (emptyView != null) {
lv.setEmptyView(emptyView);
}
lv.setOnItemClickListener(this);
lv.setSaveEnabled(true);
lv.setItemsCanFocus(true);
lv.setTextFilterEnabled(true);
lv.setFastScrollEnabled(true);
mListView = lv;
mApplications = new ApplicationsAdapter(mApplicationsState, this, mFilter);
if (savedInstanceState != null) {
mApplications.mHasReceivedLoadEntries = savedInstanceState.getBoolean(EXTRA_HAS_ENTRIES, false);
mApplications.mHasReceivedBridgeCallback = savedInstanceState.getBoolean(EXTRA_HAS_BRIDGE, false);
}
int userId = mIsWorkOnly ? mWorkUserId : UserHandle.getUserId(mCurrentUid);
if (mStorageType == STORAGE_TYPE_MUSIC) {
Context context = getContext();
mApplications.setExtraViewController(new MusicViewHolderController(context, new StorageStatsSource(context), mVolumeUuid, UserHandle.of(userId)));
} else if (mStorageType == STORAGE_TYPE_PHOTOS_VIDEOS) {
Context context = getContext();
mApplications.setExtraViewController(new PhotosViewHolderController(context, new StorageStatsSource(context), mVolumeUuid, UserHandle.of(userId)));
}
mListView.setAdapter(mApplications);
mListView.setRecyclerListener(mApplications);
mListView.setFastScrollEnabled(isFastScrollEnabled());
Utils.prepareCustomPreferencesList(container, mRootView, mListView, false);
}
// only when the view is added.
if (container instanceof PreferenceFrameLayout) {
((PreferenceFrameLayout.LayoutParams) mRootView.getLayoutParams()).removeBorders = true;
}
createHeader();
mResetAppsHelper.onRestoreInstanceState(savedInstanceState);
return mRootView;
}
use of android.preference.PreferenceFrameLayout in project android_packages_apps_Settings by crdroidandroid.
the class BackgroundCheckSummary method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// initialize the inflater
mInflater = inflater;
View rootView = mInflater.inflate(R.layout.background_check_summary, container, false);
// only when the view is added.
if (container instanceof PreferenceFrameLayout) {
((PreferenceFrameLayout.LayoutParams) rootView.getLayoutParams()).removeBorders = true;
}
FragmentTransaction ft = getChildFragmentManager().beginTransaction();
ft.add(R.id.appops_content, new AppOpsCategory(AppOpsState.RUN_IN_BACKGROUND_TEMPLATE, true), "appops");
ft.commitAllowingStateLoss();
return rootView;
}
use of android.preference.PreferenceFrameLayout in project android_packages_apps_Settings by SudaMod.
the class ManageApplications method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// initialize the inflater
mInflater = inflater;
mRootView = inflater.inflate(R.layout.manage_applications_apps, null);
mLoadingContainer = mRootView.findViewById(R.id.loading_container);
mListContainer = mRootView.findViewById(R.id.list_container);
if (mListContainer != null) {
// Create adapter and list view here
View emptyView = mListContainer.findViewById(com.android.internal.R.id.empty);
ListView lv = (ListView) mListContainer.findViewById(android.R.id.list);
if (emptyView != null) {
lv.setEmptyView(emptyView);
}
lv.setOnItemClickListener(this);
lv.setSaveEnabled(true);
lv.setItemsCanFocus(true);
lv.setTextFilterEnabled(true);
mListView = lv;
mApplications = new ApplicationsAdapter(mApplicationsState, this, mFilter);
if (savedInstanceState != null) {
mApplications.mHasReceivedLoadEntries = savedInstanceState.getBoolean(EXTRA_HAS_ENTRIES, false);
mApplications.mHasReceivedBridgeCallback = savedInstanceState.getBoolean(EXTRA_HAS_BRIDGE, false);
}
int userId = mIsWorkOnly ? mWorkUserId : UserHandle.getUserId(mCurrentUid);
if (mStorageType == STORAGE_TYPE_MUSIC) {
Context context = getContext();
mApplications.setExtraViewController(new MusicViewHolderController(context, new StorageStatsSource(context), mVolumeUuid, UserHandle.of(userId)));
} else if (mStorageType == STORAGE_TYPE_PHOTOS_VIDEOS) {
Context context = getContext();
mApplications.setExtraViewController(new PhotosViewHolderController(context, new StorageStatsSource(context), mVolumeUuid, UserHandle.of(userId)));
}
mListView.setAdapter(mApplications);
mListView.setRecyclerListener(mApplications);
mListView.setFastScrollEnabled(isFastScrollEnabled());
Utils.prepareCustomPreferencesList(container, mRootView, mListView, false);
}
// only when the view is added.
if (container instanceof PreferenceFrameLayout) {
((PreferenceFrameLayout.LayoutParams) mRootView.getLayoutParams()).removeBorders = true;
}
createHeader();
mResetAppsHelper.onRestoreInstanceState(savedInstanceState);
return mRootView;
}
Aggregations