kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix broken multiple contact selection
Increased tap area of action button too Closes #3855fork-5.53.8
rodzic
a820500ae0
commit
5fe1a28954
|
@ -26,6 +26,11 @@
|
||||||
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" />
|
||||||
|
|
||||||
|
<LinearLayout android:id="@+id/toggle_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<EditText android:id="@+id/search_view"
|
<EditText android:id="@+id/search_view"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="0px"
|
android:layout_width="0px"
|
||||||
|
@ -64,7 +69,6 @@
|
||||||
android:background="@drawable/circle_touch_highlight_background"
|
android:background="@drawable/circle_touch_highlight_background"
|
||||||
android:src="@drawable/ic_keyboard_white_24dp" />
|
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"
|
||||||
|
@ -79,6 +83,8 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.v7.widget.Toolbar>
|
</android.support.v7.widget.Toolbar>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
|
|
|
@ -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() {
|
||||||
|
@ -105,6 +107,7 @@ public abstract class ContactSelectionActivity extends PassphraseRequiredActionB
|
||||||
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) {
|
||||||
|
|
Ładowanie…
Reference in New Issue