Revert "Continue to Material 3"

This reverts commit 80f26dfd10.
This commit is contained in:
12aw 2024-02-17 11:24:13 +01:00
parent 2dad84518e
commit 69c40e3d78
36 changed files with 52 additions and 51 deletions

View file

@ -77,6 +77,7 @@ dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.exifinterface:exifinterface:1.3.7'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.emoji2:emoji2:1.4.0'

View file

@ -6,6 +6,8 @@ import android.text.method.LinkMovementMethod;
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import eu.siacs.conversations.R;
import eu.siacs.conversations.ui.MagicCreateActivity;
@ -14,7 +16,7 @@ public class RegisterMonoclesActivity extends MagicCreateActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register_monocles);
setSupportActionBar(findViewById(R.id.toolbar));
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setupHyperlink();

View file

@ -21,7 +21,7 @@ import eu.siacs.conversations.ui.XmppActivity;
import eu.siacs.conversations.utils.Compatibility;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.databinding.DataBindingUtil;

View file

@ -10,7 +10,7 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

View file

@ -129,7 +129,7 @@ import java.util.Locale;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AlertDialog.Builder;
import com.google.common.collect.ComparisonChain;

View file

@ -4,7 +4,7 @@ import android.view.View;
import android.widget.Toast;
import androidx.annotation.StringRes;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import eu.siacs.conversations.R;

View file

@ -18,7 +18,7 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingUtil;

View file

@ -40,7 +40,7 @@ import android.view.View;
import android.view.View.OnClickListener;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.Toolbar;
import androidx.core.graphics.drawable.DrawableCompat;

View file

@ -40,7 +40,7 @@ import android.view.inputmethod.InputMethodManager;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;

View file

@ -136,9 +136,11 @@ import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import android.app.AlertDialog;
import android.widget.PopupMenu;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.view.menu.MenuBuilder;
import androidx.appcompat.view.menu.MenuPopupHelper;
import androidx.appcompat.widget.PopupMenu;
import android.widget.PopupWindow;
import androidx.core.content.ContextCompat;
import androidx.core.view.inputmethod.InputConnectionCompat;
import androidx.core.view.inputmethod.InputContentInfoCompat;
@ -269,7 +271,7 @@ import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
@ -1030,10 +1032,8 @@ public class ConversationFragment extends XmppFragment
return false;
}
});
PopupMenu menuHelper = new PopupMenu(getActivity(), null);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
menuHelper.setForceShowIcon(true);
}
MenuPopupHelper menuHelper = new MenuPopupHelper(getActivity(), (MenuBuilder) menu, v);
menuHelper.setForceShowIcon(true);
menuHelper.show();
}

View file

@ -68,21 +68,19 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.ActionBar;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import de.monocles.chat.DownloadDefaultStickers;
import net.java.otr4j.session.SessionStatus;
import android.widget.PopupMenu;
import androidx.appcompat.widget.PopupMenu;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import android.widget.Toolbar;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.res.ResourcesCompat;
import androidx.databinding.DataBindingUtil;
@ -717,7 +715,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
ConversationMenuConfigurator.reloadFeatures(this);
OmemoSetting.load(this);
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations);
setSupportActionBar(binding.toolbar.getRoot());
setSupportActionBar((Toolbar) binding.toolbar.getRoot());
configureActionBar(getSupportActionBar());
this.getFragmentManager().addOnBackStackChangedListener(this::invalidateActionBarTitle);
this.getFragmentManager().addOnBackStackChangedListener(this::showDialogsIfMainIsOverview);

View file

@ -7,7 +7,7 @@ import android.view.View;
import android.widget.Spinner;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.DialogFragment;

View file

@ -13,7 +13,7 @@ import android.widget.AdapterView;
import android.widget.Button;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.DialogFragment;

View file

@ -38,7 +38,7 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingUtil;

View file

@ -28,7 +28,7 @@ import eu.siacs.conversations.xmpp.OnGatewayResult;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.DialogFragment;

View file

@ -18,7 +18,7 @@ import android.view.MenuItem;
import android.view.View;
import eu.siacs.conversations.utils.Compatibility;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.databinding.DataBindingUtil;

View file

@ -10,7 +10,7 @@ import android.widget.AutoCompleteTextView;
import android.widget.Spinner;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.DialogFragment;

View file

@ -15,7 +15,7 @@ import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingUtil;

View file

@ -26,7 +26,7 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import com.google.android.material.bottomnavigation.BottomNavigationView;

View file

@ -31,7 +31,7 @@ import android.webkit.MimeTypeMap;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.ActionBar;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import androidx.databinding.DataBindingUtil;

View file

@ -29,7 +29,7 @@ import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.os.Bundle;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import java.util.logging.Level;

View file

@ -14,7 +14,7 @@ import android.os.Bundle;
import android.widget.ImageButton;
import android.widget.TextView;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import java.io.File;
import java.lang.ref.WeakReference;
@ -109,7 +109,7 @@ public class MemoryManagementActivity extends XmppActivity {
} else {
file = getString(R.string.all_media_files);
}
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
final androidx.appcompat.app.AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setNegativeButton(R.string.cancel, null);
builder.setTitle(R.string.delete_files_dialog);
builder.setMessage(getResources().getString(R.string.delete_files_dialog_msg, file));

View file

@ -8,7 +8,7 @@ import android.view.View;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import eu.siacs.conversations.Config;

View file

@ -19,7 +19,7 @@ import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

View file

@ -17,7 +17,7 @@ import android.preference.PreferenceManager;
import android.util.Log;
import android.view.View;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingUtil;

View file

@ -41,7 +41,7 @@ import de.monocles.chat.DownloadDefaultStickers;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import androidx.exifinterface.media.ExifInterface;

View file

@ -60,7 +60,7 @@ import androidx.annotation.MenuRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.databinding.DataBindingUtil;
@ -71,7 +71,7 @@ import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import android.text.method.LinkMovementMethod;
import androidx.annotation.StringRes;
import android.widget.PopupMenu;
import androidx.appcompat.widget.PopupMenu;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.google.android.material.bottomnavigation.BottomNavigationView;

View file

@ -11,7 +11,7 @@ import android.view.View.OnClickListener;
import android.widget.Toast;
import androidx.appcompat.app.ActionBar;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingUtil;

View file

@ -22,7 +22,7 @@ import android.os.PowerManager;
import android.util.Log;
import android.widget.TextView;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;
import java.io.File;

View file

@ -13,7 +13,7 @@ import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.ActionBar;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import net.java.otr4j.OtrException;
import net.java.otr4j.session.Session;

View file

@ -61,7 +61,7 @@ import androidx.annotation.BoolRes;
import androidx.annotation.IntegerRes;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;

View file

@ -22,8 +22,8 @@ import android.widget.ImageView;
import androidx.annotation.AttrRes;
import androidx.annotation.DimenRes;
import androidx.annotation.NonNull;
import android.app.AlertDialog;
import android.widget.PopupMenu;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.PopupMenu;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;

View file

@ -16,7 +16,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import androidx.databinding.DataBindingUtil;
import java.util.ArrayList;

View file

@ -34,7 +34,7 @@ import android.content.Context;
import android.util.Pair;
import android.widget.Toast;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import java.util.Collections;
import java.util.Map;

View file

@ -10,7 +10,7 @@ import android.os.Environment;
import android.preference.PreferenceManager;
import android.util.Log;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import java.io.File;
import java.lang.ref.WeakReference;

View file

@ -9,7 +9,7 @@ import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log;
import android.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;
import java.io.BufferedReader;
import java.io.FileInputStream;