我想在ListView项目的底部添加阴影!! 我尝试了paddingEdageLenght,但没有发生任何变化!我添加了圆形边缘,但我不能在项目下方添加阴影
这是我的列表项xml文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadingEdgeLength="5sp" >
<ImageView
android:id="@+id/site_image"
android:layout_height="50dp"
android:layout_width="65dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="10dp"/>
<TextView
android:id="@+id/site_name"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/site_image"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:textSize="20sp"/>
<TextView
android:id="@+id/site_description"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_below="@id/site_name"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@id/site_image"
android:textSize="15sp"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
这是我的ListView xml文件
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:id="@+id/near_sites"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_margin="10dp"
android:fadingEdgeLength="5sp"
android:dividerHeight="10sp"
android:divider="@android:color/transparent" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
任何帮助?
我有来自 REST API 的 Json 响应,如下所示:
{
"data": {
"leagues": [
{
"identifier": "8e7fa444c4b60383727fb61fcc6aa387",
"league_slug": "bundesliga",
"name": "Bundesliga",
"nation": "Germany",
"level": "1",
"federation": "UEFA"
},
{
"identifier": "726a53a8c50d6c7a66fe0ab16bdf9bb1",
"league_slug": "premier-league",
"name": "Premier League",
"nation": "England",
"level": "1",
"federation": "UEFA"
},
{
"identifier": "bc425f51d5ee924580c35c38da138de8",
"league_slug": "serie-a",
"name": "Serie A",
"nation": "Italy",
"level": "1",
"federation": "UEFA"
}
],
"statusCode": "200",
"errorCode": "0",
"statusReason": "OK"
}
}
Run Code Online (Sandbox Code Playgroud)
我想从此 Json 获取联赛列表,现在我有“数据”哈希图,但无法获取联赛哈希图数组。我不想将其转换为任何数据类型,我只想ArrayList<Map<String, String>>
Gson请帮助我使用或获取此信息JSONObject