added some xxxhdpi resources

added empty message for timeline
This commit is contained in:
Mariotaku Lee 2015-04-26 14:11:53 +08:00
parent 95c60ceeae
commit e2b0f62f93
42 changed files with 25 additions and 11 deletions

View File

@ -255,6 +255,7 @@ public class DraftsActivity extends BaseDialogWhenLargeActivity implements Loade
public void setListShown(boolean listShown) { public void setListShown(boolean listShown) {
mListContainer.setVisibility(listShown ? View.VISIBLE : View.GONE); mListContainer.setVisibility(listShown ? View.VISIBLE : View.GONE);
mProgressContainer.setVisibility(listShown ? View.GONE : View.VISIBLE); mProgressContainer.setVisibility(listShown ? View.GONE : View.VISIBLE);
mEmptyView.setVisibility(listShown && mAdapter.isEmpty() ? View.VISIBLE : View.GONE);
} }
private void editDraft(final DraftItem draft) { private void editDraft(final DraftItem draft) {

View File

@ -306,6 +306,14 @@ public abstract class AbsContentListFragment<A extends IContentCardAdapter> exte
mErrorTextView.setText(text); mErrorTextView.setText(text);
} }
protected final void showEmpty(int icon, CharSequence text) {
mErrorContainer.setVisibility(View.VISIBLE);
mProgressContainer.setVisibility(View.GONE);
mSwipeRefreshLayout.setVisibility(View.VISIBLE);
mErrorIconView.setImageResource(icon);
mErrorTextView.setText(text);
}
protected void updateRefreshProgressOffset() { protected void updateRefreshProgressOffset() {
final FragmentActivity activity = getActivity(); final FragmentActivity activity = getActivity();
if (!(activity instanceof IControlBarActivity) || mSystemWindowsInsets.top == 0 || mSwipeRefreshLayout == null if (!(activity instanceof IControlBarActivity) || mSystemWindowsInsets.top == 0 || mSwipeRefreshLayout == null

View File

@ -181,9 +181,9 @@ public abstract class AbsStatusesFragment<Data> extends AbsContentListFragment<A
lastVisibleTop = 0; lastVisibleTop = 0;
} }
adapter.setData(data); adapter.setData(data);
setRefreshEnabled(true);
if (!(loader instanceof IExtendedLoader) || ((IExtendedLoader) loader).isFromUser()) { if (!(loader instanceof IExtendedLoader) || ((IExtendedLoader) loader).isFromUser()) {
adapter.setLoadMoreSupported(hasMoreData(data)); adapter.setLoadMoreSupported(hasMoreData(data));
setRefreshEnabled(true);
int pos = -1; int pos = -1;
for (int i = 0, j = adapter.getItemCount(); i < j; i++) { for (int i = 0, j = adapter.getItemCount(); i < j; i++) {
if (lastReadId != -1 && lastReadId == adapter.getStatusId(i)) { if (lastReadId != -1 && lastReadId == adapter.getStatusId(i)) {

View File

@ -67,8 +67,12 @@ public abstract class CursorStatusesFragment extends AbsStatusesFragment<Cursor>
@Override @Override
protected void onLoadingFinished() { protected void onLoadingFinished() {
final long[] accountIds = getAccountIds(); final long[] accountIds = getAccountIds();
if (accountIds.length > 0) { final AbsStatusesAdapter<Cursor> adapter = getAdapter();
if (adapter.getItemCount() > 0) {
showContent(); showContent();
} else if (accountIds.length > 0) {
showContent();
showEmpty(R.drawable.ic_info_refresh, getString(R.string.swipe_down_to_refresh));
} else { } else {
showError(R.drawable.ic_info_account, getString(R.string.no_account_selected)); showError(R.drawable.ic_info_account, getString(R.string.no_account_selected));
} }

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 781 B

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -16,15 +16,15 @@
--> -->
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_action_assist_twidere_normal" <item android:drawable="@drawable/ic_assist_action_twidere_normal"
android:state_active="false" android:state_active="false"
android:state_enabled="true" android:state_enabled="true"
android:state_focused="false"/> android:state_focused="false"/>
<item android:drawable="@drawable/ic_action_assist_twidere_activated" <item android:drawable="@drawable/ic_assist_action_twidere_activated"
android:state_active="true" android:state_active="true"
android:state_enabled="true" android:state_enabled="true"
android:state_focused="false"/> android:state_focused="false"/>
<item android:drawable="@drawable/ic_action_assist_twidere_activated" <item android:drawable="@drawable/ic_assist_action_twidere_activated"
android:state_active="false" android:state_active="false"
android:state_enabled="true" android:state_enabled="true"
android:state_focused="true"/> android:state_focused="true"/>

View File

@ -66,12 +66,13 @@
<requestFocus /> <requestFocus />
</EditText> </EditText>
<org.mariotaku.twidere.view.themed.TintThemedImageButton <org.mariotaku.twidere.view.ActionIconButton
android:id="@+id/search_submit" android:id="@+id/search_submit"
android:layout_width="@dimen/element_size_normal" android:layout_width="@dimen/element_size_normal"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0" android:layout_weight="0"
android:background="?android:actionBarItemBackground" android:background="?android:actionBarItemBackground"
android:color="?menuIconColor"
android:src="@drawable/ic_action_search" /> android:src="@drawable/ic_action_search" />
</LinearLayout> </LinearLayout>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
~ Twidere - Twitter client for Android ~ Twidere - Twitter client for Android
~ ~
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com> ~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
@ -25,6 +24,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:animateLayoutChanges="true"> android:animateLayoutChanges="true">
<include layout="@layout/layout_content_fragment_common" />
<android.support.v4.widget.SwipeRefreshLayout <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_layout" android:id="@+id/swipe_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -38,9 +39,7 @@
android:clipToPadding="false" android:clipToPadding="false"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="false" android:focusableInTouchMode="false"
android:scrollbars="vertical"/> android:scrollbars="vertical" />
</android.support.v4.widget.SwipeRefreshLayout> </android.support.v4.widget.SwipeRefreshLayout>
<include layout="@layout/layout_content_fragment_common"/>
</FrameLayout> </FrameLayout>

View File

@ -737,4 +737,5 @@
<string name="keyboard_shortcut_back">Back</string> <string name="keyboard_shortcut_back">Back</string>
<string name="press_again_to_close">Press again to close</string> <string name="press_again_to_close">Press again to close</string>
<string name="name_not_set"><xliff:g id="name">%s</xliff:g> not set</string> <string name="name_not_set"><xliff:g id="name">%s</xliff:g> not set</string>
<string name="swipe_down_to_refresh">Swipe down to refresh</string>
</resources> </resources>