mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-06-03 00:58:06 -04:00
优化详情页
This commit is contained in:
parent
6a9152c773
commit
5871727d7f
@ -97,10 +97,7 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
.error(R.drawable.img_loading_placeholder)
|
.error(R.drawable.img_loading_placeholder)
|
||||||
.into(tvCover);
|
.into(tvCover);
|
||||||
|
|
||||||
Log.d(TAG, "fillDetails: " + detailObj.toString());
|
String Genres = JfClient.strFromGson(detailObj, "Genres");
|
||||||
JsonElement genres = JfClient.jeFromGson(detailObj, "Genres");
|
|
||||||
List<String> fg = new Gson().fromJson(genres,List.class);
|
|
||||||
String Genres = (genres == null ? "" : String.join(",",fg));
|
|
||||||
String OfficialRating = JfClient.strFromGson(detailObj, "OfficialRating");
|
String OfficialRating = JfClient.strFromGson(detailObj, "OfficialRating");
|
||||||
String CommunityRating = JfClient.strFromGson(detailObj, "CommunityRating");
|
String CommunityRating = JfClient.strFromGson(detailObj, "CommunityRating");
|
||||||
String ProductionYear = JfClient.strFromGson(detailObj, "ProductionYear");
|
String ProductionYear = JfClient.strFromGson(detailObj, "ProductionYear");
|
||||||
@ -153,10 +150,10 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
} else if (type.equals("Movie")) {
|
} else if (type.equals("Movie")) {
|
||||||
fillMovie(detailObj);
|
fillMovie(detailObj);
|
||||||
} else if (type.equals("Person")){
|
} else if (type.equals("Person")){
|
||||||
JsonElement ProductionLocations = JfClient.jeFromGson(detailObj,"ProductionLocations");
|
String ProductionLocations = JfClient.strFromGson(detailObj,"ProductionLocations");
|
||||||
String PremiereDate = JfClient.strFromGson(detailObj,"PremiereDate");
|
String PremiereDate = JfClient.strFromGson(detailObj,"PremiereDate");
|
||||||
tvDetails.append("\n出生日期:" + Utils.UtcToLocal(PremiereDate)+"\n");
|
tvDetails.append("\n出生日期:" + Utils.UtcToLocal(PremiereDate)+"\n");
|
||||||
tvDetails.append("出生地:" + (ProductionLocations == null ? "" : ProductionLocations.getAsString()));
|
tvDetails.append("出生地:" + (ProductionLocations == null ? "" : ProductionLocations));
|
||||||
fillItemsByPerson(Id);
|
fillItemsByPerson(Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,6 +303,7 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(JsonObject jo) {
|
public void onClick(JsonObject jo) {
|
||||||
|
Log.d(TAG, "onClick: " + jo);
|
||||||
String itemId = jo.get("Id").getAsString();
|
String itemId = jo.get("Id").getAsString();
|
||||||
String type = jo.get("Type").getAsString();
|
String type = jo.get("Type").getAsString();
|
||||||
Intent intent = null;
|
Intent intent = null;
|
||||||
|
@ -19,6 +19,7 @@ import com.lzy.okgo.model.Response;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -571,6 +572,10 @@ public class JfClient {
|
|||||||
if (jo == null) {
|
if (jo == null) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
|
if(jo.getClass() == JsonArray.class){
|
||||||
|
List<String> list = new Gson().fromJson(jo,List.class);
|
||||||
|
return String.join(",",list);
|
||||||
|
}
|
||||||
return jo.getAsString();
|
return jo.getAsString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
android:id="@+id/tvDetails"
|
android:id="@+id/tvDetails"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="260dp"
|
android:minHeight="200dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:textSize="20dp" />
|
android:textSize="20dp" />
|
||||||
|
|
||||||
@ -78,7 +78,6 @@
|
|||||||
android:id="@+id/mGridView"
|
android:id="@+id/mGridView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
@ -97,6 +96,7 @@
|
|||||||
android:id="@+id/tvPersonLayout"
|
android:id="@+id/tvPersonLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
android:visibility="gone" >
|
android:visibility="gone" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -109,7 +109,6 @@
|
|||||||
android:id="@+id/mPersonGridView"
|
android:id="@+id/mPersonGridView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="312dp"
|
android:layout_height="312dp"
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user