ui improvements
@ -66,6 +66,7 @@ dependencies {
|
||||
compile 'com.commonsware.cwac:merge:1.1.1'
|
||||
compile 'com.diegocarloslima:byakugallery:0.1.0'
|
||||
compile 'com.rengwuxian.materialedittext:library:1.8.2'
|
||||
compile 'com.pnikosis:materialish-progress:1.4'
|
||||
compile 'com.squareup.okhttp:okhttp:2.2.0'
|
||||
googleCompile 'com.google.android.gms:play-services:6.5.87'
|
||||
googleCompile 'com.google.maps.android:android-maps-utils:0.3.4'
|
||||
|
@ -19,11 +19,11 @@
|
||||
|
||||
package org.mariotaku.twidere.activity.support;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
@ -81,8 +81,8 @@ public class OpenStreetMapViewerActivity extends BaseSupportActivity implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContentChanged() {
|
||||
super.onContentChanged();
|
||||
public void onSupportContentChanged() {
|
||||
super.onSupportContentChanged();
|
||||
mMapView = (MapView) findViewById(R.id.map_view);
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ public class OpenStreetMapViewerActivity extends BaseSupportActivity implements
|
||||
}
|
||||
mLatitude = latitude;
|
||||
mLongitude = longitude;
|
||||
final ActionBar actionBar = getActionBar();
|
||||
final ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.mariotaku.twidere"
|
||||
<manifest package="org.mariotaku.twidere"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:installLocation="auto">
|
||||
|
||||
<uses-sdk/>
|
||||
@ -171,10 +171,10 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.support.QuickSearchBarActivity"
|
||||
android:label="@android:string/search_go"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Blank.Dialog"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:label="@android:string/search_go">
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="org.mariotaku.twidere.GLOBAL_SEARCH"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
@ -569,9 +569,16 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.TestActivity"
|
||||
android:enabled="false"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.Test"
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
android:label="Twidere test"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activity.NyanActivity"
|
||||
android:launchMode="singleTop"
|
||||
|
@ -19,26 +19,16 @@
|
||||
|
||||
package org.mariotaku.twidere.activity;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.mariotaku.twidere.Constants;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.support.BaseSupportActivity;
|
||||
|
||||
public class TestActivity extends Activity implements Constants {
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
final ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.hide();
|
||||
}
|
||||
startActivity(new Intent(this, SettingsWizardActivity.class));
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,9 +66,11 @@ import com.squareup.otto.Subscribe;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.DataProfilingSettingsActivity;
|
||||
import org.mariotaku.twidere.activity.SettingsActivity;
|
||||
import org.mariotaku.twidere.activity.SettingsWizardActivity;
|
||||
import org.mariotaku.twidere.adapter.support.SupportTabsAdapter;
|
||||
import org.mariotaku.twidere.app.TwidereApplication;
|
||||
import org.mariotaku.twidere.fragment.CustomTabsFragment;
|
||||
import org.mariotaku.twidere.fragment.iface.IBaseFragment;
|
||||
import org.mariotaku.twidere.fragment.iface.IBasePullToRefreshFragment;
|
||||
import org.mariotaku.twidere.fragment.iface.RefreshScrollTopInterface;
|
||||
@ -85,6 +87,7 @@ import org.mariotaku.twidere.util.ActivityAccessor;
|
||||
import org.mariotaku.twidere.util.ActivityAccessor.TaskDescriptionCompat;
|
||||
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.MathUtils;
|
||||
@ -107,7 +110,6 @@ import edu.ucdavis.earlybird.ProfilingUtil;
|
||||
|
||||
import static org.mariotaku.twidere.util.CompareUtils.classEquals;
|
||||
import static org.mariotaku.twidere.util.CustomTabUtils.getAddedTabPosition;
|
||||
import static org.mariotaku.twidere.util.CustomTabUtils.getHomeTabs;
|
||||
import static org.mariotaku.twidere.util.Utils.cleanDatabasesByItemLimit;
|
||||
import static org.mariotaku.twidere.util.Utils.getAccountIds;
|
||||
import static org.mariotaku.twidere.util.Utils.getDefaultAccountId;
|
||||
@ -301,6 +303,7 @@ public class HomeActivity extends BaseSupportActivity implements OnClickListener
|
||||
mTabIndicator.setDisplayBadge(mPreferences.getBoolean(KEY_UNREAD_COUNT, true));
|
||||
mActionsButton.setOnClickListener(this);
|
||||
mActionsButton.setOnLongClickListener(this);
|
||||
mEmptyTabHint.setOnClickListener(this);
|
||||
setTabPosition(initialTabPosition);
|
||||
setupSlidingMenu();
|
||||
setupBars();
|
||||
@ -411,6 +414,13 @@ public class HomeActivity extends BaseSupportActivity implements OnClickListener
|
||||
triggerActionsClick();
|
||||
break;
|
||||
}
|
||||
case R.id.empty_tab_hint: {
|
||||
final Intent intent = new Intent(this, SettingsActivity.class);
|
||||
intent.putExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT, CustomTabsFragment.class.getName());
|
||||
intent.putExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT_TITLE, R.string.tabs);
|
||||
startActivityForResult(intent, REQUEST_SETTINGS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -697,7 +707,7 @@ public class HomeActivity extends BaseSupportActivity implements OnClickListener
|
||||
|
||||
private void setupHomeTabs() {
|
||||
mPagerAdapter.clear();
|
||||
mPagerAdapter.addTabs(getHomeTabs(this));
|
||||
mPagerAdapter.addTabs(CustomTabUtils.getHomeTabs(this));
|
||||
final boolean hasNoTab = mPagerAdapter.getCount() == 0;
|
||||
mEmptyTabHint.setVisibility(hasNoTab ? View.VISIBLE : View.GONE);
|
||||
mViewPager.setVisibility(hasNoTab ? View.GONE : View.VISIBLE);
|
||||
|
@ -38,7 +38,6 @@ import android.view.WindowManager.LayoutParams;
|
||||
|
||||
import org.mariotaku.twidere.R;
|
||||
import org.mariotaku.twidere.activity.iface.IControlBarActivity;
|
||||
import org.mariotaku.twidere.fragment.iface.IBaseFragment;
|
||||
import org.mariotaku.twidere.fragment.iface.IBaseFragment.SystemWindowsInsetsCallback;
|
||||
import org.mariotaku.twidere.fragment.iface.IBasePullToRefreshFragment;
|
||||
import org.mariotaku.twidere.fragment.iface.RefreshScrollTopInterface;
|
||||
@ -168,10 +167,7 @@ public class LinkHandlerActivity extends BaseSupportActivity implements OnClickL
|
||||
@Override
|
||||
public void fitSystemWindows(Rect insets) {
|
||||
super.fitSystemWindows(insets);
|
||||
final Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.main_content);
|
||||
if (fragment instanceof IBaseFragment) {
|
||||
((IBaseFragment) fragment).requestFitSystemWindows();
|
||||
}
|
||||
mMainContent.setPadding(insets.left, insets.top, insets.right, insets.bottom);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,7 +30,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import com.diegocarloslima.byakugallery.lib.TileBitmapDrawable;
|
||||
import com.diegocarloslima.byakugallery.lib.TileBitmapDrawable.OnInitializeListener;
|
||||
import com.diegocarloslima.byakugallery.lib.TouchImageView;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
@ -128,17 +127,8 @@ public final class MediaViewerActivity extends BaseSupportActivity implements Co
|
||||
if (data.hasData()) {
|
||||
mImageView.setVisibility(View.VISIBLE);
|
||||
if (data.useDecoder) {
|
||||
TileBitmapDrawable.attachTileBitmapDrawable(mImageView, data.file.getAbsolutePath(), null, new OnInitializeListener() {
|
||||
@Override
|
||||
public void onStartInitialization() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEndInitialization() {
|
||||
|
||||
}
|
||||
});
|
||||
TileBitmapDrawable.attachTileBitmapDrawable(mImageView, data.file.getAbsolutePath(),
|
||||
null, null);
|
||||
} else {
|
||||
mImageView.setImageBitmap(data.bitmap);
|
||||
}
|
||||
|
@ -425,11 +425,10 @@ public class DirectMessagesConversationFragment extends BaseSupportFragment impl
|
||||
|
||||
@Override
|
||||
protected void fitSystemWindows(Rect insets) {
|
||||
super.fitSystemWindows(insets);
|
||||
final View view = getView();
|
||||
if (view != null) {
|
||||
view.setPadding(insets.left, insets.top, insets.right, insets.bottom);
|
||||
}
|
||||
// final View view = getView();
|
||||
// if (view != null) {
|
||||
// view.setPadding(insets.left, view.getPaddingTop(), insets.right, insets.bottom);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,6 +23,7 @@ import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Rect;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
||||
@ -246,6 +247,7 @@ public class DirectMessagesFragment extends BasePullToRefreshListFragment implem
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected long getAccountId() {
|
||||
final Bundle args = getArguments();
|
||||
return args != null ? args.getLong(EXTRA_ACCOUNT_ID, -1) : -1;
|
||||
|
@ -2527,8 +2527,8 @@ public final class Utils implements Constants, TwitterConstants {
|
||||
final ConfigurationBuilder cb = new ConfigurationBuilder();
|
||||
cb.setHostAddressResolverFactory(new TwidereHostResolverFactory(app));
|
||||
if (apacheHttp) {
|
||||
// cb.setHttpClientFactory(new ApacheHttpClientFactory(app));
|
||||
cb.setHttpClientFactory(new OkHttpClientFactory());
|
||||
cb.setHttpClientFactory(new ApacheHttpClientFactory(app));
|
||||
// cb.setHttpClientFactory(new OkHttpClientFactory());
|
||||
}
|
||||
cb.setHttpConnectionTimeout(connection_timeout);
|
||||
cb.setGZIPEnabled(enableGzip);
|
||||
|
@ -79,7 +79,7 @@ public class TintedStatusFrameLayout extends FrameLayout {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean fitSystemWindows(Rect insets) {
|
||||
protected boolean fitSystemWindows(@NonNull Rect insets) {
|
||||
setStatusBarHeight(Utils.getInsetsTopWithoutActionBarHeight(getContext(), insets.top));
|
||||
final Context context = getContext();
|
||||
if (context instanceof FitSystemWindowsCallback) {
|
||||
|
BIN
twidere/src/main/res/drawable-hdpi/ic_action_link.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
twidere/src/main/res/drawable-hdpi/ic_info_tab.png
Executable file
After Width: | Height: | Size: 791 B |
BIN
twidere/src/main/res/drawable-hdpi/ic_info_tab_unselected.png
Executable file
After Width: | Height: | Size: 906 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_action_link.png
Executable file
After Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 783 B After Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
BIN
twidere/src/main/res/drawable-mdpi/ic_info_tab.png
Executable file
After Width: | Height: | Size: 478 B |
BIN
twidere/src/main/res/drawable-mdpi/ic_info_tab_unselected.png
Executable file
After Width: | Height: | Size: 643 B |
BIN
twidere/src/main/res/drawable-xhdpi/ic_action_link.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
twidere/src/main/res/drawable-xhdpi/ic_info_tab.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
twidere/src/main/res/drawable-xhdpi/ic_info_tab_unselected.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
twidere/src/main/res/drawable-xxhdpi/ic_action_link.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
BIN
twidere/src/main/res/drawable-xxhdpi/ic_info_tab.png
Executable file
After Width: | Height: | Size: 2.1 KiB |
BIN
twidere/src/main/res/drawable-xxhdpi/ic_info_tab_unselected.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
@ -30,7 +30,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<include layout="@layout/empty_tab_hint"/>
|
||||
<include layout="@layout/layout_empty_tab_hint"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tabs_container"
|
||||
|
@ -66,7 +66,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:src="@drawable/ic_error_generic"/>
|
||||
android:src="@drawable/ic_info_error_generic"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pages_error_text"
|
||||
|
@ -29,10 +29,9 @@
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="32dp"/>
|
||||
android:layout_width="@dimen/element_size_normal"
|
||||
android:layout_height="@dimen/element_size_normal"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
|
||||
</FrameLayout>
|
@ -19,15 +19,33 @@
|
||||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.mariotaku.twidere.view.themed.ThemedTextView
|
||||
<LinearLayout
|
||||
android:id="@+id/empty_tab_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/no_tab_hint"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<org.mariotaku.twidere.view.ActionIconView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:color="?android:textColorSecondary"
|
||||
android:src="@drawable/ic_info_tab"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/element_spacing_normal"
|
||||
android:gravity="center"
|
||||
android:text="@string/edit_tabs"
|
||||
android:textAppearance="?android:textAppearanceMedium"/>
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
@ -101,7 +101,7 @@
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:color="?android:textColorPrimary"
|
||||
android:src="@drawable/ic_action_web"/>
|
||||
android:src="@drawable/ic_action_link"/>
|
||||
|
||||
<org.mariotaku.twidere.view.HandleSpanClickTextView
|
||||
android:id="@+id/url"
|
||||
@ -130,7 +130,7 @@
|
||||
android:layout_width="@dimen/element_size_small"
|
||||
android:layout_height="@dimen/element_size_small"
|
||||
android:color="?android:textColorPrimary"
|
||||
android:src="@drawable/ic_action_time"/>
|
||||
android:src="@drawable/ic_action_portal_cake"/>
|
||||
|
||||
<org.mariotaku.twidere.view.themed.ThemedTextView
|
||||
android:id="@+id/created_at"
|
||||
|
@ -717,5 +717,6 @@
|
||||
<string name="blocked_by_user_summary">You were blocked by <xliff:g id="name">%s</xliff:g></string>
|
||||
<string name="select_accounts">Select accounts</string>
|
||||
<string name="media_preview">Media preview</string>
|
||||
<string name="edit_tabs">Edit tabs</string>
|
||||
|
||||
</resources>
|