1.解决二级+添加界面快速按返回键,退回界面,光标丢失问题
This commit is contained in:
@@ -53,6 +53,8 @@ public abstract class CategoryFragment extends BaseFragment implements AppnetCal
|
|||||||
protected static final int LOCAL_CATEGORY=3;
|
protected static final int LOCAL_CATEGORY=3;
|
||||||
protected static final int APPS_CATEGORY=4;
|
protected static final int APPS_CATEGORY=4;
|
||||||
protected Map<String,String> collectAppMap=new HashMap();
|
protected Map<String,String> collectAppMap=new HashMap();
|
||||||
|
private Runnable customFocusRunnable;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutResourceId() {
|
protected int getLayoutResourceId() {
|
||||||
return R.layout.layout_category_app;
|
return R.layout.layout_category_app;
|
||||||
@@ -236,18 +238,22 @@ public abstract class CategoryFragment extends BaseFragment implements AppnetCal
|
|||||||
translateAnimation.setDuration(300);
|
translateAnimation.setDuration(300);
|
||||||
translateAnimation.setFillAfter(true);
|
translateAnimation.setFillAfter(true);
|
||||||
content_view.startAnimation(translateAnimation);
|
content_view.startAnimation(translateAnimation);
|
||||||
handler.postDelayed(new Runnable() {
|
if(customFocusRunnable==null){
|
||||||
@Override
|
customFocusRunnable = new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
coustom_view.requestFocus();
|
public void run() {
|
||||||
}
|
coustom_view.requestFocus();
|
||||||
},800);
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
handler.postDelayed(customFocusRunnable,800);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void dismissCustomApp(){
|
private void dismissCustomApp(){
|
||||||
|
handler.removeCallbacks(customFocusRunnable);
|
||||||
cuttentModel = MODEL_NORMAL;
|
cuttentModel = MODEL_NORMAL;
|
||||||
disableFreshData=false;
|
disableFreshData=false;
|
||||||
LogUtils.loge("coustom_view.getHeight():"+coustom_view.getLayoutParams().height);
|
LogUtils.loge("coustom_view.getHeight():"+coustom_view.getLayoutParams().height);
|
||||||
|
|||||||
Reference in New Issue
Block a user