mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-06-03 00:58:06 -04:00
添加排序
This commit is contained in:
parent
f5d3a4350a
commit
5cbe9ee7fc
@ -3,54 +3,57 @@ package org.sifacai.vlcjellyfin;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.ImageView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import me.jessyan.autosize.internal.CustomAdapt;
|
import me.jessyan.autosize.internal.CustomAdapt;
|
||||||
|
|
||||||
public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
||||||
public AlertDialog alertDialogLoading;
|
|
||||||
public AppCompatActivity mAA = this;
|
public AppCompatActivity mAA = this;
|
||||||
private TextView activeBarBack;
|
private ProgressDialog progressDialog;
|
||||||
|
private ImageView activeBarBack;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
if(null != actionBar){
|
if (null != actionBar) {
|
||||||
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
||||||
actionBar.setCustomView(R.layout.activebar_custom);
|
actionBar.setCustomView(R.layout.activebar_custom);
|
||||||
}
|
|
||||||
|
|
||||||
activeBarBack = findViewById(R.id.activeBar_back);
|
activeBarBack = findViewById(R.id.activeBar_back);
|
||||||
activeBarBack.setOnClickListener(new View.OnClickListener() {
|
activeBarBack.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
mAA.finish();
|
mAA.finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
|
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.activebar_menu,menu);
|
getMenuInflater().inflate(R.menu.activebar_menu, menu);
|
||||||
return super.onCreateOptionsMenu(menu);
|
return super.onCreateOptionsMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||||
if(item.getItemId() == R.id.activeBar_option_logout){
|
if (item.getItemId() == R.id.activeBar_option_logout) {
|
||||||
finish();
|
logout();
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
@ -58,7 +61,7 @@ public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
|||||||
/**
|
/**
|
||||||
* 禁用标题栏返回按钮
|
* 禁用标题栏返回按钮
|
||||||
*/
|
*/
|
||||||
public void disableActiveBarBack(){
|
public void disableActiveBarBack() {
|
||||||
activeBarBack.setVisibility(View.GONE);
|
activeBarBack.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,57 +89,31 @@ public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showLoadingDialog(String msg) {
|
|
||||||
mAA.runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
showLoadingDialog(1);
|
|
||||||
setLoadingText(msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void showLoadingDialog() {
|
public void showLoadingDialog() {
|
||||||
mAA.runOnUiThread(new Runnable() {
|
showLoadingDialog("");
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
showLoadingDialog(1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示加载动画框
|
* 显示加载动画框
|
||||||
*/
|
*/
|
||||||
public void showLoadingDialog(int i) {
|
public void showLoadingDialog(String title) {
|
||||||
if (null != alertDialogLoading && alertDialogLoading.isShowing()) {
|
|
||||||
alertDialogLoading.dismiss();
|
|
||||||
}
|
|
||||||
alertDialogLoading = new AlertDialog.Builder(this).create();
|
|
||||||
alertDialogLoading.getWindow().setBackgroundDrawable(new ColorDrawable());
|
|
||||||
alertDialogLoading.setCancelable(false);
|
|
||||||
alertDialogLoading.setOnKeyListener(new DialogInterface.OnKeyListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
|
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
|
||||||
alertDialogLoading.dismiss();
|
|
||||||
mAA.finish();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
alertDialogLoading.show();
|
|
||||||
alertDialogLoading.setContentView(R.layout.loading_alert);
|
|
||||||
alertDialogLoading.setCanceledOnTouchOutside(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void dismissLoadingDialog() {
|
|
||||||
mAA.runOnUiThread(new Runnable() {
|
mAA.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
dismissLoadingDialog(1);
|
progressDialog = new ProgressDialog(mAA);
|
||||||
|
progressDialog.setMessage(title);
|
||||||
|
progressDialog.show();
|
||||||
|
progressDialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
|
||||||
|
if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_BACK) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
mAA.finish();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -144,34 +121,94 @@ public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
|||||||
/**
|
/**
|
||||||
* 隐藏加载框
|
* 隐藏加载框
|
||||||
*/
|
*/
|
||||||
public void dismissLoadingDialog(int i) {
|
public void dismissLoadingDialog() {
|
||||||
if (null != alertDialogLoading && alertDialogLoading.isShowing()) {
|
|
||||||
alertDialogLoading.dismiss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置加载框文字
|
|
||||||
* @param text
|
|
||||||
*/
|
|
||||||
public void setLoadingText(String text){
|
|
||||||
mAA.runOnUiThread(new Runnable() {
|
mAA.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (null != alertDialogLoading && alertDialogLoading.isShowing()) {
|
if (null != progressDialog && progressDialog.isShowing()) {
|
||||||
TextView tv = alertDialogLoading.getWindow().getDecorView().findViewById(R.id.progressText);
|
progressDialog.dismiss();
|
||||||
tv.setText(text);
|
progressDialog = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowToask(String msg){
|
/**
|
||||||
|
* 设置加载框文字
|
||||||
|
*
|
||||||
|
* @param text
|
||||||
|
*/
|
||||||
|
public void setLoadingText(String text) {
|
||||||
mAA.runOnUiThread(new Runnable() {
|
mAA.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(mAA,msg,Toast.LENGTH_LONG).show();
|
if (null != progressDialog && progressDialog.isShowing()) {
|
||||||
|
progressDialog.setMessage(text);
|
||||||
|
}else{
|
||||||
|
showLoadingDialog(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ShowToask(String msg) {
|
||||||
|
mAA.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(mAA, msg, Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取配置
|
||||||
|
*/
|
||||||
|
public void getConfigFromSP() {
|
||||||
|
SharedPreferences sp = this.getSharedPreferences("Jellyfin", this.MODE_PRIVATE);
|
||||||
|
Utils.JellyfinUrl = sp.getString("url", "");
|
||||||
|
Utils.UserName = sp.getString("username", "");
|
||||||
|
Utils.PassWord = sp.getString("password", "");
|
||||||
|
Utils.SortBy = sp.getString("sortby","");
|
||||||
|
Utils.SortOrder = sp.getString("sortorder","");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存配置
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @param username
|
||||||
|
* @param password
|
||||||
|
*/
|
||||||
|
public void saveConfigToSP(String url, String username, String password) {
|
||||||
|
SharedPreferences sp = this.getSharedPreferences("Jellyfin", this.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
|
editor.putString("url", url);
|
||||||
|
editor.putString("username", username);
|
||||||
|
editor.putString("password", password);
|
||||||
|
editor.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存单项配置
|
||||||
|
*/
|
||||||
|
public void saveConfigToSP(String key, String value) {
|
||||||
|
SharedPreferences sp = this.getSharedPreferences("Jellyfin", this.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
|
editor.putString(key, value);
|
||||||
|
editor.putString(key, value);
|
||||||
|
editor.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登 出
|
||||||
|
*/
|
||||||
|
private void logout() {
|
||||||
|
SharedPreferences sp = this.getSharedPreferences("Jellyfin", this.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
|
editor.clear();
|
||||||
|
editor.commit();
|
||||||
|
Utils.UserId = "";
|
||||||
|
Utils.AccessToken = "";
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,10 @@ import android.app.Activity;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.ActionMode;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.SubMenu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.PopupMenu;
|
import android.widget.PopupMenu;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -50,7 +52,7 @@ public class CollectionActivity extends BaseActivity {
|
|||||||
|
|
||||||
mActivity = this;
|
mActivity = this;
|
||||||
mGridContiner = findViewById(R.id.mGridView);
|
mGridContiner = findViewById(R.id.mGridView);
|
||||||
tvTitleTip = findViewById(R.id.tvTitleTip);
|
tvTitleTip = findViewById(R.id.activeBar_titleTip);
|
||||||
V7GridLayoutManager v7GridLayoutManager = new V7GridLayoutManager(this,6);
|
V7GridLayoutManager v7GridLayoutManager = new V7GridLayoutManager(this,6);
|
||||||
mGridContiner.setLayoutManager(v7GridLayoutManager);
|
mGridContiner.setLayoutManager(v7GridLayoutManager);
|
||||||
mGridContiner.setItemAnimator(null); //防崩溃
|
mGridContiner.setItemAnimator(null); //防崩溃
|
||||||
@ -74,22 +76,7 @@ public class CollectionActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
sortMenuBtn = findViewById(R.id.activeBar_sortBtn);
|
initSortByMenu();
|
||||||
initSortByMenu(sortMenuBtn);
|
|
||||||
sortMenuBtn.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
int i = 0;
|
|
||||||
for(Utils.SortByType sbt : Utils.SortByType.values()){
|
|
||||||
if(sbt.value.equals(Utils.SortBy)){
|
|
||||||
i = sbt.ordinal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SortByMenu.getMenu().getItem(i).setCheckable(true);
|
|
||||||
SortByMenu.getMenu().getItem(i).setChecked(true);
|
|
||||||
SortByMenu.show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,14 +124,11 @@ public class CollectionActivity extends BaseActivity {
|
|||||||
countPage = (int) Math.ceil((double) totalCount / limit);
|
countPage = (int) Math.ceil((double) totalCount / limit);
|
||||||
|
|
||||||
JsonArray Items = ItemsObj.get("Items").getAsJsonArray();
|
JsonArray Items = ItemsObj.get("Items").getAsJsonArray();
|
||||||
int oldcount = currItems.size();
|
|
||||||
currItems.addAll(Items);
|
|
||||||
mActivity.runOnUiThread(new Runnable() {
|
mActivity.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
//currAdapter.notifyDataSetChanged();
|
currAdapter.addItems(Items);
|
||||||
currAdapter.notifyItemRangeInserted(oldcount,Items.size());
|
|
||||||
setTitleTip();
|
setTitleTip();
|
||||||
mGridContiner.finishLoadMore();
|
mGridContiner.finishLoadMore();
|
||||||
}
|
}
|
||||||
@ -196,18 +180,42 @@ public class CollectionActivity extends BaseActivity {
|
|||||||
tvTitleTip.setText(tip);
|
tvTitleTip.setText(tip);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSortByMenu(View view){
|
private void initSortByMenu(){
|
||||||
SortByMenu = new PopupMenu(this,view);
|
sortMenuBtn = findViewById(R.id.activeBar_sortBtn);
|
||||||
|
sortMenuBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
int i = 0;
|
||||||
|
for(Utils.SortByType sbt : Utils.SortByType.values()){
|
||||||
|
if(sbt.value.equals(Utils.SortBy)){
|
||||||
|
i = sbt.ordinal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SortByMenu.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
sortMenuBtn.setVisibility(View.VISIBLE);
|
||||||
|
setSortMenuBtnText();
|
||||||
|
SortByMenu = new PopupMenu(this,sortMenuBtn);
|
||||||
Menu menu = SortByMenu.getMenu();
|
Menu menu = SortByMenu.getMenu();
|
||||||
Utils.SortByType[] Ss = Utils.SortByType.values();
|
Utils.SortByType[] Ss = Utils.SortByType.values();
|
||||||
for (Utils.SortByType sortby:Ss) {
|
for (Utils.SortByType sortby:Ss) {
|
||||||
menu.add(0,sortby.ordinal(),sortby.ordinal(),sortby.name());
|
menu.add(0,sortby.ordinal(),sortby.ordinal(),sortby.name());
|
||||||
}
|
}
|
||||||
|
for (Utils.SotrOrderType sot:Utils.SotrOrderType.values()){
|
||||||
|
menu.add(1,sot.ordinal() + Ss.length,sot.ordinal() + Ss.length,sot.name());
|
||||||
|
}
|
||||||
SortByMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
SortByMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem menuItem) {
|
public boolean onMenuItemClick(MenuItem menuItem) {
|
||||||
Utils.SortBy = Utils.SortByType.valueOf(menuItem.getTitle().toString()).value;
|
if(menuItem.getGroupId() == 0) {
|
||||||
currItems = new JsonArray();
|
Utils.SortBy = Utils.SortByType.valueOf(menuItem.getTitle().toString()).value;
|
||||||
|
}else{
|
||||||
|
Utils.SortOrder = Utils.SotrOrderType.valueOf(menuItem.getTitle().toString()).value;
|
||||||
|
}
|
||||||
|
setSortMenuBtnText();
|
||||||
|
currAdapter.clearItems();
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -218,4 +226,28 @@ public class CollectionActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setSortMenuBtnText(){
|
||||||
|
String s = "";
|
||||||
|
Log.d(TAG, "setSortMenuBtnText: 排序规则:" + Utils.SortBy + "-" + Utils.SortOrder);
|
||||||
|
for (Utils.SortByType Sb:Utils.SortByType.values()) {
|
||||||
|
if(Sb.value.equals(Utils.SortBy)){
|
||||||
|
s += Sb.name();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
s += "-";
|
||||||
|
for (Utils.SotrOrderType Sot:Utils.SotrOrderType.values()) {
|
||||||
|
if(Sot.value.equals(Utils.SortOrder)){
|
||||||
|
s += Sot.name();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sortMenuBtn.setText(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finish() {
|
||||||
|
saveConfigToSP("sortby",Utils.SortBy);
|
||||||
|
saveConfigToSP("sortorder",Utils.SortOrder);
|
||||||
|
super.finish();
|
||||||
|
}
|
||||||
}
|
}
|
@ -25,7 +25,7 @@ import com.squareup.picasso.Picasso;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class DetailActivity extends BaseActivity implements JAdapter.OnItemClickListener{
|
public class DetailActivity extends BaseActivity implements JAdapter.OnItemClickListener {
|
||||||
private String TAG = "详情:";
|
private String TAG = "详情:";
|
||||||
private Activity mActivity;
|
private Activity mActivity;
|
||||||
private String ItemId;
|
private String ItemId;
|
||||||
@ -44,6 +44,7 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_detail);
|
setContentView(R.layout.activity_detail);
|
||||||
|
getSupportActionBar().hide();
|
||||||
|
|
||||||
if (Utils.UserId.equals("") || Utils.AccessToken.equals("")) {
|
if (Utils.UserId.equals("") || Utils.AccessToken.equals("")) {
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
@ -164,35 +165,34 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
|
|
||||||
//填充列表
|
//填充列表
|
||||||
String type = Utils.getJsonString(detailObj, "Type").getAsString();
|
String type = Utils.getJsonString(detailObj, "Type").getAsString();
|
||||||
if ( type.equals("Series") ) {
|
if (type.equals("Series")) {
|
||||||
fillSeason(ItemId);
|
fillSeason(ItemId);
|
||||||
}else if( type.equals("Season") ){
|
} else if (type.equals("Season")) {
|
||||||
String SeriesId = detailObj.get("SeriesId").getAsString();
|
String SeriesId = detailObj.get("SeriesId").getAsString();
|
||||||
fillEpisodes(SeriesId,ItemId);
|
fillEpisodes(SeriesId, ItemId);
|
||||||
}else if(type.equals("Episode")){
|
} else if (type.equals("Episode")) {
|
||||||
String SeriesId = Utils.getJsonString(detailObj,"SeriesId").getAsString();
|
String SeriesId = Utils.getJsonString(detailObj, "SeriesId").getAsString();
|
||||||
String SeasonId = Utils.getJsonString(detailObj,"SeasonId").getAsString();
|
String SeasonId = Utils.getJsonString(detailObj, "SeasonId").getAsString();
|
||||||
fillEpisodes(SeriesId,SeasonId);
|
fillEpisodes(SeriesId, SeasonId);
|
||||||
}else if( type.equals("Movie") ) {
|
} else if (type.equals("Movie")) {
|
||||||
mActivity.runOnUiThread(new Runnable() {
|
mAA.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
fillMovie(detailObj);
|
fillMovie(detailObj);
|
||||||
dismissLoadingDialog();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillMovie(JsonObject item){
|
private void fillMovie(JsonObject item) {
|
||||||
tvPlay.setVisibility(View.VISIBLE);
|
tvPlay.setVisibility(View.VISIBLE);
|
||||||
tvAudio.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
tvPlay.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFocusChange(View view, boolean b) {
|
public void onFocusChange(View view, boolean b) {
|
||||||
if(view.hasFocus()){
|
if (view.hasFocus()) {
|
||||||
view.animate().scaleX(1.05f).scaleY(1.05f).setDuration(300).setInterpolator(new BounceInterpolator()).start();
|
view.animate().scaleX(1.05f).scaleY(1.05f).setDuration(300).setInterpolator(new BounceInterpolator()).start();
|
||||||
}else{
|
} else {
|
||||||
view.animate().scaleX(1.0f).scaleY(1.0f).setDuration(300).setInterpolator(new BounceInterpolator()).start();
|
view.animate().scaleX(1.0f).scaleY(1.0f).setDuration(300).setInterpolator(new BounceInterpolator()).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,6 +207,19 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
tvPlay.requestFocus();
|
tvPlay.requestFocus();
|
||||||
|
|
||||||
|
if (item.has("PartCount")) {
|
||||||
|
String Id = Utils.getJsonString(item, "Id").getAsString();
|
||||||
|
String AddPartUrl = "/Videos/" + Id + "/AdditionalParts?userId=" + Utils.UserId;
|
||||||
|
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
String AddPartStr = Utils.okhttpSend(AddPartUrl);
|
||||||
|
fillItems(AddPartStr);
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -218,24 +231,7 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
String SeasonsUrl = "/Shows/" + SeriesId + "/Seasons?userId=" + Utils.UserId;
|
String SeasonsUrl = "/Shows/" + SeriesId + "/Seasons?userId=" + Utils.UserId;
|
||||||
SeasonsUrl += "&Fields=ItemCounts,PrimaryImageAspectRatio,BasicSyncInfo,MediaSourceCount";
|
SeasonsUrl += "&Fields=ItemCounts,PrimaryImageAspectRatio,BasicSyncInfo,MediaSourceCount";
|
||||||
String SeasonsStr = Utils.okhttpSend(SeasonsUrl);
|
String SeasonsStr = Utils.okhttpSend(SeasonsUrl);
|
||||||
ArrayList<String[]> result = new ArrayList<>();
|
fillItems(SeasonsStr);
|
||||||
if (!SeasonsStr.equals("")) {
|
|
||||||
JsonObject SeasonsObj = new Gson().fromJson(SeasonsStr, JsonObject.class);
|
|
||||||
JsonArray Seasons = SeasonsObj.get("Items").getAsJsonArray();
|
|
||||||
JAdapter seasonAdapter = new JAdapter(Seasons, false);
|
|
||||||
V7LinearLayoutManager layoutManager = new V7LinearLayoutManager(mGridView.getContext());
|
|
||||||
layoutManager.setOrientation(V7LinearLayoutManager.HORIZONTAL);
|
|
||||||
seasonAdapter.setOnItemClickListener(this);
|
|
||||||
mActivity.runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
mGridView.setVisibility(View.VISIBLE);
|
|
||||||
mGridView.setLayoutManager(layoutManager);
|
|
||||||
mGridView.setAdapter(seasonAdapter);
|
|
||||||
dismissLoadingDialog();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -250,37 +246,42 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
EpisodesUrl += "&userId=" + Utils.UserId;
|
EpisodesUrl += "&userId=" + Utils.UserId;
|
||||||
EpisodesUrl += "&Fields=ItemCounts,PrimaryImageAspectRatio,BasicSyncInfo,CanDelete,MediaSourceCount,Overview";
|
EpisodesUrl += "&Fields=ItemCounts,PrimaryImageAspectRatio,BasicSyncInfo,CanDelete,MediaSourceCount,Overview";
|
||||||
String EpisodesStr = Utils.okhttpSend(EpisodesUrl);
|
String EpisodesStr = Utils.okhttpSend(EpisodesUrl);
|
||||||
if (!EpisodesStr.equals("")) {
|
fillItems(EpisodesStr);
|
||||||
JsonObject EpisodesObj = new Gson().fromJson(EpisodesStr, JsonObject.class);
|
}
|
||||||
JsonArray Episodes = EpisodesObj.get("Items").getAsJsonArray();
|
|
||||||
JAdapter episodeAdapter = new JAdapter(Episodes, false);
|
public void fillItems(String jsonStr) {
|
||||||
V7LinearLayoutManager layoutManager = new V7LinearLayoutManager(mGridView.getContext());
|
JsonObject item = Utils.JsonToObj(jsonStr, JsonObject.class);
|
||||||
layoutManager.setOrientation(V7LinearLayoutManager.HORIZONTAL);
|
if (item == null) {
|
||||||
episodeAdapter.setOnItemClickListener(this);
|
return;
|
||||||
mActivity.runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
mGridView.setVisibility(View.VISIBLE);
|
|
||||||
mGridView.setLayoutManager(layoutManager);
|
|
||||||
mGridView.setAdapter(episodeAdapter);
|
|
||||||
dismissLoadingDialog();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
JsonArray items = item.get("Items").getAsJsonArray();
|
||||||
|
JAdapter jAdapter = new JAdapter(items, false);
|
||||||
|
V7LinearLayoutManager layoutManager = new V7LinearLayoutManager(mGridView.getContext());
|
||||||
|
layoutManager.setOrientation(V7LinearLayoutManager.HORIZONTAL);
|
||||||
|
jAdapter.setOnItemClickListener(this);
|
||||||
|
mActivity.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mGridView.setVisibility(View.VISIBLE);
|
||||||
|
mGridView.setLayoutManager(layoutManager);
|
||||||
|
mGridView.setAdapter(jAdapter);
|
||||||
|
dismissLoadingDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Video getMedia(JsonObject item) {
|
public Video getMedia(JsonObject item) {
|
||||||
//String playUrl = Utils.JellyfinUrl + "/videos/" + id + "/stream.mp4?static=true&a";
|
//String playUrl = Utils.JellyfinUrl + "/videos/" + id + "/stream.mp4?static=true&a";
|
||||||
Video media = new Video();
|
Video media = new Video();
|
||||||
media.Id = Utils.getJsonString(item,"Id").getAsString();
|
media.Id = Utils.getJsonString(item, "Id").getAsString();
|
||||||
media.Name = Utils.getJsonString(item,"Name").getAsString();
|
media.Name = Utils.getJsonString(item, "Name").getAsString();
|
||||||
JsonObject ImageTags = item.get("ImageTags").getAsJsonObject();
|
JsonObject ImageTags = item.get("ImageTags").getAsJsonObject();
|
||||||
if (ImageTags.has("Primary")) {
|
if (ImageTags.has("Primary")) {
|
||||||
String imgid = ImageTags.get("Primary").getAsString();
|
String imgid = ImageTags.get("Primary").getAsString();
|
||||||
media.cover = Utils.getImgUrl(media.Id, imgid);
|
media.cover = Utils.getImgUrl(media.Id, imgid);
|
||||||
}
|
}
|
||||||
media.Url = Utils.JellyfinUrl + "/videos/" + media.Id + "/stream.mp4?static=true&a";
|
media.Url = Utils.JellyfinUrl + "/videos/" + media.Id + "/stream.mp4?static=true&a";
|
||||||
if (item.has("UserData")){
|
if (item.has("UserData")) {
|
||||||
JsonObject userdata = item.get("UserData").getAsJsonObject();
|
JsonObject userdata = item.get("UserData").getAsJsonObject();
|
||||||
media.startPositionTicks = userdata.get("PlaybackPositionTicks").getAsLong();
|
media.startPositionTicks = userdata.get("PlaybackPositionTicks").getAsLong();
|
||||||
}
|
}
|
||||||
@ -293,26 +294,26 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
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;
|
||||||
if(type.equals("Season")){
|
if (type.equals("Season")) {
|
||||||
intent = new Intent(mActivity,DetailActivity.class);
|
intent = new Intent(mActivity, DetailActivity.class);
|
||||||
intent.putExtra("itemId",itemId);
|
intent.putExtra("itemId", itemId);
|
||||||
mActivity.startActivity(intent);
|
mActivity.startActivity(intent);
|
||||||
}else if(type.equals("Episode")){
|
} else if (type.equals("Episode")) {
|
||||||
Utils.playList.clear();
|
Utils.playList.clear();
|
||||||
String Id = Utils.getJsonString(jo,"Id").getAsString();
|
String Id = Utils.getJsonString(jo, "Id").getAsString();
|
||||||
JAdapter JA = (JAdapter)mGridView.getAdapter();
|
JAdapter JA = (JAdapter) mGridView.getAdapter();
|
||||||
JsonArray ja = JA.getData();
|
JsonArray ja = JA.getData();
|
||||||
if(ja != null){
|
if (ja != null) {
|
||||||
for(int i=0;i<ja.size();i++){
|
for (int i = 0; i < ja.size(); i++) {
|
||||||
Video media = getMedia(ja.get(i).getAsJsonObject());
|
Video media = getMedia(ja.get(i).getAsJsonObject());
|
||||||
Utils.playList.add(media);
|
Utils.playList.add(media);
|
||||||
if(Id.equals(media.Id)){
|
if (Id.equals(media.Id)) {
|
||||||
Utils.playIndex = i;
|
Utils.playIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
toVlcPlayer();
|
toVlcPlayer();
|
||||||
}
|
}
|
||||||
}else if(type.equals("Movie")){
|
} else if (type.equals("Movie") || type.equals("Video")) {
|
||||||
Utils.playList.clear();
|
Utils.playList.clear();
|
||||||
Utils.playList.add(getMedia(jo));
|
Utils.playList.add(getMedia(jo));
|
||||||
Utils.playIndex = 0;
|
Utils.playIndex = 0;
|
||||||
@ -320,8 +321,8 @@ public class DetailActivity extends BaseActivity implements JAdapter.OnItemClick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toVlcPlayer(){
|
public void toVlcPlayer() {
|
||||||
Intent intent = new Intent(this,VlcPlayerActivity.class);
|
Intent intent = new Intent(this, VlcPlayerActivity.class);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -116,9 +116,34 @@ public class JAdapter extends RecyclerView.Adapter {
|
|||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
int count = items.size();
|
int count = items.size();
|
||||||
|
Log.d(TAG, "getItemCount: 数据总数:" + count);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置数据
|
||||||
|
* @param items
|
||||||
|
*/
|
||||||
|
public void setItems(JsonArray items){
|
||||||
|
this.items = items;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加数据
|
||||||
|
* @param items
|
||||||
|
*/
|
||||||
|
public void addItems(JsonArray items){
|
||||||
|
int c = this.items.size();
|
||||||
|
this.items.addAll(items);
|
||||||
|
notifyItemRangeInserted(c,items.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearItems(){
|
||||||
|
this.items = new JsonArray();
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
//定义OnItemClickListener接口
|
//定义OnItemClickListener接口
|
||||||
public interface OnItemClickListener {
|
public interface OnItemClickListener {
|
||||||
void onClick(JsonObject jo);
|
void onClick(JsonObject jo);
|
||||||
|
@ -69,7 +69,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
showLoadingDialog("正在加载首页,请稍候…………");
|
showLoadingDialog("正在加载首页,请稍候…………");
|
||||||
showLogoutBtn();
|
|
||||||
tvContiner.removeAllViews();
|
tvContiner.removeAllViews();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -166,7 +165,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
mActivity.runOnUiThread(new Runnable() {
|
mActivity.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
showLogoutBtn();
|
//showLogoutBtn();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
notL = false;
|
notL = false;
|
||||||
@ -184,57 +183,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showLogoutBtn() {
|
|
||||||
tvLoginOut.setVisibility(View.VISIBLE);
|
|
||||||
tvLoginOut.setText("注 销");
|
|
||||||
tvLoginOut.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
logout();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 登 出
|
|
||||||
*/
|
|
||||||
private void logout() {
|
|
||||||
SharedPreferences sp = this.getSharedPreferences("Jellyfin", this.MODE_PRIVATE);
|
|
||||||
SharedPreferences.Editor editor = sp.edit();
|
|
||||||
editor.clear();
|
|
||||||
editor.commit();
|
|
||||||
Utils.UserId = "";
|
|
||||||
Utils.AccessToken = "";
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 读取配置
|
|
||||||
*/
|
|
||||||
private void getConfigFromSP() {
|
|
||||||
SharedPreferences sp = this.getSharedPreferences("Jellyfin", this.MODE_PRIVATE);
|
|
||||||
Utils.JellyfinUrl = sp.getString("url", "");
|
|
||||||
Utils.UserName = sp.getString("username", "");
|
|
||||||
Utils.PassWord = sp.getString("password", "");
|
|
||||||
Utils.SortBy = sp.getString("sortby","");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存配置
|
|
||||||
*
|
|
||||||
* @param url
|
|
||||||
* @param username
|
|
||||||
* @param password
|
|
||||||
*/
|
|
||||||
private void saveConfigToSP(String url, String username, String password) {
|
|
||||||
SharedPreferences sp = this.getSharedPreferences("Jellyfin", this.MODE_PRIVATE);
|
|
||||||
SharedPreferences.Editor editor = sp.edit();
|
|
||||||
editor.putString("url", url);
|
|
||||||
editor.putString("username", username);
|
|
||||||
editor.putString("password", password);
|
|
||||||
editor.commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录框
|
* 登录框
|
||||||
*/
|
*/
|
||||||
@ -288,7 +236,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
mActivity.finish();
|
System.exit(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ll.addView(urlInput);
|
ll.addView(urlInput);
|
||||||
|
@ -116,9 +116,6 @@ public class VlcPlayerActivity extends BaseActivity implements MediaPlayer.Event
|
|||||||
break;
|
break;
|
||||||
case MediaPlayer.Event.Buffering: //媒体加载public float getBuffering() 获取加载视频流的进度0-100
|
case MediaPlayer.Event.Buffering: //媒体加载public float getBuffering() 获取加载视频流的进度0-100
|
||||||
int Buffering = (int) event.getBuffering();
|
int Buffering = (int) event.getBuffering();
|
||||||
if (null == alertDialogLoading || !alertDialogLoading.isShowing()) {
|
|
||||||
showLoadingDialog();
|
|
||||||
}
|
|
||||||
setLoadingText("加载进度:%" + Buffering);
|
setLoadingText("加载进度:%" + Buffering);
|
||||||
if (Buffering >= 100) {
|
if (Buffering >= 100) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="48dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M17.51,3.87L15.73,2.1 5.84,12l9.9,9.9 1.77,-1.77L9.38,12l8.13,-8.13z"/>
|
||||||
|
</vector>
|
@ -3,8 +3,8 @@
|
|||||||
<item android:state_focused="true">
|
<item android:state_focused="true">
|
||||||
<shape>
|
<shape>
|
||||||
<corners android:radius="1dp" />
|
<corners android:radius="1dp" />
|
||||||
<stroke android:width="1dp" android:color="@color/color_FFFFFF" />
|
<stroke android:width="1dp" android:color="@color/color_BD0CADE2" />
|
||||||
<solid android:color="@color/color_6C3D3D3D" />
|
<solid android:color="@color/color_6CFFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:state_focused="false">
|
<item android:state_focused="false">
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<item android:state_focused="true">
|
<item android:state_focused="true">
|
||||||
<shape>
|
<shape>
|
||||||
<corners android:radius="1dp" />
|
<corners android:radius="1dp" />
|
||||||
<stroke android:width="2dp" android:color="@color/color_FFFFFF" />
|
<stroke android:width="2dp" android:color="@color/color_0CADE2" />
|
||||||
<solid android:color="@color/color_6C3D3D3D" />
|
<solid android:color="@color/color_6CFFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:state_focused="false">
|
<item android:state_focused="false">
|
||||||
|
@ -6,19 +6,18 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/activeBar_back"
|
android:id="@+id/activeBar_back"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="center"
|
android:background="@drawable/shape_user_focus"
|
||||||
android:text="《 " />
|
android:src="@drawable/ic_outline_arrow_back_ios_48"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/activeBar_banner"
|
android:id="@+id/activeBar_banner"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginLeft="@dimen/button_margin_left"
|
|
||||||
android:scaleType="fitStart"
|
android:scaleType="fitStart"
|
||||||
app:srcCompat="@drawable/banner" />
|
app:srcCompat="@drawable/banner" />
|
||||||
|
|
||||||
@ -27,15 +26,33 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="left"
|
android:layout_marginLeft="@dimen/button_margin_left"
|
||||||
android:text=" 提示" />
|
android:gravity="center"
|
||||||
|
android:textSize="18dp"
|
||||||
|
android:text="" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/activeBar_titleTip"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginLeft="@dimen/button_margin_left"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="18dp"
|
||||||
|
android:text="" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/activeBar_sortBtn"
|
android:id="@+id/activeBar_sortBtn"
|
||||||
android:layout_width="60dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:minWidth="100dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:text="排序" />
|
android:textSize="18dp"
|
||||||
|
android:layout_marginLeft="@dimen/button_margin_left"
|
||||||
|
android:layout_marginRight="@dimen/button_margin_left"
|
||||||
|
android:background="@drawable/shape_user_focus"
|
||||||
|
android:text="排序"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -8,7 +8,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".CollectionActivity">
|
tools:context=".CollectionActivity">
|
||||||
|
|
||||||
<include layout="@layout/item_title" />
|
<!-- <include layout="@layout/item_title" />-->
|
||||||
|
|
||||||
<org.sifacai.vlcjellyfin.JRecyclerView
|
<org.sifacai.vlcjellyfin.JRecyclerView
|
||||||
android:id="@+id/mGridView"
|
android:id="@+id/mGridView"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
android:padding="@dimen/padding_border"
|
android:padding="@dimen/padding_border"
|
||||||
tools:context=".MainActivity">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<include layout="@layout/item_title" />
|
<!-- <include layout="@layout/item_title" />-->
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="300dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="160dp"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@color/color_6CFFFFFF"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
@ -21,6 +22,7 @@
|
|||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="@dimen/title_size"
|
android:textSize="@dimen/title_size"
|
||||||
android:text=""/>
|
android:text=""
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user