先上图:

<xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/MainLayout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/backrepeat"
>
backrepeat.xml
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/repeatimg"
android:tileMode="repeat"
android:dither="true" />
代码方式:
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
BitmapDrawable bd = new BitmapDrawable(bitmap);
bd.setTileModeXY(TileMode.REPEAT , TileMode.REPEAT );
bd.setDither(true);
view.setBackgroundDrawable(bd);
本文深入探讨了Android应用UI设计的关键要素与实践方法,包括布局、样式、动画及交互设计,旨在帮助开发者构建美观、易用且符合用户体验的设计。
90

被折叠的 条评论
为什么被折叠?



