minor fixes

This commit is contained in:
Grishka 2023-10-21 11:52:15 +03:00
parent 965239d215
commit 572901ec9d
3 changed files with 16 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewStub; import android.view.ViewStub;
import android.view.WindowInsets; import android.view.WindowInsets;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button; import android.widget.Button;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.TextView; import android.widget.TextView;
@ -189,6 +190,7 @@ public class CreateListAddMembersFragment extends BaseAccountListFragment implem
searchFragment=null; searchFragment=null;
dismissingSearchFragment=false; dismissingSearchFragment=false;
}).start(); }).start();
getActivity().getSystemService(InputMethodManager.class).hideSoftInputFromWindow(contentView.getWindowToken(), 0);
} }
private void onNextClick(View v){ private void onNextClick(View v){
@ -270,6 +272,7 @@ public class CreateListAddMembersFragment extends BaseAccountListFragment implem
@Override @Override
protected void onConfigureViewHolder(AccountViewHolder holder){ protected void onConfigureViewHolder(AccountViewHolder holder){
holder.setStyle(AccountViewHolder.AccessoryType.CUSTOM_BUTTON, false); holder.setStyle(AccountViewHolder.AccessoryType.CUSTOM_BUTTON, false);
holder.setOnLongClickListener(vh->false);
Button button=holder.getButton(); Button button=holder.getButton();
button.setPadding(V.dp(24), 0, V.dp(24), 0); button.setPadding(V.dp(24), 0, V.dp(24), 0);
button.setMinimumWidth(0); button.setMinimumWidth(0);
@ -309,4 +312,9 @@ public class CreateListAddMembersFragment extends BaseAccountListFragment implem
button.setTextColor(ta.getColorStateList(0)); button.setTextColor(ta.getColorStateList(0));
ta.recycle(); ta.recycle();
} }
@Override
protected void loadRelationships(List<AccountViewModel> accounts){
// no-op
}
} }

View File

@ -4,6 +4,7 @@ import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.view.WindowInsets; import android.view.WindowInsets;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button; import android.widget.Button;
import com.squareup.otto.Subscribe; import com.squareup.otto.Subscribe;
@ -129,6 +130,7 @@ public class CreateListFragment extends BaseEditListFragment{
args.putParcelable("list", Parcels.wrap(followList)); args.putParcelable("list", Parcels.wrap(followList));
args.putBoolean("needLoadMembers", needLoadMembers); args.putBoolean("needLoadMembers", needLoadMembers);
Nav.go(getActivity(), CreateListAddMembersFragment.class, args); Nav.go(getActivity(), CreateListAddMembersFragment.class, args);
getActivity().getSystemService(InputMethodManager.class).hideSoftInputFromWindow(contentView.getWindowToken(), 0);
} }
@Subscribe @Subscribe

View File

@ -67,6 +67,7 @@ public class AddNewListMembersFragment extends AccountSearchFragment{
@Override @Override
protected void onConfigureViewHolder(AccountViewHolder holder){ protected void onConfigureViewHolder(AccountViewHolder holder){
holder.setStyle(AccountViewHolder.AccessoryType.CUSTOM_BUTTON, false); holder.setStyle(AccountViewHolder.AccessoryType.CUSTOM_BUTTON, false);
holder.setOnLongClickListener(vh->false);
Button button=holder.getButton(); Button button=holder.getButton();
button.setPadding(V.dp(24), 0, V.dp(24), 0); button.setPadding(V.dp(24), 0, V.dp(24), 0);
button.setMinimumWidth(0); button.setMinimumWidth(0);
@ -108,6 +109,11 @@ public class AddNewListMembersFragment extends AccountSearchFragment{
ta.recycle(); ta.recycle();
} }
@Override
protected void loadRelationships(List<AccountViewModel> accounts){
// no-op
}
public interface Listener{ public interface Listener{
boolean isAccountInList(AccountViewModel account); boolean isAccountInList(AccountViewModel account);
void addAccountToList(AccountViewModel account, Runnable onDone); void addAccountToList(AccountViewModel account, Runnable onDone);