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
之前我们说过用View Model可以保存数据,这是因为我们允许后台有多个进程,但是如果不运行后台有过个进程那怎么办? 如果后台杀死进程,要想数据保存,我们可以用 OnSaveInstanceState(Bundle outState)这个方法,将需要存的数按key-value值存入到outStat ...
分类:
移动开发 时间:
2020-02-01 16:12:26
阅读次数:
247
MainActivity.java package com.example.logindemo; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity ...
分类:
移动开发 时间:
2020-01-30 22:39:34
阅读次数:
126