use of com.amaze.filemanager.ui.provider.UtilitiesProvider in project AmazeFileManager by TeamAmaze.
the class AppsListFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
final MainActivity mainActivity = (MainActivity) getActivity();
Objects.requireNonNull(mainActivity);
UtilitiesProvider utilsProvider = mainActivity.getUtilsProvider();
modelProvider = new AppsAdapterPreloadModel(this, false);
ViewPreloadSizeProvider<String> sizeProvider = new ViewPreloadSizeProvider<>();
preloader = new RecyclerViewPreloader<>(GlideApp.with(this), modelProvider, sizeProvider, GlideConstants.MAX_PRELOAD_APPSADAPTER);
linearLayoutManager = new LinearLayoutManager(getContext());
updateViews(mainActivity, utilsProvider);
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
isAscending = sharedPreferences.getBoolean(PREFERENCE_APPLIST_ISASCENDING, true);
sortby = sharedPreferences.getInt(PREFERENCE_APPLIST_SORTBY, 0);
fastScroller = rootView.findViewById(R.id.fastscroll);
fastScroller.setPressedHandleColor(mainActivity.getAccent());
fastScroller.setRecyclerView(getRecyclerView(), 1);
mainActivity.getAppbar().getAppbarLayout().addOnOffsetChangedListener((appBarLayout, verticalOffset) -> {
fastScroller.updateHandlePosition(verticalOffset, 112);
});
LoaderManager.getInstance(this).initLoader(ID_LOADER_APP_LIST, null, this);
}
use of com.amaze.filemanager.ui.provider.UtilitiesProvider in project AmazeFileManager by TeamAmaze.
the class AppConfig method onCreate.
@Override
public void onCreate() {
super.onCreate();
AppCompatDelegate.setCompatVectorFromResourcesEnabled(// selector in srcCompat isn't supported without this
true);
instance = this;
CustomSshJConfig.init();
explorerDatabase = ExplorerDatabase.initialize(this);
utilitiesDatabase = UtilitiesDatabase.initialize(this);
utilsProvider = new UtilitiesProvider(this);
utilsHandler = new UtilsHandler(this, utilitiesDatabase);
runInBackground(Config::registerSmbURLHandler);
// disabling file exposure method check for api n+
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
}
Aggregations