mirror of
https://github.com/sifacaii/VlcJellyfin
synced 2025-06-03 00:58:06 -04:00
添加search
This commit is contained in:
parent
c89c8b7d66
commit
f71699898e
@ -34,6 +34,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".CollectionActivity"
|
android:name=".CollectionActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".SearchActivity"
|
||||||
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".VlcPlayerActivity"
|
android:name=".VlcPlayerActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
|
@ -4,10 +4,9 @@ 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.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -43,6 +42,15 @@ public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
|||||||
mAA.finish();
|
mAA.finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ImageView activeBarSearch = findViewById(R.id.activeBar_searchBtn);
|
||||||
|
activeBarSearch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(mAA,SearchActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,6 +72,7 @@ public class BaseActivity extends AppCompatActivity implements CustomAdapt {
|
|||||||
* 禁用标题栏返回按钮
|
* 禁用标题栏返回按钮
|
||||||
*/
|
*/
|
||||||
public void disableActiveBarBack() {
|
public void disableActiveBarBack() {
|
||||||
|
if(null != activeBarBack)
|
||||||
activeBarBack.setVisibility(View.GONE);
|
activeBarBack.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ import com.owen.tvrecyclerview.widget.V7LinearLayoutManager;
|
|||||||
public class MainActivity extends BaseActivity {
|
public class MainActivity extends BaseActivity {
|
||||||
private String TAG = "JMainActivity:";
|
private String TAG = "JMainActivity:";
|
||||||
private Activity mActivity = null;
|
private Activity mActivity = null;
|
||||||
private TextView tvLoginOut;
|
|
||||||
private LinearLayout tvContiner;
|
private LinearLayout tvContiner;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -40,7 +39,6 @@ public class MainActivity extends BaseActivity {
|
|||||||
disableActiveBarBack();
|
disableActiveBarBack();
|
||||||
|
|
||||||
mActivity = this;
|
mActivity = this;
|
||||||
tvLoginOut = findViewById(R.id.tvLoginOut);
|
|
||||||
tvContiner = findViewById(R.id.tvItems);
|
tvContiner = findViewById(R.id.tvItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
app/src/main/res/drawable/ic_outline_search_48.xml
Normal file
5
app/src/main/res/drawable/ic_outline_search_48.xml
Normal file
@ -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="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||||
|
</vector>
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/activeBar_back"
|
android:id="@+id/activeBar_back"
|
||||||
android:focusable="true"
|
|
||||||
android:background="@drawable/shape_user_focus"
|
|
||||||
android:src="@drawable/ic_outline_arrow_back_ios_48"
|
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/shape_user_focus"
|
||||||
|
android:focusable="true"
|
||||||
|
android:src="@drawable/ic_outline_arrow_back_ios_48" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/activeBar_banner"
|
android:id="@+id/activeBar_banner"
|
||||||
@ -25,34 +25,42 @@
|
|||||||
android:id="@+id/activeBar_title"
|
android:id="@+id/activeBar_title"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginLeft="@dimen/button_margin_left"
|
android:layout_marginLeft="@dimen/button_margin_left"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="18dp"
|
android:text=""
|
||||||
android:text="" />
|
android:textSize="18dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/activeBar_titleTip"
|
android:id="@+id/activeBar_titleTip"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginLeft="@dimen/button_margin_left"
|
android:layout_marginLeft="@dimen/button_margin_left"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="18dp"
|
android:text=""
|
||||||
android:text="" />
|
android:textSize="18dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/activeBar_searchBtn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:focusable="true"
|
||||||
|
android:background="@drawable/shape_user_focus"
|
||||||
|
android:src="@drawable/ic_outline_search_48" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/activeBar_sortBtn"
|
android:id="@+id/activeBar_sortBtn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:minWidth="100dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:focusable="true"
|
|
||||||
android:textSize="18dp"
|
|
||||||
android:layout_marginLeft="@dimen/button_margin_left"
|
android:layout_marginLeft="@dimen/button_margin_left"
|
||||||
android:layout_marginRight="@dimen/button_margin_left"
|
android:layout_marginRight="@dimen/button_margin_left"
|
||||||
android:background="@drawable/shape_user_focus"
|
android:background="@drawable/shape_user_focus"
|
||||||
|
android:focusable="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:minWidth="100dp"
|
||||||
android:text="排序"
|
android:text="排序"
|
||||||
android:visibility="gone"/>
|
android:textSize="18dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -8,8 +8,6 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".CollectionActivity">
|
tools:context=".CollectionActivity">
|
||||||
|
|
||||||
<!-- <include layout="@layout/item_title" />-->
|
|
||||||
|
|
||||||
<org.sifacai.vlcjellyfin.JRecyclerView
|
<org.sifacai.vlcjellyfin.JRecyclerView
|
||||||
android:id="@+id/mGridView"
|
android:id="@+id/mGridView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
29
app/src/main/res/layout/activity_search.xml
Normal file
29
app/src/main/res/layout/activity_search.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/tvSearchBtn"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:textSize="@dimen/title_size" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<org.sifacai.vlcjellyfin.JRecyclerView
|
||||||
|
android:id="@+id/mGridView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="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>
|
@ -1,48 +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"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/title_height"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageView2"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="32dp"
|
|
||||||
app:srcCompat="@drawable/banner" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvTitleTip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text=""
|
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:paddingRight="20dp"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="@dimen/title_size" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvLoginOut"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:background="@drawable/shape_user_focus"
|
|
||||||
android:focusable="true"
|
|
||||||
android:focusableInTouchMode="false"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="登 录"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="@dimen/title_size"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -8,8 +8,6 @@
|
|||||||
android:padding="@dimen/padding_border"
|
android:padding="@dimen/padding_border"
|
||||||
tools:context=".MainActivity">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<!-- <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"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user