mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-06-03 00:58:06 -04:00
优化
This commit is contained in:
parent
c99c783509
commit
cb1ef5c615
6
.idea/misc.xml
generated
6
.idea/misc.xml
generated
@ -11,6 +11,8 @@
|
||||
<entry key="..\:/code/VlcJellyfin/app/src/main/res/layout/item_v.xml" value="0.14583333333333334" />
|
||||
<entry key="..\:/code/VlcJellyfin/app/src/main/res/layout/popmenu.xml" value="0.14479166666666668" />
|
||||
<entry key="..\:/code/VlcJellyfin/app/src/main/res/layout/popmenu_item.xml" value="0.14479166666666668" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/drawable/img_loading_placeholder.xml" value="0.1625" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/drawable/popmenu_focus.xml" value="0.1625" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/drawable/shape_user_focus.xml" value="0.1625" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/drawable/shape_user_focus_VH.xml" value="0.1625" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/drawable/shape_user_focus_vholder.xml" value="0.1625" />
|
||||
@ -18,10 +20,14 @@
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/activity_detail.xml" value="0.14895833333333333" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/activity_main.xml" value="0.2957427536231884" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/activity_vlc_player.xml" value="0.14895833333333333" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/home_horizon_tvrecycler.xml" value="0.14791666666666667" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/item_h.xml" value="0.14895833333333333" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/item_title.xml" value="0.14895833333333333" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/item_v.xml" value="0.14895833333333333" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/loading.xml" value="0.2957427536231884" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/loading_alert.xml" value="0.14895833333333333" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/popmenu.xml" value="0.14895833333333333" />
|
||||
<entry key="..\:/work/VlcJellyfin/app/src/main/res/layout/popmenu_item.xml" value="0.14895833333333333" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -34,7 +34,8 @@
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".VlcPlayerActivity"
|
||||
android:exported="false" />
|
||||
android:exported="false"
|
||||
android:theme="@style/Theme.AppCompat.NoActionBar"/>
|
||||
|
||||
<meta-data
|
||||
android:name="design_width_in_dp"
|
||||
|
@ -12,6 +12,7 @@ import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
@ -107,20 +108,9 @@ public class MainActivity extends BaseActivity {
|
||||
*/
|
||||
private void addRowTvRecyclerView(String title, JsonArray data, boolean horizon) {
|
||||
Log.d(TAG, "addRowTvRecyclerView: " + data.toString());
|
||||
JRecyclerView tvRecyclerView = new JRecyclerView(tvContiner.getContext());
|
||||
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
tvRecyclerView.setLayoutParams(layoutParams);
|
||||
tvRecyclerView.setClipChildren(false);
|
||||
tvRecyclerView.setClipToPadding(false);
|
||||
tvRecyclerView.setSelectedItemAtCentered(true);
|
||||
int mg = Utils.getPixelsFromDp(mActivity,tvContiner.getResources().getDimensionPixelSize(R.dimen.padding_border));
|
||||
tvRecyclerView.setPadding(0, mg, mg, mg);
|
||||
V7LinearLayoutManager layoutManager = new V7LinearLayoutManager(tvRecyclerView.getContext());
|
||||
layoutManager.setOrientation(layoutManager.HORIZONTAL);
|
||||
tvRecyclerView.setLayoutManager(layoutManager);
|
||||
int spm = Utils.getPixelsFromDp(mActivity, tvContiner.getResources().getDimensionPixelSize(R.dimen.vh_space_width));
|
||||
tvRecyclerView.setSpacingWithMargins(0, 12);
|
||||
JRecyclerView tvRecyclerView = (JRecyclerView) LayoutInflater.from(this)
|
||||
.inflate(R.layout.home_horizon_tvrecycler,null);
|
||||
((V7LinearLayoutManager)tvRecyclerView.getLayoutManager()).setOrientation(V7LinearLayoutManager.HORIZONTAL);
|
||||
|
||||
JAdapter jAdapter = new JAdapter(data, horizon);
|
||||
jAdapter.setOnItemClickListener(new JAdapter.OnItemClickListener() {
|
||||
@ -144,8 +134,8 @@ public class MainActivity extends BaseActivity {
|
||||
ts = Utils.getPixelsFromDp(mActivity,ts);
|
||||
TextView titleView = new TextView(tvRecyclerView.getContext());
|
||||
titleView.setText(title);
|
||||
titleView.setTextSize(ts);
|
||||
titleView.setTextColor(0xFFFFFFFF);
|
||||
//titleView.setTextSize(ts);
|
||||
//titleView.setTextColor(0xFFFFFFFF);
|
||||
|
||||
mActivity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
|
@ -7,10 +7,10 @@
|
||||
<solid android:color="@color/color_3D3D3D" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_focused="false">
|
||||
<shape>
|
||||
<corners android:radius="0dp" />
|
||||
<solid android:color="@color/color_6C3D3D3D"/>
|
||||
</shape>
|
||||
</item>
|
||||
<!-- <item android:state_focused="false">-->
|
||||
<!-- <shape>-->
|
||||
<!-- <corners android:radius="0dp" />-->
|
||||
<!-- <solid android:color="@color/color_6C3D3D3D"/>-->
|
||||
<!-- </shape>-->
|
||||
<!-- </item>-->
|
||||
</selector>
|
@ -97,8 +97,8 @@
|
||||
android:id="@+id/tvPlay"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginLeft="60dp"
|
||||
android:padding="6dp"
|
||||
android:focusable="true"
|
||||
android:scaleType="fitCenter"
|
||||
|
14
app/src/main/res/layout/home_horizon_tvrecycler.xml
Normal file
14
app/src/main/res/layout/home_horizon_tvrecycler.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.sifacai.vlcjellyfin.JRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:padding="20dp"
|
||||
app:tv_layoutManager="V7LinearLayoutManager"
|
||||
app:tv_horizontalSpacingWithMargins="10dp"
|
||||
app:tv_selectedItemIsCentered="true">
|
||||
|
||||
</org.sifacai.vlcjellyfin.JRecyclerView>
|
@ -32,9 +32,8 @@
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:padding="0dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/title_size" />
|
||||
android:gravity="center"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/title_height"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal">
|
||||
|
@ -32,9 +32,8 @@
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:padding="0dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/title_size" />
|
||||
android:gravity="center"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
@ -6,8 +6,6 @@
|
||||
android:maxWidth="300dp"
|
||||
android:padding="10dp"
|
||||
android:layout_margin="0dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20dp"
|
||||
android:background="@drawable/popmenu_focus"
|
||||
android:focusable="true" >
|
||||
|
||||
|
@ -1,10 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="jellyfin" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<style name="jellyfin" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- hide title bar -->
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:windowBackground">@drawable/app_bg</item>
|
||||
</style>
|
||||
<style name="popmenuStyle" parent="@android:style/Widget.PopupMenu">
|
||||
<item name="android:popupBackground">@color/color_6CFFFFFF</item><!-- popMenu的背景色-->
|
||||
|
||||
<item name="android:textSize">22dp</item>
|
||||
<!-- 默认 Button,TextView的文字颜色 -->
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<!-- 默认 EditView 输入框字体的颜色 -->
|
||||
<item name="android:editTextColor">#E6E6FA</item>
|
||||
<!-- RadioButton checkbox等控件的文字 -->
|
||||
<item name="android:textColorPrimaryDisableOnly">#1C71A9</item>
|
||||
<!-- 应用的主要文字颜色,actionBar的标题文字默认使用该颜色 -->
|
||||
<item name="android:textColorPrimary">#FFFFFF</item>
|
||||
<!-- 辅助的文字颜色,一般比textColorPrimary的颜色弱一点,用于一些弱化的表示 -->
|
||||
<item name="android:textColorSecondary">#C1C1C1</item>
|
||||
|
||||
</style>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user