adapt activities to edge-to-edge

This commit is contained in:
adbenitez 2025-08-16 02:10:02 +02:00
parent 5faea5e40a
commit 396ed14067
40 changed files with 203 additions and 61 deletions

View file

@ -77,6 +77,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredActionBarA
//noinspection ConstantConditions
this.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
if (icicle == null) {
initFragment(R.id.fragment, new ApplicationPreferenceFragment());

View file

@ -33,6 +33,7 @@ public class BlockedContactsActivity extends PassphraseRequiredActionBarActivity
setContentView(R.layout.activity_blocked_contacts);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle(R.string.pref_blocked_contacts);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
initFragment(R.id.fragment, new BlockedAndShareContactsFragment(), getIntent().getExtras());
}

View file

@ -920,6 +920,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
supportActionBar.setCustomView(R.layout.conversation_title_view);
supportActionBar.setDisplayShowCustomEnabled(true);
supportActionBar.setDisplayShowTitleEnabled(false);
supportActionBar.setElevation(0); // TODO: use custom toolbar instead
Toolbar parent = (Toolbar) supportActionBar.getCustomView().getParent();
parent.setPadding(0,0,0,0);

View file

@ -23,6 +23,7 @@ public class ConversationListArchiveActivity extends PassphraseRequiredActionBar
protected void onCreate(Bundle icicle, boolean ready) {
setContentView(R.layout.activity_conversation_list_archive);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
if (isRelayingMessageContent(this)) {
getSupportActionBar().setTitle(isSharing(this) ? R.string.chat_share_with_title : R.string.forward_to);
getSupportActionBar().setSubtitle(R.string.chat_archived_label);

View file

@ -76,6 +76,7 @@ public class CreateProfileActivity extends BaseActionBarActivity {
getSupportActionBar().setTitle(R.string.pref_profile_info_headline);
getSupportActionBar().setDisplayHomeAsUpEnabled(!this.fromWelcome);
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
attachmentManager = new AttachmentManager(this, () -> {});
avatarChanged = false;

View file

@ -80,6 +80,7 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity
unencrypted = getIntent().getBooleanExtra(UNENCRYPTED, false);
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
groupChatId = getIntent().getIntExtra(EDIT_GROUP_CHAT_ID, 0);
attachmentManager = new AttachmentManager(this, () -> {});

View file

@ -98,6 +98,7 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements
Objects.requireNonNull(getSupportActionBar()).setTitle(R.string.onboarding_create_instant_account);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
boolean fromWelcome = getIntent().getBooleanExtra(FROM_WELCOME, false);
if (DcHelper.getContext(this).isConfigured() == 1) {

View file

@ -36,6 +36,7 @@ public class LogViewActivity extends BaseActionBarActivity {
transaction.commit();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
}
@Override

View file

@ -135,6 +135,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve
actionBar.setTitle(R.string.login_header);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);
actionBar.setElevation(0); // TODO: use custom toolbar instead
}
emailInput.addTextChangedListener(new TextWatcher() {

View file

@ -55,6 +55,7 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setElevation(0); // TODO: use custom toolbar instead
}
webView = findViewById(R.id.webview);

View file

@ -48,6 +48,7 @@ public class WebxdcStoreActivity extends PassphraseRequiredActionBarActivity {
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(R.string.webxdc_apps);
actionBar.setElevation(0); // TODO: use custom toolbar instead
}
webView.setWebViewClient(new WebViewClient() {

View file

@ -107,6 +107,7 @@ public class WelcomeActivity extends BaseActionBarActivity implements DcEventCen
boolean canGoBack = AccountManager.getInstance().canRollbackAccountCreation(this);
supportActionBar.setDisplayHomeAsUpEnabled(canGoBack);
getSupportActionBar().setTitle(canGoBack? R.string.add_account : R.string.welcome_desktop);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
}
private void registerForEvents() {

View file

@ -42,6 +42,7 @@ public class NewContactActivity extends PassphraseRequiredActionBarActivity
actionBar.setTitle(R.string.menu_new_classic_contact);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);
actionBar.setElevation(0); // TODO: use custom toolbar instead
}
nameInput = ViewUtil.findById(this, R.id.name_text);

View file

@ -71,6 +71,7 @@ public class ChatBackgroundActivity extends PassphraseRequiredActionBarActivity
actionBar.setTitle(R.string.pref_background);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);
actionBar.setElevation(0); // TODO: use custom toolbar instead
}
}

View file

@ -50,6 +50,7 @@ public class ProxySettingsActivity extends BaseActionBarActivity
if (actionBar != null) {
actionBar.setTitle(R.string.proxy_settings);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setElevation(0); // TODO: use custom toolbar instead
}
adapter = new ProxyListAdapter(this);

View file

@ -85,6 +85,7 @@ public class BackupTransferActivity extends BaseActionBarActivity {
supportActionBar.setDisplayHomeAsUpEnabled(true);
supportActionBar.setHomeAsUpIndicator(R.drawable.ic_close_white_24dp);
supportActionBar.setTitle(title);
supportActionBar.setElevation(0); // TODO: use custom toolbar instead
}
@Override

View file

