updated library version

disabled acra reporting
fixed 'open with account' not working issue
This commit is contained in:
Mariotaku Lee 2014-12-02 00:29:34 +08:00
parent fd8e90aa65
commit 0abbe2a2d8
7 changed files with 263 additions and 256 deletions

View File

@ -79,21 +79,19 @@ android {
dependencies {
// wearApp project(':twidere.wear')
compile 'com.android.support:support-v13:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:palette-v7:21.0.0'
compile 'com.android.support:support-v13:21.0.2'
compile 'com.android.support:cardview-v7:21.0.2'
compile 'com.android.support:recyclerview-v7:21.0.2'
compile 'com.android.support:palette-v7:21.0.2'
compile 'com.etsy.android.grid:library:1.0.5'
compile 'com.sothree.slidinguppanel:library:2.0.0'
compile 'it.sephiroth.android.library.imagezoom:imagezoom:1.0.5'
compile 'com.twitter:twitter-text:1.9.9'
compile 'com.twitter:twitter-text:1.10.1'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile 'org.apache.httpcomponents:httpmime:4.3.5'
compile 'ch.acra:acra:4.5.0'
compile 'com.google.android.apps.dashclock:dashclock-api:2.0.0'
compile 'me.grantland:autofittextview:0.2.0'
compile 'com.github.johnpersano:supertoasts:1.3.4.1@aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
googleCompile 'com.google.android.gms:play-services:6.1.71'
fdroidCompile 'org.osmdroid:osmdroid-android:4.2'

View File

@ -75,7 +75,7 @@ public class AccountSelectorActivity extends BaseSupportDialogActivity implement
switch (view.getId()) {
case R.id.save: {
final long[] checkedIds = mListView.getCheckedItemIds();
if (checkedIds == null || checkedIds.length == 0 && !isSelectNoneAllowed()) {
if (checkedIds.length == 0 && !isSelectNoneAllowed()) {
Toast.makeText(this, R.string.no_account_selected, Toast.LENGTH_SHORT).show();
return;
}
@ -102,19 +102,6 @@ public class AccountSelectorActivity extends BaseSupportDialogActivity implement
return new CursorLoader(this, Accounts.CONTENT_URI, Accounts.COLUMNS, where, null, null);
}
@Override
public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {
final Intent data = new Intent();
data.putExtra(EXTRA_ID, id);
setResult(RESULT_OK, data);
finish();
}
@Override
public void onLoaderReset(final Loader<Cursor> loader) {
mAdapter.swapCursor(null);
}
@Override
public void onLoadFinished(final Loader<Cursor> loader, final Cursor cursor) {
mAdapter.swapCursor(cursor);
@ -126,6 +113,19 @@ public class AccountSelectorActivity extends BaseSupportDialogActivity implement
}
}
@Override
public void onLoaderReset(final Loader<Cursor> loader) {
mAdapter.swapCursor(null);
}
@Override
public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {
final Intent data = new Intent();
data.putExtra(EXTRA_ID, mAdapter.getAccount(position).account_id);
setResult(RESULT_OK, data);
finish();
}
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -147,6 +147,12 @@ public class AccountSelectorActivity extends BaseSupportDialogActivity implement
}
@Override
protected void onStart() {
super.onStart();
getContentResolver().registerContentObserver(Accounts.CONTENT_URI, true, mContentObserver);
}
@Override
protected void onResume() {
super.onResume();
@ -154,12 +160,6 @@ public class AccountSelectorActivity extends BaseSupportDialogActivity implement
mAdapter.setDisplayProfileImage(display_profile_image);
}
@Override
protected void onStart() {
super.onStart();
getContentResolver().registerContentObserver(Accounts.CONTENT_URI, true, mContentObserver);
}
@Override
protected void onStop() {
getContentResolver().unregisterContentObserver(mContentObserver);

View File

@ -191,8 +191,8 @@ public class LinkHandlerActivity extends BaseSupportActivity implements OnClickL
mMainContent.setDrawShadow(false);
mMainContent.setDrawColor(!ThemeUtils.isDarkTheme(getCurrentThemeResourceId()));
mMainContent.setFactor(1);
final int color = ThemeUtils.getUserAccentColor(this);
final int alpha = ThemeUtils.getThemeAlpha(this);
final int color = getCurrentThemeColor();
final int alpha = getCurrentThemeBackgroundAlpha();
mMainContent.setColor(color, alpha);
break;
}

View File

@ -248,8 +248,8 @@ public class TwidereApplication extends Application implements Constants, OnShar
}
private void configACRA() {
ACRA.init(this);
ACRA.getErrorReporter().setReportSender(new EmailIntentSender(this));
// ACRA.init(this);
// ACRA.getErrorReporter().setReportSender(new EmailIntentSender(this));
}
private DiskCache createDiskCache(final String dirName) {

View File

@ -57,6 +57,7 @@ import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.graphics.Palette;
import android.support.v7.graphics.Palette.PaletteAsyncListener;
import android.support.v7.widget.CardView;
import android.text.Html;
import android.text.TextUtils;
import android.util.Log;
@ -155,6 +156,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
public static final String TRANSITION_NAME_PROFILE_IMAGE = "profile_image";
public static final String TRANSITION_NAME_PROFILE_TYPE = "profile_type";
public static final String TRANSITION_NAME_CARD = "card";
private static final int LOADER_ID_USER = 1;
private static final int LOADER_ID_FRIENDSHIP = 2;
@ -178,11 +180,20 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
private HeaderDrawerLayout mHeaderDrawerLayout;
private ViewPager mViewPager;
private PagerSlidingTabStrip mPagerIndicator;
private CardView mCardView;
private View mUuckyFooter;
private SupportTabsAdapter mPagerAdapter;
private Relationship mRelationship;
private ParcelableUser mUser = null;
private Locale mLocale;
private boolean mGetUserInfoLoaderInitialized, mGetFriendShipLoaderInitialized;
private int mBannerWidth;
private ActionBarDrawable mActionBarBackground;
private Fragment mCurrentVisibleFragment;
private final BroadcastReceiver mStatusReceiver = new BroadcastReceiver() {
@Override
@ -327,12 +338,6 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
}
};
private Locale mLocale;
private boolean mGetUserInfoLoaderInitialized, mGetFriendShipLoaderInitialized;
private int mBannerWidth;
private ActionBarDrawable mActionBarBackground;
private Fragment mCurrentVisibleFragment;
private View mUuckyFooter;
public void displayUser(final ParcelableUser user) {
mRelationship = null;
@ -544,7 +549,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
if (resultCode == Activity.RESULT_OK) {
if (data == null || !data.hasExtra(EXTRA_ID)) return;
final long accountId = data.getLongExtra(EXTRA_ID, -1);
openUserProfile(getActivity(), accountId, user.id, null, null);
openUserProfile(getActivity(), accountId, user.id, user.screen_name, null);
}
break;
}
@ -587,6 +592,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
ViewCompat.setTransitionName(mProfileImageView, TRANSITION_NAME_PROFILE_IMAGE);
ViewCompat.setTransitionName(mProfileTypeView, TRANSITION_NAME_PROFILE_TYPE);
ViewCompat.setTransitionName(mCardView, TRANSITION_NAME_CARD);
mHeaderDrawerLayout.setDrawerCallback(this);
@ -809,6 +815,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
mProfileBannerView = (ProfileBannerImageView) view.findViewById(R.id.profile_banner);
final View headerView = mHeaderDrawerLayout.getHeader();
final View contentView = mHeaderDrawerLayout.getContent();
mCardView = (CardView) headerView.findViewById(R.id.card);
mNameView = (TextView) headerView.findViewById(R.id.name);
mScreenNameView = (TextView) headerView.findViewById(R.id.screen_name);
mDescriptionView = (TextView) headerView.findViewById(R.id.description);
@ -1297,23 +1304,24 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
return mColor;
}
public void setColor(int color) {
mColor = color;
updatePaint();
}
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
mBounds.set(bounds);
}
public void setColor(int color) {
mColor = color;
updatePaint();
}
private void updatePaint() {
mPaint.setColor(mColor);
mPaint.setAlpha(Color.alpha(mColor) * mAlpha / 0xFF);
invalidateSelf();
}
@Override
public int getAlpha() {
return mAlpha;

View File

@ -21,7 +21,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<LinearLayout
<org.mariotaku.twidere.view.ColorLabelLinearLayout
android:id="@+id/profile_name_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -46,7 +46,7 @@
android:maxLength="20"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout>
</org.mariotaku.twidere.view.ColorLabelLinearLayout>
</FrameLayout>
<LinearLayout

View File

@ -29,6 +29,7 @@
android:id="@+id/view_pager_tabs"
android:layout_width="match_parent"
android:layout_height="@dimen/element_size_normal"
android:textColor="?android:textColorSecondary"
app:pstsTabBackground="?android:selectableItemBackground"/>
<android.support.v4.view.ViewPager