答案 0 :(得分:4)
对于角落,您必须使用drawable
,如下所示:
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<!-- view border color and width -->
<stroke
android:width="1dip"
android:color="#a4a2a2" >
</stroke>
<corners android:radius="180px">
</corners>
<!-- Here is the corner radius -->
和关于影子
我认为你的意思是android:elevation="8dp"
<Yourbox
android:width="match_parent"
android:height="match_parent"
....
android:elevation="8dp"
android:layout_gravity="center"
..
/>
答案 1 :(得分:2)
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="270dp"
android:layout_height="130dp"
android:layout_margin="15dp"
android:translationZ="4dp"
app:cardCornerRadius="6dp"
app:cardElevation="0dp">
.....
</androidx.cardview.widget.CardView>
只需使用translationZ
答案 2 :(得分:1)
您可以将此形状设置为任何视图的背景
declare
name_tmp varchar2(32);
for i in (SELECT * FROM table WHERE id IN (1, 2, 3, 4, 5)) loop
SELECT name name_tmp into FROM table id=i.id;
exception when no_data_found then name_tmp := null; end;
insert into tmp_table (name) values (name_tmp) ;
end loop;
end;