diff --git a/twidere.component.common/src/main/java/org/mariotaku/twidere/TwidereConstants.java b/twidere.component.common/src/main/java/org/mariotaku/twidere/TwidereConstants.java index b3beb02c4..cb118f9b3 100644 --- a/twidere.component.common/src/main/java/org/mariotaku/twidere/TwidereConstants.java +++ b/twidere.component.common/src/main/java/org/mariotaku/twidere/TwidereConstants.java @@ -45,6 +45,7 @@ public interface TwidereConstants extends SharedPreferenceConstants, IntentConst public static final String SILENT_NOTIFICATIONS_PREFERENCE_NAME = "silent_notifications"; public static final String TIMELINE_POSITIONS_PREFERENCES_NAME = "timeline_positions"; public static final String ACCOUNT_PREFERENCES_NAME_PREFIX = "account_preferences_"; + public static final String KEYBOARD_SHORTCUTS_PREFERENCES_NAME = "keyboard_shortcuts_preferences"; public static final String TWITTER_CONSUMER_KEY = "uAFVpMhBntJutfVj6abfA"; public static final String TWITTER_CONSUMER_SECRET = "JARXkJTfxo0F8MyctYy9bUmrLISjo8vXAHsZHYuk2E"; diff --git a/twidere.component.common/src/main/java/org/mariotaku/twidere/constant/IntentConstants.java b/twidere.component.common/src/main/java/org/mariotaku/twidere/constant/IntentConstants.java index fd4c80f85..cf60c026b 100644 --- a/twidere.component.common/src/main/java/org/mariotaku/twidere/constant/IntentConstants.java +++ b/twidere.component.common/src/main/java/org/mariotaku/twidere/constant/IntentConstants.java @@ -25,6 +25,7 @@ public interface IntentConstants { public static final String INTENT_ACTION_HOME = INTENT_PACKAGE_PREFIX + "HOME"; public static final String INTENT_ACTION_COMPOSE = INTENT_PACKAGE_PREFIX + "COMPOSE"; + public static final String INTENT_ACTION_QUICK_SEARCH = INTENT_PACKAGE_PREFIX + "QUICK_SEARCH"; public static final String INTENT_ACTION_REPLY = INTENT_PACKAGE_PREFIX + "REPLY"; public static final String INTENT_ACTION_QUOTE = INTENT_PACKAGE_PREFIX + "QUOTE"; public static final String INTENT_ACTION_EDIT_DRAFT = INTENT_PACKAGE_PREFIX + "EDIT_DRAFT"; diff --git a/twidere.component.common/src/main/java/org/mariotaku/twidere/model/ParcelableStatus.java b/twidere.component.common/src/main/java/org/mariotaku/twidere/model/ParcelableStatus.java index 99af8ddaa..cee2476c0 100644 --- a/twidere.component.common/src/main/java/org/mariotaku/twidere/model/ParcelableStatus.java +++ b/twidere.component.common/src/main/java/org/mariotaku/twidere/model/ParcelableStatus.java @@ -401,10 +401,10 @@ public class ParcelableStatus implements TwidereParcelable, Comparable loader, final Cursor cursor) { + mAdapter.swapCursor(cursor); + setListShown(true); + } + @Override + public void onLoaderReset(final Loader loader) { + mAdapter.swapCursor(null); } @Override @@ -157,16 +180,6 @@ public class DraftsActivity extends BaseActionBarActivity implements LoaderCallb } } - @Override - public void onLoaderReset(final Loader loader) { - mAdapter.swapCursor(null); - } - - @Override - public void onLoadFinished(final Loader loader, final Cursor cursor) { - mAdapter.swapCursor(cursor); - } - @Override public boolean onOptionsItemSelected(final MenuItem item) { switch (item.getItemId()) { @@ -178,30 +191,27 @@ public class DraftsActivity extends BaseActionBarActivity implements LoaderCallb return super.onOptionsItemSelected(item); } - @Override - public boolean onPrepareActionMode(final ActionMode mode, final Menu menu) { - updateTitle(mode); - return true; - } - @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); mResolver = getContentResolver(); mPreferences = getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE); mTextSize = mPreferences.getInt(KEY_TEXT_SIZE, getDefaultTextSize(this)); - setContentView(R.layout.activity_drafts); + setContentView(R.layout.layout_list_with_empty_view); final ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); } mAdapter = new DraftsAdapter(this); - mListView = (ListView) findViewById(android.R.id.list); mListView.setAdapter(mAdapter); + mListView.setEmptyView(mEmptyView); mListView.setOnItemClickListener(this); mListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL); mListView.setMultiChoiceModeListener(this); + mEmptyIcon.setImageResource(R.drawable.ic_info_drafts); + mEmptyText.setText(R.string.drafts_hint_messages); getSupportLoaderManager().initLoader(0, null, this); + setListShown(false); } @Override @@ -229,6 +239,22 @@ public class DraftsActivity extends BaseActionBarActivity implements LoaderCallb super.onStop(); } + @Override + public void onSupportContentChanged() { + super.onSupportContentChanged(); + mListView = (ListView) findViewById(android.R.id.list); + mEmptyView = findViewById(android.R.id.empty); + mEmptyText = (TextView) findViewById(R.id.empty_text); + mEmptyIcon = (ImageView) findViewById(R.id.empty_icon); + mProgressContainer = findViewById(R.id.progress_container); + mListContainer = findViewById(R.id.list_container); + } + + public void setListShown(boolean listShown) { + mListContainer.setVisibility(listShown ? View.VISIBLE : View.GONE); + mProgressContainer.setVisibility(listShown ? View.GONE : View.VISIBLE); + } + private void editDraft(final DraftItem draft) { final Intent intent = new Intent(INTENT_ACTION_EDIT_DRAFT); final Bundle bundle = new Bundle(); @@ -332,19 +358,6 @@ public class DraftsActivity extends BaseActionBarActivity implements LoaderCallb return resolver.delete(Drafts.CONTENT_URI, where.getSQL(), null); } - @Override - protected void onPostExecute(final Integer result) { - super.onPostExecute(result); - final Fragment f = mActivity.getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DELETING_DRAFTS); - if (f instanceof DialogFragment) { - ((DialogFragment) f).dismiss(); - } - for (long id : mIds) { - final String tag = Uri.withAppendedPath(Drafts.CONTENT_URI, String.valueOf(id)).toString(); - mNotificationManager.cancel(tag, NOTIFICATION_ID_DRAFTS); - } - } - @Override protected void onPreExecute() { super.onPreExecute(); @@ -357,5 +370,18 @@ public class DraftsActivity extends BaseActionBarActivity implements LoaderCallb } }); } + + @Override + protected void onPostExecute(final Integer result) { + super.onPostExecute(result); + final Fragment f = mActivity.getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DELETING_DRAFTS); + if (f instanceof DialogFragment) { + ((DialogFragment) f).dismiss(); + } + for (long id : mIds) { + final String tag = Uri.withAppendedPath(Drafts.CONTENT_URI, String.valueOf(id)).toString(); + mNotificationManager.cancel(tag, NOTIFICATION_ID_DRAFTS); + } + } } } diff --git a/twidere/src/main/java/org/mariotaku/twidere/activity/support/HomeActivity.java b/twidere/src/main/java/org/mariotaku/twidere/activity/support/HomeActivity.java index ff52e953e..5f2ee4df8 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/activity/support/HomeActivity.java +++ b/twidere/src/main/java/org/mariotaku/twidere/activity/support/HomeActivity.java @@ -92,7 +92,7 @@ import org.mariotaku.twidere.util.AsyncTwitterWrapper; import org.mariotaku.twidere.util.ColorUtils; import org.mariotaku.twidere.util.CustomTabUtils; import org.mariotaku.twidere.util.FlymeUtils; -import org.mariotaku.twidere.util.HotKeyHandler; +import org.mariotaku.twidere.util.KeyboardShortcutsHandler; import org.mariotaku.twidere.util.MathUtils; import org.mariotaku.twidere.util.MultiSelectEventHandler; import org.mariotaku.twidere.util.ParseUtils; @@ -149,8 +149,8 @@ public class HomeActivity extends BaseActionBarActivity implements OnClickListen private NotificationManager mNotificationManager; private MultiSelectEventHandler mMultiSelectHandler; - private HotKeyHandler mHotKeyHandler; private ReadStateManager mReadStateManager; + private KeyboardShortcutsHandler mKeyboardShortcutsHandler; private SupportTabsAdapter mPagerAdapter; @@ -169,7 +169,6 @@ public class HomeActivity extends BaseActionBarActivity implements OnClickListen private UpdateUnreadCountTask mUpdateUnreadCountTask; private int mTabDisplayOption; - private float mPagerPosition; private Toolbar mActionBar; private OnSharedPreferenceChangeListener mReadStateChangeListener = new OnSharedPreferenceChangeListener() { @@ -279,6 +278,12 @@ public class HomeActivity extends BaseActionBarActivity implements OnClickListen return null; } + @Override + protected boolean handleKeyboardShortcut(int keyCode, @NonNull KeyEvent event) { + mKeyboardShortcutsHandler.handleKey(null, keyCode, event); + return super.handleKeyboardShortcut(keyCode, event); + } + /** * Called when the context is first created. */ @@ -299,7 +304,7 @@ public class HomeActivity extends BaseActionBarActivity implements OnClickListen mReadStateManager = TwidereApplication.getInstance(this).getReadStateManager(); mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); mMultiSelectHandler = new MultiSelectEventHandler(this); - mHotKeyHandler = new HotKeyHandler(this); + mKeyboardShortcutsHandler = new KeyboardShortcutsHandler(this); mMultiSelectHandler.dispatchOnCreate(); final long[] accountIds = getAccountIds(this); if (accountIds.length == 0) { @@ -358,7 +363,6 @@ public class HomeActivity extends BaseActionBarActivity implements OnClickListen openAccountsDrawer(); } } - mPagerPosition = Float.NaN; setupHomeTabs(); final int initialTabPosition = handleIntent(intent, savedInstanceState == null); @@ -491,9 +495,6 @@ public class HomeActivity extends BaseActionBarActivity implements OnClickListen } break; } - default: { - if (mHotKeyHandler.handleKey(keyCode, event)) return true; - } } return super.onKeyUp(keyCode, event); } diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/CustomTabsFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/CustomTabsFragment.java index a1aeb2919..fe7a1d614 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/CustomTabsFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/CustomTabsFragment.java @@ -224,7 +224,7 @@ public class CustomTabsFragment extends BaseFragment implements LoaderCallbacks< @Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { - return inflater.inflate(R.layout.fragment_list_with_empty_view, container, false); + return inflater.inflate(R.layout.layout_draggable_list_with_empty_view, container, false); } @Override diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/KeyboardShortcutsFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/KeyboardShortcutsFragment.java new file mode 100644 index 000000000..4286a325a --- /dev/null +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/KeyboardShortcutsFragment.java @@ -0,0 +1,26 @@ +/* + * Twidere - Twitter client for Android + * + * Copyright (C) 2012-2015 Mariotaku Lee + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package org.mariotaku.twidere.fragment; + +/** + * Created by mariotaku on 15/4/10. + */ +public class KeyboardShortcutsFragment extends BaseListFragment { +} diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/support/AccountsManagerFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/support/AccountsManagerFragment.java index c74d107bf..5eb9e1dfc 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/support/AccountsManagerFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/support/AccountsManagerFragment.java @@ -227,7 +227,7 @@ public class AccountsManagerFragment extends BaseSupportFragment implements Load @Override public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { - return inflater.inflate(R.layout.fragment_list_with_empty_view, container, false); + return inflater.inflate(R.layout.layout_draggable_list_with_empty_view, container, false); } @Override diff --git a/twidere/src/main/java/org/mariotaku/twidere/util/HotKeyHandler.java b/twidere/src/main/java/org/mariotaku/twidere/util/HotKeyHandler.java deleted file mode 100644 index 1cdad6bc5..000000000 --- a/twidere/src/main/java/org/mariotaku/twidere/util/HotKeyHandler.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.mariotaku.twidere.util; - -import android.content.Context; -import android.content.Intent; -import android.view.KeyEvent; - -import org.mariotaku.twidere.Constants; - -public class HotKeyHandler implements Constants { - - private final Context mContext; - - public HotKeyHandler(final Context context) { - mContext = context; - } - - public boolean handleKey(final int keyCode, final KeyEvent event) { - switch (keyCode) { - case KeyEvent.KEYCODE_N: { - mContext.startActivity(new Intent(INTENT_ACTION_COMPOSE)); - return true; - } - } - return false; - } - -} diff --git a/twidere/src/main/java/org/mariotaku/twidere/util/KeyboardShortcutsHandler.java b/twidere/src/main/java/org/mariotaku/twidere/util/KeyboardShortcutsHandler.java new file mode 100644 index 000000000..2a5963060 --- /dev/null +++ b/twidere/src/main/java/org/mariotaku/twidere/util/KeyboardShortcutsHandler.java @@ -0,0 +1,89 @@ +package org.mariotaku.twidere.util; + +import android.content.Context; +import android.content.Intent; +import android.text.TextUtils; +import android.view.KeyEvent; + +import org.mariotaku.twidere.Constants; +import org.mariotaku.twidere.R; +import org.mariotaku.twidere.activity.support.ComposeActivity; +import org.mariotaku.twidere.activity.support.QuickSearchBarActivity; + +import java.util.HashMap; +import java.util.Locale; +import java.util.Set; + +public class KeyboardShortcutsHandler implements Constants { + + private static final HashMap sActionLabelMap = new HashMap<>(); + + static { + sActionLabelMap.put("compose", R.string.compose); + sActionLabelMap.put("search", R.string.search); + } + + private static final String KEYCODE_STRING_PREFIX = "KEYCODE_"; + private final Context mContext; + private final SharedPreferencesWrapper mPreferences; + + public KeyboardShortcutsHandler(final Context context) { + mContext = context; + mPreferences = SharedPreferencesWrapper.getInstance(context, KEYBOARD_SHORTCUTS_PREFERENCES_NAME, Context.MODE_PRIVATE); + } + + public static String getActionLabel(Context context, String action) { + if (!sActionLabelMap.containsKey(action)) return null; + final int labelRes = sActionLabelMap.get(action); + return context.getString(labelRes); + } + + public static Set getActions() { + return sActionLabelMap.keySet(); + } + + public static String getKeyEventKey(String contextTag, int keyCode, KeyEvent event) { + final StringBuilder keyNameBuilder = new StringBuilder(); + if (!TextUtils.isEmpty(contextTag)) { + keyNameBuilder.append(contextTag); + keyNameBuilder.append("_"); + } + if (event.isCtrlPressed()) { + keyNameBuilder.append("ctrl_"); + } + if (event.isAltPressed()) { + keyNameBuilder.append("alt_"); + } + if (event.isShiftPressed()) { + keyNameBuilder.append("shift_"); + } + final String keyCodeString = KeyEvent.keyCodeToString(keyCode); + if (keyCodeString.startsWith(KEYCODE_STRING_PREFIX)) { + keyNameBuilder.append(keyCodeString.substring(KEYCODE_STRING_PREFIX.length()).toLowerCase(Locale.US)); + } + return keyNameBuilder.toString(); + } + + public boolean handleKey(final String contextTag, final int keyCode, final KeyEvent event) { + if (!isValidForHotkey(keyCode, event)) return false; + final String key = getKeyEventKey(contextTag, keyCode, event); + final String action = mPreferences.getString(key, null); + if (action == null) return false; + switch (action) { + case "compose": { + mContext.startActivity(new Intent(mContext, ComposeActivity.class).setAction(INTENT_ACTION_COMPOSE)); + return true; + } + case "search": { + mContext.startActivity(new Intent(mContext, QuickSearchBarActivity.class).setAction(INTENT_ACTION_QUICK_SEARCH)); + return true; + } + } + return false; + } + + public static boolean isValidForHotkey(int keyCode, KeyEvent event) { + return !event.isSystem() && !KeyEvent.isModifierKey(keyCode) && keyCode != KeyEvent.KEYCODE_UNKNOWN; + } + +} diff --git a/twidere/src/main/java/org/mariotaku/twidere/view/HomeSlidingMenu.java b/twidere/src/main/java/org/mariotaku/twidere/view/HomeSlidingMenu.java index 9f6fd7360..19e0894b2 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/view/HomeSlidingMenu.java +++ b/twidere/src/main/java/org/mariotaku/twidere/view/HomeSlidingMenu.java @@ -4,6 +4,7 @@ import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Rect; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.v4.view.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; @@ -20,8 +21,6 @@ import org.mariotaku.twidere.activity.support.HomeActivity; */ public class HomeSlidingMenu extends SlidingMenu implements Constants { - private final HomeActivity mActivity; - public HomeSlidingMenu(final Context context) { this(context, null); } @@ -32,7 +31,6 @@ public class HomeSlidingMenu extends SlidingMenu implements Constants { public HomeSlidingMenu(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); - mActivity = (HomeActivity) context; } @Override @@ -49,7 +47,9 @@ public class HomeSlidingMenu extends SlidingMenu implements Constants { @Override protected boolean fitSystemWindows(Rect insets) { - mActivity.setSystemWindowInsets(insets); + if (isInEditMode()) return false; + final HomeActivity activity = (HomeActivity) getContext(); + activity.setSystemWindowInsets(insets); return false; } @@ -59,9 +59,12 @@ public class HomeSlidingMenu extends SlidingMenu implements Constants { return new MyCustomViewBehind(context, this); } + @Nullable private ViewPager getViewPager() { - if (mActivity == null) return null; - return mActivity.getViewPager(); + if (isInEditMode()) return null; + final HomeActivity activity = (HomeActivity) getContext(); + if (activity == null) return null; + return activity.getViewPager(); } private boolean isTouchingMargin(final MotionEvent e) { diff --git a/twidere/src/main/res/drawable-hdpi/ic_action_warning.png b/twidere/src/main/res/drawable-hdpi/ic_action_warning.png index 1de46041c..2ff45c18a 100755 Binary files a/twidere/src/main/res/drawable-hdpi/ic_action_warning.png and b/twidere/src/main/res/drawable-hdpi/ic_action_warning.png differ diff --git a/twidere/src/main/res/drawable-hdpi/ic_card_media_play.png b/twidere/src/main/res/drawable-hdpi/ic_card_media_play.png index 6120cdef0..0501237d9 100755 Binary files a/twidere/src/main/res/drawable-hdpi/ic_card_media_play.png and b/twidere/src/main/res/drawable-hdpi/ic_card_media_play.png differ diff --git a/twidere/src/main/res/drawable-hdpi/ic_info_drafts.png b/twidere/src/main/res/drawable-hdpi/ic_info_drafts.png new file mode 100755 index 000000000..3a991b833 Binary files /dev/null and b/twidere/src/main/res/drawable-hdpi/ic_info_drafts.png differ diff --git a/twidere/src/main/res/drawable-hdpi/ic_info_search.png b/twidere/src/main/res/drawable-hdpi/ic_info_search.png index 0c5dfa0b0..bdeb4fad7 100755 Binary files a/twidere/src/main/res/drawable-hdpi/ic_info_search.png and b/twidere/src/main/res/drawable-hdpi/ic_info_search.png differ diff --git a/twidere/src/main/res/drawable-mdpi/ic_action_warning.png b/twidere/src/main/res/drawable-mdpi/ic_action_warning.png index f909b8f09..9fa3b8a2f 100755 Binary files a/twidere/src/main/res/drawable-mdpi/ic_action_warning.png and b/twidere/src/main/res/drawable-mdpi/ic_action_warning.png differ diff --git a/twidere/src/main/res/drawable-mdpi/ic_card_media_play.png b/twidere/src/main/res/drawable-mdpi/ic_card_media_play.png index c86f3969d..6c2101198 100755 Binary files a/twidere/src/main/res/drawable-mdpi/ic_card_media_play.png and b/twidere/src/main/res/drawable-mdpi/ic_card_media_play.png differ diff --git a/twidere/src/main/res/drawable-mdpi/ic_info_drafts.png b/twidere/src/main/res/drawable-mdpi/ic_info_drafts.png new file mode 100755 index 000000000..0bbf926f4 Binary files /dev/null and b/twidere/src/main/res/drawable-mdpi/ic_info_drafts.png differ diff --git a/twidere/src/main/res/drawable-mdpi/ic_info_search.png b/twidere/src/main/res/drawable-mdpi/ic_info_search.png index d044d4f56..74727a759 100755 Binary files a/twidere/src/main/res/drawable-mdpi/ic_info_search.png and b/twidere/src/main/res/drawable-mdpi/ic_info_search.png differ diff --git a/twidere/src/main/res/drawable-xhdpi/ic_action_warning.png b/twidere/src/main/res/drawable-xhdpi/ic_action_warning.png index ac6618363..642406356 100755 Binary files a/twidere/src/main/res/drawable-xhdpi/ic_action_warning.png and b/twidere/src/main/res/drawable-xhdpi/ic_action_warning.png differ diff --git a/twidere/src/main/res/drawable-xhdpi/ic_card_media_play.png b/twidere/src/main/res/drawable-xhdpi/ic_card_media_play.png index 4e2f66ea7..84ec2029d 100755 Binary files a/twidere/src/main/res/drawable-xhdpi/ic_card_media_play.png and b/twidere/src/main/res/drawable-xhdpi/ic_card_media_play.png differ diff --git a/twidere/src/main/res/drawable-xhdpi/ic_info_drafts.png b/twidere/src/main/res/drawable-xhdpi/ic_info_drafts.png new file mode 100755 index 000000000..2b54e74f1 Binary files /dev/null and b/twidere/src/main/res/drawable-xhdpi/ic_info_drafts.png differ diff --git a/twidere/src/main/res/drawable-xhdpi/ic_info_search.png b/twidere/src/main/res/drawable-xhdpi/ic_info_search.png index 302fb4a4a..dc5bbdda3 100755 Binary files a/twidere/src/main/res/drawable-xhdpi/ic_info_search.png and b/twidere/src/main/res/drawable-xhdpi/ic_info_search.png differ diff --git a/twidere/src/main/res/drawable-xxhdpi/ic_action_warning.png b/twidere/src/main/res/drawable-xxhdpi/ic_action_warning.png index 78ca441e9..44188aead 100755 Binary files a/twidere/src/main/res/drawable-xxhdpi/ic_action_warning.png and b/twidere/src/main/res/drawable-xxhdpi/ic_action_warning.png differ diff --git a/twidere/src/main/res/drawable-xxhdpi/ic_card_media_play.png b/twidere/src/main/res/drawable-xxhdpi/ic_card_media_play.png index cd7858b94..a1047c6f7 100755 Binary files a/twidere/src/main/res/drawable-xxhdpi/ic_card_media_play.png and b/twidere/src/main/res/drawable-xxhdpi/ic_card_media_play.png differ diff --git a/twidere/src/main/res/drawable-xxhdpi/ic_info_drafts.png b/twidere/src/main/res/drawable-xxhdpi/ic_info_drafts.png new file mode 100755 index 000000000..dba08f1da Binary files /dev/null and b/twidere/src/main/res/drawable-xxhdpi/ic_info_drafts.png differ diff --git a/twidere/src/main/res/drawable-xxhdpi/ic_info_search.png b/twidere/src/main/res/drawable-xxhdpi/ic_info_search.png index 10d51c32f..69bb16056 100755 Binary files a/twidere/src/main/res/drawable-xxhdpi/ic_info_search.png and b/twidere/src/main/res/drawable-xxhdpi/ic_info_search.png differ diff --git a/twidere/src/main/res/layout/activity_drafts.xml b/twidere/src/main/res/layout/activity_drafts.xml deleted file mode 100644 index 20aa652ca..000000000 --- a/twidere/src/main/res/layout/activity_drafts.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - r - \ No newline at end of file diff --git a/twidere/src/main/res/layout/fragment_list_with_empty_view.xml b/twidere/src/main/res/layout/layout_draggable_list_with_empty_view.xml similarity index 87% rename from twidere/src/main/res/layout/fragment_list_with_empty_view.xml rename to twidere/src/main/res/layout/layout_draggable_list_with_empty_view.xml index 808d59066..e3417c290 100644 --- a/twidere/src/main/res/layout/fragment_list_with_empty_view.xml +++ b/twidere/src/main/res/layout/layout_draggable_list_with_empty_view.xml @@ -20,23 +20,21 @@ - + android:animateLayoutChanges="true"> + android:layout_height="match_parent"> + tools:context=".fragment.CustomTabsFragment" + tools:visibility="gone"/> @@ -76,14 +75,14 @@ + android:layout_height="match_parent"> \ No newline at end of file diff --git a/twidere/src/main/res/layout/layout_list_with_empty_view.xml b/twidere/src/main/res/layout/layout_list_with_empty_view.xml new file mode 100644 index 000000000..176432601 --- /dev/null +++ b/twidere/src/main/res/layout/layout_list_with_empty_view.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/twidere/src/main/res/values/strings.xml b/twidere/src/main/res/values/strings.xml index 4ee7afa7b..020447922 100644 --- a/twidere/src/main/res/values/strings.xml +++ b/twidere/src/main/res/values/strings.xml @@ -736,5 +736,7 @@ %d tweets %d favorites %d favorites + Your unsent tweets will goes here + Keyboard shortcuts \ No newline at end of file diff --git a/twidere/src/main/res/xml/preferences_other.xml b/twidere/src/main/res/xml/preferences_other.xml index 12468435c..a0690d6f2 100644 --- a/twidere/src/main/res/xml/preferences_other.xml +++ b/twidere/src/main/res/xml/preferences_other.xml @@ -46,4 +46,8 @@ android:title="@string/import_export_settings" android:key="import_export_settings"/> + + \ No newline at end of file