mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-15 02:31:58 +00:00
Remove superfluous icon and padding that came with sdk 24
Fixes #5965 // FREEBIE
This commit is contained in:
@@ -96,6 +96,8 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
|
||||
getSupportActionBar().setDisplayShowTitleEnabled(false);
|
||||
getSupportActionBar().setIcon(null);
|
||||
getSupportActionBar().setLogo(null);
|
||||
}
|
||||
|
||||
private void initializeResources() {
|
||||
|
||||
@@ -95,6 +95,7 @@ public class InviteActivity extends PassphraseRequiredActionBarActivity implemen
|
||||
smsCancelButton.setOnClickListener(new SmsCancelClickListener());
|
||||
smsSendButton.setOnClickListener(new SmsSendClickListener());
|
||||
contactFilter.setOnFilterChangedListener(new ContactFilterChangedListener());
|
||||
contactFilter.setNavigationIcon(R.drawable.ic_search_white_24dp);
|
||||
}
|
||||
|
||||
private Animation loadAnimation(@AnimRes int animResId) {
|
||||
|
||||
@@ -44,7 +44,6 @@ public class NewConversationActivity extends ContactSelectionActivity {
|
||||
public void onCreate(Bundle bundle, @NonNull MasterSecret masterSecret) {
|
||||
super.onCreate(bundle, masterSecret);
|
||||
|
||||
getToolbar().setShowCustomNavigationButton(false);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,8 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
||||
|
||||
private void initializeToolbar() {
|
||||
this.toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
this.toolbar.setLogo(null);
|
||||
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
@@ -22,7 +22,6 @@ public class ContactFilterToolbar extends Toolbar {
|
||||
|
||||
private EditText searchText;
|
||||
private AnimatingToggle toggle;
|
||||
private ImageView action;
|
||||
private ImageView keyboardToggle;
|
||||
private ImageView dialpadToggle;
|
||||
private ImageView clearToggle;
|
||||
@@ -40,8 +39,6 @@ public class ContactFilterToolbar extends Toolbar {
|
||||
super(context, attrs, defStyleAttr);
|
||||
inflate(context, R.layout.contact_filter_toolbar, this);
|
||||
|
||||
|
||||
this.action = ViewUtil.findById(this, R.id.action_icon);
|
||||
this.searchText = ViewUtil.findById(this, R.id.search_view);
|
||||
this.toggle = ViewUtil.findById(this, R.id.button_toggle);
|
||||
this.keyboardToggle = ViewUtil.findById(this, R.id.search_keyboard);
|
||||
@@ -97,25 +94,12 @@ public class ContactFilterToolbar extends Toolbar {
|
||||
}
|
||||
});
|
||||
|
||||
expandTapArea(this, action);
|
||||
setLogo(null);
|
||||
setContentInsetStartWithNavigation(0);
|
||||
|
||||
expandTapArea(toggleContainer, dialpadToggle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNavigationIcon(int resId) {
|
||||
action.setImageResource(resId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNavigationOnClickListener(OnClickListener listener) {
|
||||
super.setNavigationOnClickListener(listener);
|
||||
action.setOnClickListener(listener);
|
||||
}
|
||||
|
||||
public void setShowCustomNavigationButton(boolean show) {
|
||||
action.setVisibility(show ? VISIBLE : GONE);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
searchText.setText("");
|
||||
notifyListener();
|
||||
@@ -154,11 +138,11 @@ public class ContactFilterToolbar extends Toolbar {
|
||||
}
|
||||
|
||||
private static class SearchUtil {
|
||||
public static boolean isTextInput(EditText editText) {
|
||||
static boolean isTextInput(EditText editText) {
|
||||
return (editText.getInputType() & InputType.TYPE_MASK_CLASS) == InputType.TYPE_CLASS_TEXT;
|
||||
}
|
||||
|
||||
public static boolean isPhoneInput(EditText editText) {
|
||||
static boolean isPhoneInput(EditText editText) {
|
||||
return (editText.getInputType() & InputType.TYPE_MASK_CLASS) == InputType.TYPE_CLASS_PHONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user