(一)Bundle介绍 Bundle主要用于传递数据;它保存的数据,是以key-value(键值对)的形式存在的。 我们经常使用Bundle在Activity之间传递数据,传递的数据可以是boolean、byte、int、long、float、double、string等基本类型或它们对应的数组,也 ...
分类:
其他好文 时间:
2020-02-08 00:45:55
阅读次数:
87
Activity的启动和关闭 1.启动activity activity的启动分为两种,一种为入口activity,另一种为其他activity 在AndroidManifests进行配置,入口activity的启动只要在要启动的activity里加入intent,例如下面代码将MainActivi ...
分类:
移动开发 时间:
2020-02-07 01:10:14
阅读次数:
109
okhttp class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentVi ...
分类:
其他好文 时间:
2020-02-06 19:48:01
阅读次数:
129
问题1:Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app react-native run-android react-native star ...
分类:
移动开发 时间:
2020-02-06 01:21:41
阅读次数:
110
今天学习了数据的创建,以及关于数据库的相关操作。 今天主要是实现了对于数据库的增加和查找。 具体的代码如下: 首先是数据库的创建: DBOpenMessage.java package com.example.thetrueappwen; import android.content.Context ...
分类:
微信 时间:
2020-02-05 23:39:37
阅读次数:
112
package com.yxcorp.gifshow.homepage.wiget;import android.app.Dialog;import android.content.Context;import android.os.Bundle;import android.view.View;i ...
分类:
其他好文 时间:
2020-02-05 11:54:47
阅读次数:
92
1、创建侧滑菜单Fragment package com.example.didida_corder; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import and ...
分类:
移动开发 时间:
2020-02-04 18:49:24
阅读次数:
83
SharePreference 一般用于保存偏好设置,比如说我们设置里的条目 sharepreference使用步骤 1、拿到sharepreference //拿到share preference setting_info = this.getSharedPreferences("setting_ ...
分类:
其他好文 时间:
2020-02-03 19:02:54
阅读次数:
167
接上一节。 1、在resources下新建一个文件夹i18n 2、新建三个properties login_语言代码_国家代码 3、随便点击其中的一个properties,选择左下角的Resource Bundle,在里面添加相关属性,并设置中英文时的值,以及默认值 如果出现中文乱码,在File-- ...
分类:
编程语言 时间:
2020-02-03 15:31:24
阅读次数:
181
今天学习了在安卓程序中添加和播放背景音乐的方法。 实现过程如下: 1.设置音乐播放状态变量 定义音乐播放器对象 定义控制音乐播放按钮 2.获取布局文件中控制背景音乐按钮 调用PlayMusic()方法 3.实现PlayMusic()方法 protected void onCreate(Bundle ...
分类:
其他好文 时间:
2020-02-02 11:48:08
阅读次数:
64