mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-24 23:17:21 +00:00
Fix broken multiple contact selection
Increased tap area of action button too Closes #3855
This commit is contained in:
parent
a820500ae0
commit
5fe1a28954
@ -26,56 +26,62 @@
|
|||||||
android:background="@drawable/circle_touch_highlight_background"
|
android:background="@drawable/circle_touch_highlight_background"
|
||||||
android:src="@drawable/ic_search_white_24dp" />
|
android:src="@drawable/ic_search_white_24dp" />
|
||||||
|
|
||||||
<EditText android:id="@+id/search_view"
|
<LinearLayout android:id="@+id/toggle_container"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0px"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:orientation="horizontal">
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:hint="@string/contact_selection_activity__enter_name_or_number"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
style="@style/TextSecure.TitleTextStyle"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:gravity="center_vertical"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.AnimatingToggle
|
<EditText android:id="@+id/search_view"
|
||||||
android:id="@+id/button_toggle"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0px"
|
||||||
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
||||||
android:layout_gravity="center"
|
android:layout_marginLeft="5dp"
|
||||||
android:gravity="center">
|
android:hint="@string/contact_selection_activity__enter_name_or_number"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
style="@style/TextSecure.TitleTextStyle"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center_vertical"/>
|
||||||
|
|
||||||
<ImageView android:id="@+id/search_dialpad"
|
<org.thoughtcrime.securesms.components.AnimatingToggle
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/button_toggle"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:layout_gravity="center"
|
||||||
android:clickable="true"
|
android:gravity="center">
|
||||||
android:background="@drawable/circle_touch_highlight_background"
|
|
||||||
android:src="@drawable/ic_dialpad_white_24dp" />
|
|
||||||
|
|
||||||
<ImageView android:id="@+id/search_keyboard"
|
<ImageView android:id="@+id/search_dialpad"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:visibility="gone"
|
android:background="@drawable/circle_touch_highlight_background"
|
||||||
android:background="@drawable/circle_touch_highlight_background"
|
android:src="@drawable/ic_dialpad_white_24dp" />
|
||||||
android:src="@drawable/ic_keyboard_white_24dp" />
|
|
||||||
|
|
||||||
|
<ImageView android:id="@+id/search_keyboard"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:clickable="true"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:background="@drawable/circle_touch_highlight_background"
|
||||||
|
android:src="@drawable/ic_keyboard_white_24dp" />
|
||||||
|
|
||||||
<ImageView android:id="@+id/search_clear"
|
<ImageView android:id="@+id/search_clear"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:background="@drawable/circle_touch_highlight_background"
|
android:background="@drawable/circle_touch_highlight_background"
|
||||||
android:src="@drawable/ic_clear_white_24dp" />
|
android:src="@drawable/ic_clear_white_24dp" />
|
||||||
|
|
||||||
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
</org.thoughtcrime.securesms.components.AnimatingToggle>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ import android.view.TouchDelegate;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.components.AnimatingToggle;
|
import org.thoughtcrime.securesms.components.AnimatingToggle;
|
||||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||||
@ -67,6 +68,7 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
|
|||||||
private ImageView keyboardToggle;
|
private ImageView keyboardToggle;
|
||||||
private ImageView dialpadToggle;
|
private ImageView dialpadToggle;
|
||||||
private ImageView clearToggle;
|
private ImageView clearToggle;
|
||||||
|
private LinearLayout toggleContainer;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPreCreate() {
|
protected void onPreCreate() {
|
||||||
@ -99,12 +101,13 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initializeResources() {
|
private void initializeResources() {
|
||||||
this.action = (ImageView) findViewById(R.id.action_icon);
|
this.action = (ImageView) findViewById(R.id.action_icon);
|
||||||
this.searchText = (EditText) findViewById(R.id.search_view);
|
this.searchText = (EditText) findViewById(R.id.search_view);
|
||||||
this.toggle = (AnimatingToggle) findViewById(R.id.button_toggle);
|
this.toggle = (AnimatingToggle) findViewById(R.id.button_toggle);
|
||||||
this.keyboardToggle = (ImageView) findViewById(R.id.search_keyboard);
|
this.keyboardToggle = (ImageView) findViewById(R.id.search_keyboard);
|
||||||
this.dialpadToggle = (ImageView) findViewById(R.id.search_dialpad);
|
this.dialpadToggle = (ImageView) findViewById(R.id.search_dialpad);
|
||||||
this.clearToggle = (ImageView) findViewById(R.id.search_clear);
|
this.clearToggle = (ImageView) findViewById(R.id.search_clear);
|
||||||
|
this.toggleContainer = (LinearLayout) findViewById(R.id.toggle_container);
|
||||||
|
|
||||||
contactsFragment = (ContactSelectionListFragment) getSupportFragmentManager().findFragmentById(R.id.contact_selection_list_fragment);
|
contactsFragment = (ContactSelectionListFragment) getSupportFragmentManager().findFragmentById(R.id.contact_selection_list_fragment);
|
||||||
contactsFragment.setOnContactSelectedListener(this);
|
contactsFragment.setOnContactSelectedListener(this);
|
||||||
@ -138,7 +141,8 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
expandTapArea(toolbar, dialpadToggle, 500);
|
expandTapArea(toolbar, action, 500);
|
||||||
|
expandTapArea(toggleContainer, dialpadToggle, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeSearch() {
|
private void initializeSearch() {
|
||||||
@ -174,7 +178,7 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
|
|||||||
|
|
||||||
private void displayTogglingView(View view) {
|
private void displayTogglingView(View view) {
|
||||||
toggle.display(view);
|
toggle.display(view);
|
||||||
expandTapArea(toolbar, view, 500);
|
expandTapArea(toggleContainer, view, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void expandTapArea(final View container, final View child, final int padding) {
|
private void expandTapArea(final View container, final View child, final int padding) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user