use of org.fdroid.fdroid.FDroidApp in project fdroidclient by f-droid.
the class InstalledAppsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
FDroidApp fdroidApp = (FDroidApp) getApplication();
fdroidApp.applyPureBlackBackgroundInDarkTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.installed_apps_layout);
MaterialToolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
adapter = new InstalledAppListAdapter(this);
appList = (RecyclerView) findViewById(R.id.app_list);
appList.setHasFixedSize(true);
appList.setLayoutManager(new LinearLayoutManager(this));
appList.setAdapter(adapter);
emptyState = (TextView) findViewById(R.id.empty_state);
}
use of org.fdroid.fdroid.FDroidApp in project fdroidclient by f-droid.
the class InstallConfirmActivity method onCreate.
@Override
protected void onCreate(Bundle icicle) {
FDroidApp fdroidApp = (FDroidApp) getApplication();
fdroidApp.applyPureBlackBackgroundInDarkTheme(this);
super.onCreate(icicle);
intent = getIntent();
Uri uri = intent.getData();
Apk apk = ApkProvider.Helper.findByUri(this, uri, Schema.ApkTable.Cols.ALL);
app = AppProvider.Helper.findSpecificApp(getContentResolver(), apk.packageName, apk.repoId, Schema.AppMetadataTable.Cols.ALL);
appDiff = new AppDiff(this, apk);
setContentView(R.layout.install_start);
// increase dialog to full width
getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
installConfirm = findViewById(R.id.install_confirm_panel);
installConfirm.setVisibility(View.INVISIBLE);
startInstallConfirm();
}
use of org.fdroid.fdroid.FDroidApp in project fdroidclient by f-droid.
the class InstallHistoryActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
FDroidApp fdroidApp = (FDroidApp) getApplication();
fdroidApp.applyPureBlackBackgroundInDarkTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_install_history);
toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
textView = findViewById(R.id.text);
appName = getString(R.string.app_name);
Intent intent = getIntent();
if (intent != null && intent.getBooleanExtra(EXTRA_SHOW_FDROID_METRICS, false)) {
showFDroidMetricsReport();
} else {
showInstallHistory();
}
}
use of org.fdroid.fdroid.FDroidApp in project fdroidclient by f-droid.
the class SelectInstalledAppsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
FDroidApp fdroidApp = (FDroidApp) getApplication();
fdroidApp.applyPureBlackBackgroundInDarkTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.installed_apps_layout);
MaterialToolbar toolbar = findViewById(R.id.toolbar);
toolbar.setTitle(getString(R.string.panic_add_apps_to_uninstall));
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
adapter = new SelectInstalledAppListAdapter(this);
appList = findViewById(R.id.app_list);
appList.setHasFixedSize(true);
appList.setLayoutManager(new LinearLayoutManager(this));
appList.setAdapter(adapter);
emptyState = findViewById(R.id.empty_state);
}
use of org.fdroid.fdroid.FDroidApp in project fdroidclient by f-droid.
the class SwapWorkflowActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
FDroidApp fdroidApp = (FDroidApp) getApplication();
fdroidApp.setSecureWindow(this);
fdroidApp.applyPureBlackBackgroundInDarkTheme(this);
super.onCreate(savedInstanceState);
// dummy placeholder to avoid NullPointerExceptions;
currentView = new SwapView(this);
if (!bindService(new Intent(this, SwapService.class), serviceConnection, BIND_ABOVE_CLIENT | BIND_IMPORTANT)) {
Toast.makeText(this, "ERROR: cannot bind to SwapService!", Toast.LENGTH_LONG).show();
finish();
}
setContentView(R.layout.swap_activity);
toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
container = (ViewGroup) findViewById(R.id.container);
backstack.clear();
localBroadcastManager = LocalBroadcastManager.getInstance(this);
localBroadcastManager.registerReceiver(downloaderInterruptedReceiver, new IntentFilter(Downloader.ACTION_INTERRUPTED));
wifiManager = ContextCompat.getSystemService(getApplicationContext(), WifiManager.class);
wifiApControl = WifiApControl.getInstance(this);
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
new SwapDebug().logStatus();
}
Aggregations