gpt4 book ai didi

java - 背景图像重复+圆角

转载 作者:行者123 更新时间:2023-12-01 19:06:24 33 4
gpt4 key购买 nike

所以我应该显示一个时间表,其中每个项目都有一个带有圆角的背景图像......

我不知道如何为我的 View (当前是 TextView,但我可以更改它)提供背景(这是必须重复的图案)并为其提供圆角...

我能找到的就是如何用纯色背景提供圆角...

有人可以帮忙吗?

编辑:背景图像看起来像这样 http://www.photoshop-pack.com/tutorials/images/1145.gif

<小时/>

带有圆角的背景图像:并非时间表上的所有项目都具有相同的长度

左角 + 主背景 + 右角:背景应该重复,这样右角就不会与中心背景对齐

最佳答案

一些类似于

的东西
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
>
<LinearLayout
android:padding="4dip"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/list_bkg_rounded"
android:gravity="center_horizontal"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="hello all how are you ? "
android:background="@drawable/back_repeat"
/>
</LinearLayout>
</LinearLayout>

我有这样的东西 rounded pattern

关于java - 背景图像重复+圆角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9904544/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com