mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Update views for selection mode state
This commit is contained in:
+15
-8
@@ -20,8 +20,7 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import com.melnykov.fab.FloatingActionButton;
|
||||
import com.moez.QKSMS.R;
|
||||
import com.moez.QKSMS.common.BlockedConversationHelper;
|
||||
@@ -41,6 +40,9 @@ import com.moez.QKSMS.ui.base.RecyclerCursorAdapter;
|
||||
import com.moez.QKSMS.ui.compose.ComposeFragment;
|
||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
|
||||
public class ConversationListFragment extends QKFragment implements LoaderManager.LoaderCallbacks<Cursor>, LiveView,
|
||||
RecyclerCursorAdapter.ItemClickListener<Conversation>, RecyclerCursorAdapter.MultiSelectListener {
|
||||
@@ -97,13 +99,17 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
||||
mFab.attachToRecyclerView(mRecyclerView);
|
||||
mFab.getDrawable().setColorFilter(new PorterDuffColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY));
|
||||
mFab.setOnClickListener(v -> {
|
||||
// Show the compose fragment, showing the keyboard and focusing on the recipients edittext.
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(ComposeFragment.ARG_SHOW_KEYBOARD, true);
|
||||
args.putString(ComposeFragment.ARG_FOCUS, ComposeFragment.FOCUS_RECIPIENTS);
|
||||
if (mAdapter.isInMultiSelectMode()) {
|
||||
mAdapter.disableMultiSelectMode(true);
|
||||
} else {
|
||||
// Show the compose fragment, showing the keyboard and focusing on the recipients edittext.
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean(ComposeFragment.ARG_SHOW_KEYBOARD, true);
|
||||
args.putString(ComposeFragment.ARG_FOCUS, ComposeFragment.FOCUS_RECIPIENTS);
|
||||
|
||||
Fragment content = getFragmentManager().findFragmentById(R.id.content_frame);
|
||||
switchFragment(ComposeFragment.getInstance(args, content));
|
||||
Fragment content = getFragmentManager().findFragmentById(R.id.content_frame);
|
||||
switchFragment(ComposeFragment.getInstance(args, content));
|
||||
}
|
||||
});
|
||||
|
||||
mViewHasLoaded = true;
|
||||
@@ -308,6 +314,7 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
||||
@Override
|
||||
public void onMultiSelectStateChanged(boolean enabled) {
|
||||
mContext.invalidateOptionsMenu();
|
||||
mFab.setImageResource(enabled ? R.drawable.ic_accept : R.drawable.ic_add);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -295,26 +295,18 @@
|
||||
<!--$10 donaion product description-->
|
||||
<string name="product_description_donate_10">Buy me lunch</string>
|
||||
|
||||
<!--Settings screen title-->
|
||||
<string name="title_settings">Settings</string>
|
||||
<!--Settings screen title-->
|
||||
<string name="title_search">Search</string>
|
||||
<!--Compose screen title-->
|
||||
<string name="title_compose">Compose</string>
|
||||
<!--Conversations screen title-->
|
||||
<string name="title_conversation_list">Conversations</string>
|
||||
<string name="title_blocked">Blocked</string>
|
||||
<!--Changelog screen title-->
|
||||
<string name="title_changelog">Changelog</string>
|
||||
<!--QuickReply picker dialog title (shows up when you press reply from notification, but there are multiple senders)-->
|
||||
<string name="title_picker">New messages</string>
|
||||
<!--Donate dialog title-->
|
||||
<string name="title_donate">Donate</string>
|
||||
<!--QK Response dialog title-->
|
||||
<string name="title_qk_responses">QK Responses</string>
|
||||
<string name="title_block_address">Block number</string>
|
||||
<string name="title_unblock_address">Unblock number</string>
|
||||
<string name="title_conversations_selected">(%s) Conversations</string>
|
||||
<string name="title_conversations_selected">%s selected</string>
|
||||
|
||||
<!-- Menu shown in the context menu when long pressing on a message when the message contains
|
||||
one or more phone numbers and/or email addresses and the number or email is new to
|
||||
|
||||
Reference in New Issue
Block a user