占座
public static FragmentRight getInstance(int position){
FragmentRight fragmentRight = new FragmentRight();
Bundle bundle = new Bundle();
bundle.putInt("position", position);
//给Fragment传值
fragmentRight.setArguments(bundle);
return fragmentRight;
FragmentRight fragmentRight = new FragmentRight();
Bundle bundle = new Bundle();
bundle.putInt("position", position);
//给Fragment传值
fragmentRight.setArguments(bundle);
return fragmentRight;
}
sharedpreferance
三种
LayoutInflater
五种存储方式
SharePreference 本质是一个xml文件,常用于存储简单的参数设置
SQLite 数据库android为此封装了SQLiteDatabase的类
Content Provider 应用间数据共享的方式,通过URI
File 存储大量数据,更新较困难
网络 不解释
关于SD卡的权限
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.MOUNT_UNMOUNT_FILESYSTEMS