Search in sources :

Example 6 with MaterialToolbar

use of com.google.android.material.appbar.MaterialToolbar 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 7 with MaterialToolbar

use of com.google.android.material.appbar.MaterialToolbar in project fdroidclient by f-droid.

the class CalculatorActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    FDroidApp fdroidApp = (FDroidApp) getApplication();
    fdroidApp.applyPureBlackBackgroundInDarkTheme(this);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_calculator);
    MaterialToolbar toolbar = findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    textView = (TextView) findViewById(R.id.textView);
}
Also used : MaterialToolbar(com.google.android.material.appbar.MaterialToolbar) FDroidApp(org.fdroid.fdroid.FDroidApp)

Aggregations

MaterialToolbar (com.google.android.material.appbar.MaterialToolbar)7 FDroidApp (org.fdroid.fdroid.FDroidApp)7 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)4 Intent (android.content.Intent)2 MenuItem (android.view.MenuItem)2 View (android.view.View)2 TextView (android.widget.TextView)2 Repo (org.fdroid.fdroid.data.Repo)2 TargetApi (android.annotation.TargetApi)1 BroadcastReceiver (android.content.BroadcastReceiver)1 ContentValues (android.content.ContentValues)1 Context (android.content.Context)1 DialogInterface (android.content.DialogInterface)1 IntentFilter (android.content.IntentFilter)1 Cursor (android.database.Cursor)1 Uri (android.net.Uri)1 NdefMessage (android.nfc.NdefMessage)1 NfcAdapter (android.nfc.NfcAdapter)1 Build (android.os.Build)1 Bundle (android.os.Bundle)1