Search in sources :

Example 11 with FDroidApp

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);
}
Also used : MaterialToolbar(com.google.android.material.appbar.MaterialToolbar) FDroidApp(org.fdroid.fdroid.FDroidApp) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager)

Example 12 with FDroidApp

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();
}
Also used : FDroidApp(org.fdroid.fdroid.FDroidApp) Uri(android.net.Uri) Apk(org.fdroid.fdroid.data.Apk)

Example 13 with FDroidApp

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();
    }
}
Also used : FDroidApp(org.fdroid.fdroid.FDroidApp) Intent(android.content.Intent)

Example 14 with FDroidApp

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);
}
Also used : MaterialToolbar(com.google.android.material.appbar.MaterialToolbar) FDroidApp(org.fdroid.fdroid.FDroidApp) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager)

Example 15 with FDroidApp

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();
}
Also used : IntentFilter(android.content.IntentFilter) WifiManager(android.net.wifi.WifiManager) FDroidApp(org.fdroid.fdroid.FDroidApp) Intent(android.content.Intent)

Aggregations

FDroidApp (org.fdroid.fdroid.FDroidApp)16 Intent (android.content.Intent)7 MaterialToolbar (com.google.android.material.appbar.MaterialToolbar)7 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)5 IntentFilter (android.content.IntentFilter)3 View (android.view.View)3 TextView (android.widget.TextView)3 RecyclerView (androidx.recyclerview.widget.RecyclerView)3 Uri (android.net.Uri)2 TextUtils (android.text.TextUtils)2 MenuItem (android.view.MenuItem)2 ImageView (android.widget.ImageView)2 AppCompatActivity (androidx.appcompat.app.AppCompatActivity)2 Utils (org.fdroid.fdroid.Utils)2 Repo (org.fdroid.fdroid.data.Repo)2 TargetApi (android.annotation.TargetApi)1 PendingIntent (android.app.PendingIntent)1 BroadcastReceiver (android.content.BroadcastReceiver)1 ContentValues (android.content.ContentValues)1 Context (android.content.Context)1