mirror of
https://github.com/leanote/leanote-android.git
synced 2026-01-13 07:03:54 +08:00
fix #4
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
package org.houxg.leamonax.ui;
|
||||
|
||||
|
||||
import android.app.ActivityOptions;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.ActivityOptionsCompat;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
@@ -20,20 +19,17 @@ import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
import org.houxg.leamonax.R;
|
||||
import org.houxg.leamonax.adapter.NotebookAdapter;
|
||||
import org.houxg.leamonax.background.NoteSyncService;
|
||||
import org.houxg.leamonax.database.AppDataBase;
|
||||
import org.houxg.leamonax.model.Account;
|
||||
import org.houxg.leamonax.model.Note;
|
||||
import org.houxg.leamonax.model.Notebook;
|
||||
import org.houxg.leamonax.model.SyncEvent;
|
||||
import org.houxg.leamonax.model.Tag;
|
||||
import org.houxg.leamonax.service.AccountService;
|
||||
import org.houxg.leamonax.ui.edit.NoteEditActivity;
|
||||
import org.houxg.leamonax.utils.NetworkUtils;
|
||||
import org.houxg.leamonax.utils.ToastUtils;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
@@ -131,7 +127,7 @@ public class MainActivity extends BaseActivity implements Navigation.Callback {
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.action_search) {
|
||||
Intent intent = new Intent(this, SearchActivity.class);
|
||||
startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(this).toBundle());
|
||||
startActivity(intent, ActivityOptionsCompat.makeSceneTransitionAnimation(this).toBundle());
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@@ -9,9 +9,11 @@ import android.content.Intent;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.RippleDrawable;
|
||||
import android.os.Build;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.view.ViewGroupCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.graphics.drawable.DrawableWrapper;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
@@ -204,11 +206,12 @@ public class Navigation {
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
//trigger quick ripple effect
|
||||
mInfoPanel.setBackground(mAccountRipple);
|
||||
mAccountRipple.setHotspot(mAvatarIv.getLeft() + mAvatarIv.getWidth() / 2, mAvatarIv.getTop() + mAvatarIv.getHeight() / 2);
|
||||
mAccountRipple.setHotspotBounds(0, 0, mInfoPanel.getWidth(), mInfoPanel.getHeight());
|
||||
mInfoPanel.setPressed(true);
|
||||
mInfoPanel.setPressed(false);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
mAccountRipple.setHotspot(mAvatarIv.getLeft() + mAvatarIv.getWidth() / 2, mAvatarIv.getTop() + mAvatarIv.getHeight() / 2);
|
||||
mAccountRipple.setHotspotBounds(0, 0, mInfoPanel.getWidth(), mInfoPanel.getHeight());
|
||||
mInfoPanel.setPressed(true);
|
||||
mInfoPanel.setPressed(false);
|
||||
}
|
||||
refreshUserInfo(account);
|
||||
rootView.removeView(animateView);
|
||||
mInfoPanel.postDelayed(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user