随笔分类 - Android
摘要:/** * Return the {@link FragmentActivity} this fragment is currently associated with. * May return {@code null} if the fragment is associated with a {
阅读全文
摘要:这里只讨论 LayoutInflater1 的 infalte() 方法。 inflate(int resource, ViewGroup root, boolean attachToRoot); 第一个参数xml布局资源索引,第二个参数指的是加载布局的root。 attachToRoot为true
阅读全文
摘要:假设我们要在main布局中引入标题栏,我们只需要在activity_main布局文件中使用语句: <include layout="@layout/title" /> 完整布局文件: title.xml <?xml version="1.0" encoding="utf-8"?> <LinearLa
阅读全文
摘要:在阅读《第一行代码》的LitePal部分时,发现一个问题,就是在建立实体类时列名是遵循驼峰命名的,但是在sqlite中查看建表语句时发现驼峰命名转化成列名会直接全部转换成小写字母,而不是转成下划线格式,但是 Mybatis 中是有开启驼峰映射这一选项的,于是去翻LitePal的文档,翻了半天没有但是
阅读全文
摘要:在阅读《第一行代码》的LitePal这一节时,注意到要能够正常使用LitePal,我们必须在AndroidManifest.xml中配置如下内容: <application android:name="org.litepal.LitePalApplication" ...> ... </applic
阅读全文
摘要:原文章地址 和配置java的maven依赖库类似,这个也是改配置文件就好了 配置方法 1、对特定项目有效,在项目中的 build.gradle 中修改内容 buildscript { repositories { maven { url 'http://maven.aliyun.com/nexus/
阅读全文
摘要:shape是Android中常用的一种XML图形文件。 形状图形的定义文件以shape元素为根节点。根节点下定义了6个节点:corners(圆角)、gradient(渐变)、padding(间隔)、size(尺寸)、solid(填充)、stroke(描边),各节点的属性值主要是长宽、半径、角度以及颜
阅读全文