解决方案 »
- pull解析的问题
- 我程序里面一个服务的代码,在模拟器上运行的,为什么getLastKnownLocation总是返回空值呢?麻烦帮我看看
- 【开发】android mms
- GPRS模块PPP能拨号但无法上网-求助
- 想学习android开发,没有java和c基础,该看哪些书??
- Sqlite问题
- [求助]EditText怎么限制只能输入全角?
- eclipse开发安卓,进入Debug后怎么关闭
- Android中导入Unity项目,界面点击事件失去焦点问题
- ListView onItemClick 事件与Item 的滑动事件冲突,该如何处理?
- android 怎样实现从文本框获得用户名和密码,自动登录网站?
- 求助:有没有谁做过android的上拉出现图片的功能
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
// WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
MyApplication.getInstance().addActivity(this);
context = this;
inflater = LayoutInflater.from(this);
// 获取上次退出时的播放位置
initView();
startService(new Intent(context, MusicPlayerService.class));
// 启动service
Intent intent = new Intent(this, DownloadService.class);
startService(intent);
this.getApplicationContext()
.bindService(intent, conn, BIND_AUTO_CREATE);
// 创建音乐目录
if (Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED)) {
File root = Environment.getExternalStorageDirectory();
dir = new File(root, "TMusic");
if (!dir.exists()) {
dir.mkdir();
}
}
myReciver = new MusicReciver();
reciver = new refreshReciver();
groupDao = new MusicGroupDao(context);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
// WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
MyApplication.getInstance().addActivity(this);
context = this;
inflater = LayoutInflater.from(this);
// 获取上次退出时的播放位置
initView();
startService(new Intent(context, MusicPlayerService.class));
// 启动service
Intent intent = new Intent(this, DownloadService.class);
startService(intent);
this.getApplicationContext()
.bindService(intent, conn, BIND_AUTO_CREATE);
// 创建音乐目录
if (Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED)) {
File root = Environment.getExternalStorageDirectory();
dir = new File(root, "TMusic");
if (!dir.exists()) {
dir.mkdir();
}
}
myReciver = new MusicReciver();
reciver = new refreshReciver();
groupDao = new MusicGroupDao(context);
}
initView();中做了什么