FragmentPagerAdapter刷新数据的解决方案

    继续阅读
MXlwq's avatar
MXlwq 1月 12, 2017
 | 

Fragment中Gesture用法

    继续阅读
MXlwq's avatar
MXlwq 1月 05, 2017
 | 

Fragment KeyEvent监听

接口回调Fragment中12345678910111213141516171819202122protected BackHandlerInterface backHandlerInterface; public interface BackHandlerInterface { public void setSelectedFragment(Fragment3 backHandledFragment); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //回调函数赋值 if(!(getActivity() instanceof BackHandlerInterface)) { throw new ClassCastException("Hosting activity must implement BackHandlerInterface"); } else { backHandlerInterface = (BackHandlerInterface) getActivity(); } } @Override public void onStart() { super.onStart(); //将自己的实例传出去 backHandlerInterface.setSelectedFragment(this); }     继续阅读
MXlwq's avatar
MXlwq 12月 19, 2016
 | 

Android Fragment生命周期

Android在3.0版本引入了Fragment功能,它非常类似于Activity,可以...     继续阅读
MXlwq's avatar
MXlwq 4月 05, 2016
 |