我们把这张图片设置为 LinearLayout 的背景图片:
android:layout_width=”match_parent”
android:layout_height=”400dp”
android:background=”@drawable/message_left_small”
>
在接下来的弹出框中,指定 9-patch 的 png 图片路径,注意要放在 drawable-xx 等类似的路径下,生成的图片名为 *.9.png:
最后删除非 .9 的 png 图片,重新运行程序:
在 app/build.gradle 中加入 RecyclerView 的依赖库:
dependencies {
compile fileTree(dir: ‘libs’, include: [‘*.jar’])
androidTestCompile(‘com.android.support.test.espresso:espresso-core:2.2.2’, {
exclude group: ‘com.android.support’, module: ‘support-annotations’
})
compile ‘com.android.support:appcompat-v7:24.2.1’
compile ‘com.android.support:recyclerview-v7:24.2.1’
testCompile ‘junit:junit:4.12’
}
编写主界面:
android:orientation=”vertical”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:background=”#d8e0e8″
>
android:layout_width=”match_parent”
android:layout_height=”0dp”
android:layout_weight=”1″/>
android:layout_height=”wrap_content”>
android:layout_width=”0dp”
android:layout_height=”wrap_content”
android:layout_weight=”1″
android:hint=”请输入”
android:maxLines=”2″
/>
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:text=”发送”
/>
http://www.pc-fly.com/a/jisuanjixue/article-87860-1.html
相关资源:经典刻录软件尼禄Nero6.6.1.4中文安装版及序列 -其它工具类资源…
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!