@ -42,6 +42,7 @@ public class RegistrationQrActivity extends BaseActionBarActivity {
getSupportActionBar().setTitle(R.string.scan_invitation_code);
}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setElevation(0); // TODO: use custom toolbar instead
barcodeScannerView = findViewById(R.id.zxing_barcode_scanner);
barcodeScannerView.setStatusText(getString(R.string.qrscan_hint) + "\n ");

View file

@ -1,7 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:id="@+id/fragment" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:id="@+id/fragment" />
</RelativeLayout>

View file

@ -1,7 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:id="@+id/fragment" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:id="@+id/fragment" />
</RelativeLayout>

View file

@ -1,7 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:id="@+id/fragment" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:id="@+id/fragment" />
</RelativeLayout>

View file

@ -4,11 +4,13 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
app:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"

View file

@ -1,12 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="?android:attr/windowBackground"
android:orientation="vertical"
android:gravity="center_horizontal"
tools:context=".WelcomeActivity">
android:gravity="center_horizontal">
<LinearLayout
android:id="@+id/top_text"
@ -88,3 +93,5 @@
android:layout_height="0dp"/>
</LinearLayout>
</RelativeLayout>

View file

@ -1,12 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="?android:attr/windowBackground"
android:orientation="vertical"
android:gravity="center_horizontal"
tools:context=".WelcomeActivity">
android:gravity="center_horizontal">
<androidx.legacy.widget.Space
android:layout_weight="2"
@ -35,3 +40,5 @@
android:layout_height="0dp"/>
</LinearLayout>
</RelativeLayout>

View file

@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_container"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent">

View file

@ -4,11 +4,13 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
app:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"

View file

@ -1,6 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:id="@+id/backup_provider_fragment" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:id="@+id/backup_provider_fragment" />
</RelativeLayout>

View file

@ -3,6 +3,7 @@
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
@ -17,9 +18,16 @@
android:theme="?attr/actionBarStyle"
app:contentInsetStartWithNavigation="0dp"/>
<fragment android:id="@+id/contact_selection_list_fragment"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground">
<fragment android:id="@+id/contact_selection_list_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="org.thoughtcrime.securesms.ContactSelectionListFragment" />
</FrameLayout>
</LinearLayout>

View file

@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:layout_height="match_parent" android:layout_width="match_parent">
<org.thoughtcrime.securesms.components.ScaleStableImageView
@ -21,7 +22,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="?attr/actionBarSize"
android:gravity="bottom"
android:clipToPadding="false"
android:clipChildren="false">

View file

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@id/container"
android:orientation="vertical"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -94,7 +95,9 @@
<FrameLayout android:id="@+id/fragment_container"
android:layout_below="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
/>
<org.thoughtcrime.securesms.components.SearchToolbar
android:id="@+id/search_toolbar"

View file

@ -1,10 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:orientation="vertical">
<LinearLayout
android:id="@+id/group_image_holder"
@ -55,3 +61,5 @@
android:divider="@null" />
</LinearLayout>
</RelativeLayout>

View file

@ -1,8 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
xmlns:android="http://schemas.android.com/apk/res/android">
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground">
<LinearLayout
android:layout_width="match_parent"
@ -86,3 +93,5 @@
</LinearLayout>
</FrameLayout>
</RelativeLayout>

View file

@ -1,11 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_container"
android:orientation="vertical"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
<LinearLayout
android:id="@+id/fragment_container"
android:orientation="vertical"
android:background="?android:attr/windowBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>

View file

@ -5,14 +5,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:fillViewport="true"
tools:context=".contacts.NewContactActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:background="?android:attr/windowBackground"
android:animateLayoutChanges="true">
<androidx.constraintlayout.widget.Guideline

View file

@ -4,11 +4,13 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
app:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
@ -24,6 +26,7 @@
<FrameLayout
android:id="@+id/fragment_container"
android:background="?android:attr/windowBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

View file

@ -3,14 +3,16 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.thoughtcrime.securesms.components.InputAwareLayout
android:id="@+id/container"
android:background="?android:attr/windowBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:paddingTop="20dp"
android:orientation="vertical">
<TextView

View file

@ -1,10 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:orientation="vertical"
tools:context=".proxy.ProxySettingsActivity">
@ -22,3 +28,5 @@
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>

View file

@ -1,11 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:fillViewport="true"
android:background="?android:attr/windowBackground"
tools:context=".RegistrationActivity">
<androidx.constraintlayout.widget.ConstraintLayout
@ -421,3 +428,5 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</RelativeLayout>

View file

@ -1,11 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:wheel="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:orientation="vertical"
android:background="?android:attr/windowBackground"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
@ -41,3 +46,5 @@
android:textSize="20sp"
android:text="@string/one_moment" />
</RelativeLayout>
</RelativeLayout>

View file

@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="?attr/colorPrimary"
android:orientation="vertical">
<WebView android:id="@+id/webview"

View file

@ -1,11 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:background="?attr/colorPrimary"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:gravity="center_horizontal"
android:background="?android:attr/windowBackground"
tools:context=".WelcomeActivity">
<androidx.legacy.widget.Space
@ -72,3 +79,4 @@
</LinearLayout>
</RelativeLayout>