mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Remove superfluous icon and padding that came with sdk 24
Fixes #5965 // FREEBIE
This commit is contained in:
parent
d6d3d1fee4
commit
4ff8de0ca8
@ -5,15 +5,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView android:id="@+id/action_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/circle_touch_highlight_background"
|
||||
android:src="@drawable/ic_search_white_24dp" />
|
||||
|
||||
<LinearLayout android:id="@+id/toggle_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -23,8 +14,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0px"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:hint="@string/contact_selection_activity__enter_name_or_number"
|
||||
android:inputType="textPersonName"
|
||||
style="@style/TextSecure.TitleTextStyle"
|
||||
|
@ -3,7 +3,8 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="vertical"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<org.thoughtcrime.securesms.components.ContactFilterToolbar
|
||||
android:id="@+id/toolbar"
|
||||
@ -11,7 +12,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="?attr/actionBarStyle" />
|
||||
android:theme="?attr/actionBarStyle"
|
||||
app:contentInsetStartWithNavigation="0dp"/>
|
||||
|
||||
<fragment android:id="@+id/contact_selection_list_fragment"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user