mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-05-26 06:20:20 -04:00
适配竖屏
This commit is contained in:
parent
2c15b83a0f
commit
796643e549
@ -108,18 +108,28 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
.error(R.drawable.img_loading_placeholder)
|
.error(R.drawable.img_loading_placeholder)
|
||||||
.into(tvCover);
|
.into(tvCover);
|
||||||
|
|
||||||
String Genres = String.join(",", details.getGenres());
|
List<String> backdrops = details.getBackdropImageTags();
|
||||||
|
if(backdrops != null && backdrops.size() > 0){
|
||||||
|
Picasso.get()
|
||||||
|
.load(JfClient.GetBackdropUrl(Id, backdrops.get(0)))
|
||||||
|
.placeholder(R.drawable.img_loading_placeholder)
|
||||||
|
.error(R.drawable.img_loading_placeholder)
|
||||||
|
.into((ImageView) findViewById(R.id.tvBackdrop));
|
||||||
|
}
|
||||||
|
|
||||||
tvTitle.setText(Name);
|
tvTitle.setText(Name);
|
||||||
tvDetails.append(details.getProductionYear() == null ? "" : "年份:" + details.getProductionYear() + " ");
|
((TextView)findViewById(R.id.tvYear)).setText(details.getProductionYear() == null ? "" : details.getProductionYear());
|
||||||
tvDetails.append(Genres.equals("") ? "" : "风格:" + Genres + "\n");
|
long duration = (details.getRunTimeTicks() / 10000 / 1000 / 60);
|
||||||
tvDetails.append(details.getCommunityRating() == null ? "" : "评分:" + details.getCommunityRating() + " ");
|
((TextView)findViewById(R.id.tvDuration)).setText(duration > 0 ? String.valueOf(duration) + "分钟" : "");
|
||||||
tvDetails.append(details.getOfficialRating() == null ? "" : "评级:" + details.getOfficialRating() + "\n");
|
((TextView)findViewById(R.id.tvRating)).setText(details.getCommunityRating() == null ? "" : details.getCommunityRating());
|
||||||
|
((TextView)findViewById(R.id.tvLevel)).setText(details.getOfficialRating() == null ? "" : details.getOfficialRating());
|
||||||
|
|
||||||
|
String Genres = String.join(",", details.getGenres());
|
||||||
|
tvDetails.append(Genres.equals("") ? "" : "风格:" + Genres + "\n");
|
||||||
if (details.getMediaStreams() != null) {
|
if (details.getMediaStreams() != null) {
|
||||||
String video = "";
|
String video = "";
|
||||||
String audio = "";
|
ArrayList<String> audio = new ArrayList<>();
|
||||||
String subtitle = "";
|
ArrayList<String> subtitle = new ArrayList<>();
|
||||||
for (int i = 0; i < details.getMediaStreams().size(); i++) {
|
for (int i = 0; i < details.getMediaStreams().size(); i++) {
|
||||||
MediaStreams ms = details.getMediaStreams().get(i);
|
MediaStreams ms = details.getMediaStreams().get(i);
|
||||||
String mstype = ms.getType();
|
String mstype = ms.getType();
|
||||||
@ -127,17 +137,15 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
video += ms.getDisplayTitle();
|
video += ms.getDisplayTitle();
|
||||||
} else if (mstype.equals("Audio")) {
|
} else if (mstype.equals("Audio")) {
|
||||||
if (ms.getLanguage() != null && !ms.getLanguage().equals(""))
|
if (ms.getLanguage() != null && !ms.getLanguage().equals(""))
|
||||||
audio += ms.getLanguage() + "、";
|
audio.add(ms.getLanguage());
|
||||||
else audio += ms.getCodec() + ";";
|
|
||||||
} else if (mstype.equals("Subtitle")) {
|
} else if (mstype.equals("Subtitle")) {
|
||||||
if (ms.getLanguage() != null && !ms.getLanguage().equals(""))
|
if (ms.getLanguage() != null && !ms.getLanguage().equals(""))
|
||||||
subtitle += ms.getLanguage() + "、";
|
subtitle.add(ms.getLanguage());
|
||||||
else subtitle += ms.getCodec() + ";";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tvDetails.append(video.equals("") ? "" : "视频:" + video + "\n");
|
tvDetails.append(video.equals("") ? "" : "格式:" + video + "\n");
|
||||||
tvDetails.append(audio.equals("") ? "" : "音频:" + audio + "\n");
|
tvDetails.append(audio.size() > 1 ? "音轨:" + String.join(",",audio) + "\n" : "");
|
||||||
tvDetails.append(subtitle.equals("") ? "" : "字幕:" + subtitle + "\n");
|
tvDetails.append(subtitle.size() > 1 ? "字幕:" + String.join(",",subtitle) + "\n" : "");
|
||||||
}
|
}
|
||||||
String overview = details.getOverview() == null ? "" : details.getOverview();
|
String overview = details.getOverview() == null ? "" : details.getOverview();
|
||||||
tvDetails.append("简介: " + Html.fromHtml(overview));
|
tvDetails.append("简介: " + Html.fromHtml(overview));
|
||||||
@ -147,7 +155,7 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
if (type.equals("Series")) {
|
if (type.equals("Series")) {
|
||||||
fillSeason(details.getId());
|
fillSeason(details.getId());
|
||||||
} else if (type.equals("Movie")) {
|
} else if (type.equals("Movie")) {
|
||||||
fillMovie(details, details.getId());
|
fillMovie(details);
|
||||||
} else if (type.equals("Person")) {
|
} else if (type.equals("Person")) {
|
||||||
tvDetails.append("\n出生日期:" + Utils.UtcToLocal(details.getPremiereDate()) + "\n");
|
tvDetails.append("\n出生日期:" + Utils.UtcToLocal(details.getPremiereDate()) + "\n");
|
||||||
if (null != details.getProductionLocations()) {
|
if (null != details.getProductionLocations()) {
|
||||||
@ -164,8 +172,8 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillMovie(Item item, String focusId) {
|
private void fillMovie(Item item) {
|
||||||
item.setName("播放: " + item.getName());
|
item.setName(item.getName());
|
||||||
List<Item> plist = new ArrayList<>();
|
List<Item> plist = new ArrayList<>();
|
||||||
plist.add(item);
|
plist.add(item);
|
||||||
if (item.getPartCount() > 0) {
|
if (item.getPartCount() > 0) {
|
||||||
@ -190,7 +198,8 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
JfClient.GetSeasons(SeriesId, new JfClient.JJCallBack() {
|
JfClient.GetSeasons(SeriesId, new JfClient.JJCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Items seasons) {
|
public void onSuccess(Items seasons) {
|
||||||
for (Item item : seasons.getItems()) {
|
for (int i=0;i<seasons.getItems().size();i++) {
|
||||||
|
Item item = seasons.getItems().get(i);
|
||||||
TabLayout.Tab tab = tabContainer.newTab();
|
TabLayout.Tab tab = tabContainer.newTab();
|
||||||
tab.setText(item.getName());
|
tab.setText(item.getName());
|
||||||
tab.view.setTag(item);
|
tab.view.setTag(item);
|
||||||
@ -207,11 +216,14 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
tab.view.setSelected(true);
|
tab.view.setSelected(true);
|
||||||
tab.view.performClick();
|
tab.view.performClick();
|
||||||
}
|
}
|
||||||
} else {
|
}else if(i == 0){
|
||||||
tabContainer.getTabAt(0).view.performClick();
|
tabContainer.getTabAt(0).view.performClick();
|
||||||
}
|
}
|
||||||
//tabContainer.getTabAt(0).view.setFocusable(false);
|
//tabContainer.getTabAt(0).view.setFocusable(false);
|
||||||
}
|
}
|
||||||
|
if(tabContainer.getTabCount() > 1){
|
||||||
|
tabContainer.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, errcb);
|
}, errcb);
|
||||||
}
|
}
|
||||||
@ -233,8 +245,12 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void fillItems(List<Item> items) {
|
private void fillItems(List<Item> items) {
|
||||||
|
int spanCount = 3;
|
||||||
|
if(getResources().getDisplayMetrics().widthPixels >getResources().getDisplayMetrics().heightPixels ){
|
||||||
|
spanCount = 6;
|
||||||
|
}
|
||||||
JTAdapter jtAdapter = new JTAdapter(items);
|
JTAdapter jtAdapter = new JTAdapter(items);
|
||||||
V7GridLayoutManager layoutManager = new V7GridLayoutManager(mGridView.getContext(), 6);
|
V7GridLayoutManager layoutManager = new V7GridLayoutManager(mGridView.getContext(), spanCount);
|
||||||
jtAdapter.setOnItemClickListener(this);
|
jtAdapter.setOnItemClickListener(this);
|
||||||
mGridView.setVisibility(View.VISIBLE);
|
mGridView.setVisibility(View.VISIBLE);
|
||||||
mGridView.setLayoutManager(layoutManager);
|
mGridView.setLayoutManager(layoutManager);
|
||||||
@ -289,7 +305,7 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
((TextView) findViewById(R.id.tvListTitle)).setText("演员作品:");
|
((TextView) findViewById(R.id.tvListTitle)).setText("演员作品:");
|
||||||
List<Item> items = iitems.getItems();
|
List<Item> items = iitems.getItems();
|
||||||
JAdapter jAdapter = new JAdapter(items, false);
|
JAdapter jAdapter = new JAdapter(items, false);
|
||||||
V7GridLayoutManager layoutManager = new V7GridLayoutManager(mGridView.getContext(), 4);
|
V7GridLayoutManager layoutManager = new V7GridLayoutManager(mGridView.getContext(), getSpanCount());
|
||||||
jAdapter.setOnItemClickListener(new JAdapter.OnItemClickListener() {
|
jAdapter.setOnItemClickListener(new JAdapter.OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(Item item) {
|
public void onClick(Item item) {
|
||||||
@ -313,11 +329,6 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
String itemId = item.getId();
|
String itemId = item.getId();
|
||||||
String type = item.getType();
|
String type = item.getType();
|
||||||
Intent intent = null;
|
Intent intent = null;
|
||||||
// if (type.equals("Season")) {
|
|
||||||
// intent = new Intent(this, DetailActivity.class);
|
|
||||||
// intent.putExtra("itemId", itemId);
|
|
||||||
// startActivity(intent);
|
|
||||||
// } else
|
|
||||||
if (type.equals("Episode")) {
|
if (type.equals("Episode")) {
|
||||||
JfClient.playList.clear();
|
JfClient.playList.clear();
|
||||||
JTAdapter JT = (JTAdapter) mGridView.getAdapter();
|
JTAdapter JT = (JTAdapter) mGridView.getAdapter();
|
||||||
|
@ -1,367 +0,0 @@
|
|||||||
package org.sifacai.vlcjellyfin.Ui;
|
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.Html;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.owen.tvrecyclerview.widget.V7GridLayoutManager;
|
|
||||||
import com.owen.tvrecyclerview.widget.V7LinearLayoutManager;
|
|
||||||
import com.squareup.picasso.Picasso;
|
|
||||||
|
|
||||||
import org.sifacai.vlcjellyfin.Bean.ImageTags;
|
|
||||||
import org.sifacai.vlcjellyfin.Bean.Item;
|
|
||||||
import org.sifacai.vlcjellyfin.Bean.Items;
|
|
||||||
import org.sifacai.vlcjellyfin.Bean.MediaStreams;
|
|
||||||
import org.sifacai.vlcjellyfin.Bean.People;
|
|
||||||
import org.sifacai.vlcjellyfin.Bean.UserData;
|
|
||||||
import org.sifacai.vlcjellyfin.Component.JAdapter;
|
|
||||||
import org.sifacai.vlcjellyfin.Component.JRecyclerView;
|
|
||||||
import org.sifacai.vlcjellyfin.Player.Video;
|
|
||||||
import org.sifacai.vlcjellyfin.Player.VlcPlayerActivity;
|
|
||||||
import org.sifacai.vlcjellyfin.R;
|
|
||||||
import org.sifacai.vlcjellyfin.Utils.JfClient;
|
|
||||||
import org.sifacai.vlcjellyfin.Utils.Utils;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class DetailActivityP extends BaseActivity implements JAdapter.OnItemClickListener {
|
|
||||||
private String TAG = "详情:";
|
|
||||||
private String ItemId;
|
|
||||||
private ImageView tvCover;
|
|
||||||
private TextView tvTitle;
|
|
||||||
private TextView tvDetails;
|
|
||||||
private ImageView tvPlay;
|
|
||||||
private JRecyclerView mGridView;
|
|
||||||
private JRecyclerView mPeopleGridView;
|
|
||||||
private LinearLayout tvPeopleLayout;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_detail_p);
|
|
||||||
getSupportActionBar().hide();
|
|
||||||
|
|
||||||
if (JfClient.UserId.equals("") || JfClient.AccessToken.equals("")) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init() {
|
|
||||||
tvCover = findViewById(R.id.tvCover);
|
|
||||||
tvTitle = findViewById(R.id.tvTitle);
|
|
||||||
tvDetails = findViewById(R.id.tvDetails);
|
|
||||||
tvPlay = findViewById(R.id.tvPlay);
|
|
||||||
mGridView = findViewById(R.id.mGridView);
|
|
||||||
tvPeopleLayout = findViewById(R.id.tvPersonLayout);
|
|
||||||
mPeopleGridView = findViewById(R.id.mPersonGridView);
|
|
||||||
|
|
||||||
Intent intent = getIntent();
|
|
||||||
ItemId = intent.getStringExtra("itemId");
|
|
||||||
if (ItemId.equals("")) {
|
|
||||||
finish();
|
|
||||||
} else {
|
|
||||||
showLoadingDialog("加载中……");
|
|
||||||
initData(ItemId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initData(String itemId) {
|
|
||||||
JfClient.GetItemInfo(itemId, new JfClient.JJCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Item item) {
|
|
||||||
fillDetails(item);
|
|
||||||
}
|
|
||||||
}, new JfClient.JJCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onError(String str) {
|
|
||||||
errcb.onError(str);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fillDetails(Item details) {
|
|
||||||
String Id = details.getId();
|
|
||||||
String Name = details.getName();
|
|
||||||
String imgurl = JfClient.GetImgUrl(Id, details.getImageTags() == null ? "" : details.getImageTags().getPrimary());
|
|
||||||
Picasso.get()
|
|
||||||
.load(imgurl)
|
|
||||||
.placeholder(R.drawable.img_loading_placeholder)
|
|
||||||
.error(R.drawable.img_loading_placeholder)
|
|
||||||
.into(tvCover);
|
|
||||||
|
|
||||||
String Genres = String.join(",", details.getGenres());
|
|
||||||
|
|
||||||
tvTitle.setText(Name);
|
|
||||||
tvDetails.append(details.getProductionYear() == null ? "" : "年份:" + details.getProductionYear() + " ");
|
|
||||||
tvDetails.append(Genres.equals("") ? "" : "风格:" + Genres + "\n");
|
|
||||||
tvDetails.append(details.getCommunityRating() == null ? "" : "评分:" + details.getCommunityRating() + " ");
|
|
||||||
tvDetails.append(details.getOfficialRating() == null ? "" : "评级:" + details.getOfficialRating() + "\n");
|
|
||||||
|
|
||||||
if (details.getMediaStreams() != null) {
|
|
||||||
String video = "";
|
|
||||||
String audio = "";
|
|
||||||
String subtitle = "";
|
|
||||||
for (int i = 0; i < details.getMediaStreams().size(); i++) {
|
|
||||||
MediaStreams ms = details.getMediaStreams().get(i);
|
|
||||||
String mstype = ms.getType();
|
|
||||||
if (mstype.equals("Video")) {
|
|
||||||
video += ms.getDisplayTitle();
|
|
||||||
} else if (mstype.equals("Audio")) {
|
|
||||||
if (ms.getLanguage()!=null && !ms.getLanguage().equals("")) audio += ms.getLanguage() + "、";
|
|
||||||
else audio += ms.getCodec() + ";";
|
|
||||||
} else if (mstype.equals("Subtitle")) {
|
|
||||||
if (ms.getLanguage() != null && !ms.getLanguage().equals("")) subtitle += ms.getLanguage() + "、";
|
|
||||||
else subtitle += ms.getCodec() + ";";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tvDetails.append(video.equals("") ? "" : "视频:" + video + "\n");
|
|
||||||
tvDetails.append(audio.equals("") ? "" : "音频:" + audio + "\n");
|
|
||||||
tvDetails.append(subtitle.equals("") ? "" : "字幕:" + subtitle + "\n");
|
|
||||||
}
|
|
||||||
String overview = details.getOverview() == null ? "" : details.getOverview();
|
|
||||||
tvDetails.append("简介: " + Html.fromHtml(overview));
|
|
||||||
|
|
||||||
//填充列表
|
|
||||||
String type = details.getType();
|
|
||||||
if (type.equals("Series")) {
|
|
||||||
fillSeason(ItemId);
|
|
||||||
} else if (type.equals("Season")) {
|
|
||||||
String SeriesName = details.getSeriesName() == null ? "" : details.getSeriesName() + "-";
|
|
||||||
tvTitle.setText(SeriesName + details.getName());
|
|
||||||
String SeriesId = details.getSeriesId();
|
|
||||||
fillEpisodes(SeriesId, ItemId);
|
|
||||||
} else if (type.equals("Episode")) {
|
|
||||||
String SeriesName = details.getSeriesName() == null ? "" : details.getSeriesName() + "-";
|
|
||||||
String SeasonName = details.getSeasonName() == null ? "" : details.getSeasonName();
|
|
||||||
tvTitle.setText(SeriesName + SeasonName);
|
|
||||||
String SeriesId = details.getSeriesId();
|
|
||||||
String SeasonId = details.getSeasonId();
|
|
||||||
fillEpisodes(SeriesId, SeasonId);
|
|
||||||
} else if (type.equals("Movie")) {
|
|
||||||
fillMovie(details);
|
|
||||||
} else if (type.equals("Person")) {
|
|
||||||
tvDetails.append("\n出生日期:" + Utils.UtcToLocal(details.getPremiereDate()) + "\n");
|
|
||||||
if(null != details.getProductionLocations()) {
|
|
||||||
tvDetails.append("出生地:" + String.join(",", details.getProductionLocations()));
|
|
||||||
}
|
|
||||||
fillItemsByPerson(Id);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<People> Peoples = details.getPeople();
|
|
||||||
if (Peoples != null) {
|
|
||||||
if (Peoples.size() > 0) {
|
|
||||||
fillPeople(Peoples);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fillMovie(Item item) {
|
|
||||||
|
|
||||||
item.setName("播放: " + item.getName());
|
|
||||||
List<Item> plist = new ArrayList<>();
|
|
||||||
plist.add(item);
|
|
||||||
if (item.getPartCount() > 0) {
|
|
||||||
JfClient.GetAddPart(item.getId(), new JfClient.JJCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Items parts) {
|
|
||||||
plist.addAll(parts.getItems());
|
|
||||||
fillItems(plist);
|
|
||||||
}
|
|
||||||
}, null);
|
|
||||||
} else {
|
|
||||||
fillItems(plist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 填充季
|
|
||||||
*
|
|
||||||
* @param SeriesId
|
|
||||||
*/
|
|
||||||
private void fillSeason(String SeriesId) {
|
|
||||||
JfClient.GetSeasons(SeriesId, new JfClient.JJCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Items seasons) {
|
|
||||||
fillItems(seasons.getItems());
|
|
||||||
}
|
|
||||||
}, errcb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 填充集
|
|
||||||
*
|
|
||||||
* @param SeriesId
|
|
||||||
* @param SeasonId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private void fillEpisodes(String SeriesId, String SeasonId) {
|
|
||||||
JfClient.GetEpisodes(SeriesId, SeasonId, new JfClient.JJCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Items episodes) {
|
|
||||||
fillItems(episodes.getItems());
|
|
||||||
}
|
|
||||||
}, errcb);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fillItems(List<Item> items) {
|
|
||||||
JAdapter jAdapter = new JAdapter(items, false);
|
|
||||||
V7LinearLayoutManager layoutManager = new V7LinearLayoutManager(mGridView.getContext());
|
|
||||||
layoutManager.setOrientation(V7LinearLayoutManager.HORIZONTAL);
|
|
||||||
jAdapter.setOnItemClickListener(this);
|
|
||||||
mGridView.setVisibility(View.VISIBLE);
|
|
||||||
mGridView.setLayoutManager(layoutManager);
|
|
||||||
mGridView.setAdapter(jAdapter);
|
|
||||||
dismissLoadingDialog();
|
|
||||||
mGridView.requestFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 填充演员表
|
|
||||||
*
|
|
||||||
* @param Peoples
|
|
||||||
*/
|
|
||||||
private void fillPeople(List<People> Peoples) {
|
|
||||||
List<Item> Pitems = new ArrayList<>();
|
|
||||||
for (People p : Peoples) {
|
|
||||||
Item it = new Item();
|
|
||||||
it.setId(p.getId());
|
|
||||||
if (p.getType().equals("Director")) {
|
|
||||||
it.setName("导演:" + p.getName());
|
|
||||||
} else if (p.getType().equals("Actor")) {
|
|
||||||
it.setName("演员:" + p.getName());
|
|
||||||
} else {
|
|
||||||
it.setName(p.getName());
|
|
||||||
}
|
|
||||||
it.setType(p.getType());
|
|
||||||
it.setImageTags(new ImageTags());
|
|
||||||
it.getImageTags().setPrimary(p.getPrimaryImageTag());
|
|
||||||
Pitems.add(it);
|
|
||||||
}
|
|
||||||
|
|
||||||
tvPeopleLayout.setVisibility(View.VISIBLE);
|
|
||||||
JAdapter jAdapter = new JAdapter(Pitems, false);
|
|
||||||
V7LinearLayoutManager layoutManager = new V7LinearLayoutManager(mPeopleGridView.getContext());
|
|
||||||
layoutManager.setOrientation(V7LinearLayoutManager.HORIZONTAL);
|
|
||||||
jAdapter.setOnItemClickListener(this);
|
|
||||||
mPeopleGridView.setLayoutManager(layoutManager);
|
|
||||||
mPeopleGridView.setAdapter(jAdapter);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 填充演员作品
|
|
||||||
*
|
|
||||||
* @param personid
|
|
||||||
*/
|
|
||||||
private void fillItemsByPerson(String personid) {
|
|
||||||
String Term = "&SortBy=DateCreated&SortOrder=Descending&PersonIds=" + personid;
|
|
||||||
Term += "&IncludeItemTypes=Movie,Series";
|
|
||||||
JfClient.GetItemsByTerm(Term, new JfClient.JJCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Items iitems) {
|
|
||||||
((TextView) findViewById(R.id.tvListTitle)).setText("演员作品:");
|
|
||||||
List<Item> items = iitems.getItems();
|
|
||||||
JAdapter jAdapter = new JAdapter(items, false);
|
|
||||||
V7GridLayoutManager layoutManager = new V7GridLayoutManager(mGridView.getContext(), 4);
|
|
||||||
jAdapter.setOnItemClickListener(new JAdapter.OnItemClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(Item item) {
|
|
||||||
String itemId = item.getId();
|
|
||||||
Intent intent = new Intent(DetailActivityP.this, DetailActivityP.class);
|
|
||||||
intent.putExtra("itemId", itemId);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mGridView.setVisibility(View.VISIBLE);
|
|
||||||
mGridView.setLayoutManager(layoutManager);
|
|
||||||
mGridView.setAdapter(jAdapter);
|
|
||||||
dismissLoadingDialog();
|
|
||||||
mGridView.requestFocus();
|
|
||||||
}
|
|
||||||
}, errcb);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(Item item) {
|
|
||||||
String itemId = item.getId();
|
|
||||||
String type = item.getType();
|
|
||||||
Intent intent = null;
|
|
||||||
if (type.equals("Season")) {
|
|
||||||
intent = new Intent(this, DetailActivityP.class);
|
|
||||||
intent.putExtra("itemId", itemId);
|
|
||||||
startActivity(intent);
|
|
||||||
} else if (type.equals("Episode")) {
|
|
||||||
JfClient.playList.clear();
|
|
||||||
JAdapter JA = (JAdapter) mGridView.getAdapter();
|
|
||||||
List<Item> ja = JA.getData();
|
|
||||||
if (ja != null) {
|
|
||||||
for (int i = 0; i < ja.size(); i++) {
|
|
||||||
Video media = getMedia(ja.get(i));
|
|
||||||
JfClient.playList.add(media);
|
|
||||||
if (itemId.equals(media.Id)) {
|
|
||||||
JfClient.playIndex = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
toVlcPlayer();
|
|
||||||
}
|
|
||||||
} else if (type.equals("Movie") || type.equals("Video")) {
|
|
||||||
JfClient.playList.clear();
|
|
||||||
JfClient.playList.add(getMedia(item));
|
|
||||||
JfClient.playIndex = 0;
|
|
||||||
toVlcPlayer();
|
|
||||||
} else if (type.equals("Actor") || type.equals("Director")) {
|
|
||||||
intent = new Intent(this, DetailActivityP.class);
|
|
||||||
intent.putExtra("itemId", itemId);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 组合播放媒体
|
|
||||||
*
|
|
||||||
* @param item
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Video getMedia(Item item) {
|
|
||||||
Video media = new Video();
|
|
||||||
media.Id = item.getId();
|
|
||||||
media.Name = item.getName();
|
|
||||||
media.cover = "";
|
|
||||||
media.Url = JfClient.GetPlayUrl(media.Id);
|
|
||||||
if (item.getUserData() != null) {
|
|
||||||
UserData userdata = item.getUserData();
|
|
||||||
media.startPositionTicks = userdata.getPlaybackPositionTicks();
|
|
||||||
}
|
|
||||||
return media;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void toVlcPlayer() {
|
|
||||||
Intent intent;
|
|
||||||
if(JfClient.config.isExtensionPlayer()){
|
|
||||||
String videourl = JfClient.playList.get(JfClient.playIndex).Url;
|
|
||||||
Uri uri = Uri.parse(videourl);
|
|
||||||
intent = new Intent();
|
|
||||||
intent.setAction(Intent.ACTION_VIEW);
|
|
||||||
intent.setDataAndType(uri,"video/mp4");
|
|
||||||
}else{
|
|
||||||
intent = new Intent(this, VlcPlayerActivity.class);
|
|
||||||
}
|
|
||||||
this.startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
private JfClient.JJCallBack errcb = new JfClient.JJCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onError(String str) {
|
|
||||||
ShowToask(str);
|
|
||||||
dismissLoadingDialog();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
@ -179,6 +179,12 @@ public class JfClient {
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String GetBackdropUrl(String itemid, String tagid) {
|
||||||
|
String url = config.getJellyfinUrl() + "/Items/" + itemid + "/Images/Backdrop";
|
||||||
|
url += "?maxWidth=1280&quality=90&tag=" + tagid;
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
public static String GetImgUrl(Item item) {
|
public static String GetImgUrl(Item item) {
|
||||||
if (item.getImageTags() == null) return "";
|
if (item.getImageTags() == null) return "";
|
||||||
if (item.getImageTags().getPrimary() == null || item.getImageTags().getPrimary().equals(""))
|
if (item.getImageTags().getPrimary() == null || item.getImageTags().getPrimary().equals(""))
|
||||||
|
@ -1,123 +1,186 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:padding="@dimen/padding_border"
|
|
||||||
tools:context=".Ui.DetailActivity">
|
|
||||||
|
|
||||||
<ScrollView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:fadingEdge="vertical"
|
|
||||||
android:scrollbars="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
<ImageView
|
||||||
|
android:id="@+id/tvBackdrop"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:scaleType="fitXY"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:maxHeight="720dp"
|
||||||
|
android:src="@drawable/img_loading_placeholder"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/title_panel"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="180dp"
|
||||||
|
android:background="#99000000"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tvBackdrop"></LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/tvCover"
|
||||||
|
android:layout_width="180dp"
|
||||||
|
android:layout_height="280dp"
|
||||||
|
android:layout_marginStart="60dp"
|
||||||
|
android:layout_marginTop="100dp"
|
||||||
|
android:src="@drawable/img_loading_placeholder"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLength="16"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:text=""
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="30dp"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/tvCover"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/title_panel" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvYear"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:text=""
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/tvCover"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDuration"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:text=""
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/tvYear"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvLevel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:text=""
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/tvDuration"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvRating"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:text=""
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/tvLevel"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvTitle" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDetails"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="20dp"
|
||||||
|
android:text=""
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvCover" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvListTitle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:text="播放列表:"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvDetails" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/tab_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvListTitle"
|
||||||
|
app:tabGravity="start"
|
||||||
|
app:tabMode="scrollable">
|
||||||
|
|
||||||
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
|
<org.sifacai.vlcjellyfin.Component.JRecyclerView
|
||||||
|
android:id="@+id/mGridView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:padding="@dimen/padding_border"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tab_container"
|
||||||
|
app:tv_horizontalSpacingWithMargins="@dimen/vh_space_width"
|
||||||
|
app:tv_selectedItemIsCentered="true"
|
||||||
|
app:tv_verticalSpacingWithMargins="@dimen/vh_space_width" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/tvPersonLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/mGridView">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:layout_marginTop="20dp"
|
||||||
|
android:text="演员表:" />
|
||||||
|
|
||||||
<ImageView
|
<org.sifacai.vlcjellyfin.Component.JRecyclerView
|
||||||
android:id="@+id/tvCover"
|
android:id="@+id/mPersonGridView"
|
||||||
android:layout_width="420dp"
|
|
||||||
android:layout_height="620dp"
|
|
||||||
android:scaleType="fitXY"
|
|
||||||
app:srcCompat="@drawable/icon_img_placeholder" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="@dimen/padding_border"
|
|
||||||
android:paddingTop="6dp"
|
|
||||||
android:paddingRight="@dimen/padding_border"
|
|
||||||
android:paddingBottom="6dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvTitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="38dp"
|
|
||||||
android:text="标题:"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="30dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDetails"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:minHeight="200dp"
|
|
||||||
android:textSize="20dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvListTitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:text="播放列表:" />
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
|
||||||
android:id="@+id/tab_container"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:tabGravity="start"
|
|
||||||
app:tabMode="scrollable">
|
|
||||||
|
|
||||||
</com.google.android.material.tabs.TabLayout>
|
|
||||||
|
|
||||||
<org.sifacai.vlcjellyfin.Component.JRecyclerView
|
|
||||||
android:id="@+id/mGridView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:padding="@dimen/padding_border"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:tv_horizontalSpacingWithMargins="@dimen/vh_space_width"
|
|
||||||
app:tv_selectedItemIsCentered="true"
|
|
||||||
app:tv_verticalSpacingWithMargins="@dimen/vh_space_width" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/tvPersonLayout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="312dp"
|
||||||
android:orientation="vertical"
|
android:clipChildren="false"
|
||||||
android:visibility="gone">
|
android:clipToPadding="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false"
|
||||||
|
android:padding="@dimen/padding_border"
|
||||||
|
app:tv_horizontalSpacingWithMargins="@dimen/vh_space_width"
|
||||||
|
app:tv_selectedItemIsCentered="true"
|
||||||
|
app:tv_verticalSpacingWithMargins="@dimen/vh_space_width" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:text="演员表:" />
|
|
||||||
|
|
||||||
<org.sifacai.vlcjellyfin.Component.JRecyclerView
|
|
||||||
android:id="@+id/mPersonGridView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="312dp"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:padding="@dimen/padding_border"
|
|
||||||
app:tv_horizontalSpacingWithMargins="@dimen/vh_space_width"
|
|
||||||
app:tv_selectedItemIsCentered="true"
|
|
||||||
app:tv_verticalSpacingWithMargins="@dimen/vh_space_width" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
@ -1,125 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:padding="@dimen/padding_border"
|
|
||||||
tools:context=".Ui.DetailActivity">
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:fadingEdge="vertical"
|
|
||||||
android:scrollbars="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/tvCover"
|
|
||||||
android:layout_width="420dp"
|
|
||||||
android:layout_height="620dp"
|
|
||||||
android:scaleType="fitXY"
|
|
||||||
app:srcCompat="@drawable/icon_img_placeholder" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingLeft="@dimen/padding_border"
|
|
||||||
android:paddingTop="6dp"
|
|
||||||
android:paddingRight="@dimen/padding_border"
|
|
||||||
android:paddingBottom="6dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvTitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="38dp"
|
|
||||||
android:text="标题:"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="30dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDetails"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:minHeight="200dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:textSize="20dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvListTitle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:text="播放列表:" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/tvPlay"
|
|
||||||
android:layout_width="160dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginLeft="50dp"
|
|
||||||
android:background="@drawable/shape_user_focus_vholder"
|
|
||||||
android:focusable="true"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:src="@drawable/ic_outline_play_circle_outline_128"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<org.sifacai.vlcjellyfin.Component.JRecyclerView
|
|
||||||
android:id="@+id/mGridView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:padding="@dimen/padding_border"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:tv_horizontalSpacingWithMargins="@dimen/vh_space_width"
|
|
||||||
app:tv_selectedItemIsCentered="true"
|
|
||||||
app:tv_verticalSpacingWithMargins="@dimen/vh_space_width" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/tvPersonLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="gone" >
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:text="演员表:"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dp"/>
|
|
||||||
|
|
||||||
<org.sifacai.vlcjellyfin.Component.JRecyclerView
|
|
||||||
android:id="@+id/mPersonGridView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="312dp"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:focusable="false"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:padding="@dimen/padding_border"
|
|
||||||
app:tv_horizontalSpacingWithMargins="@dimen/vh_space_width"
|
|
||||||
app:tv_selectedItemIsCentered="true"
|
|
||||||
app:tv_verticalSpacingWithMargins="@dimen/vh_space_width" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
Loading…
Reference in New Issue
Block a user