Added search button
This commit is contained in:
parent
7145f04375
commit
03520b55e7
@ -27,6 +27,7 @@
|
||||
- [ ] Comment video
|
||||
- [ ] Unit Tests
|
||||
- [ ] App Icon and assets
|
||||
- [ ] Search
|
||||
- [ ] Lots more missing at this point...
|
||||
|
||||
|
||||
|
@ -145,6 +145,11 @@ public class VideoListActivity extends AppCompatActivity {
|
||||
inflater.inflate(R.menu.menu_main, menu);
|
||||
|
||||
// Set an icon in the ActionBar
|
||||
menu.findItem(R.id.action_search).setIcon(
|
||||
new IconDrawable(this, FontAwesomeIcons.fa_search)
|
||||
.colorRes(R.color.cardview_light_background)
|
||||
.actionBarSize());
|
||||
|
||||
menu.findItem(R.id.action_settings).setIcon(
|
||||
new IconDrawable(this, FontAwesomeIcons.fa_cog)
|
||||
.colorRes(R.color.cardview_light_background)
|
||||
@ -162,6 +167,11 @@ public class VideoListActivity extends AppCompatActivity {
|
||||
|
||||
switch (item.getItemId()) {
|
||||
// action with ID action_refresh was selected
|
||||
case R.id.action_search:
|
||||
// TODO: implement
|
||||
Toast.makeText(this, "Search Selected", Toast.LENGTH_SHORT).show();
|
||||
|
||||
return false;
|
||||
case R.id.action_settings:
|
||||
// Toast.makeText(this, "Login Selected", Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent(this, SettingsActivity.class);
|
||||
|
@ -2,11 +2,8 @@ package net.schueller.peertube.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.format.DateUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -19,7 +16,6 @@ import net.schueller.peertube.R;
|
||||
import net.schueller.peertube.activity.TorrentVideoPlayActivity;
|
||||
import net.schueller.peertube.helper.APIUrlHelper;
|
||||
import net.schueller.peertube.helper.MetaDataHelper;
|
||||
import net.schueller.peertube.model.Account;
|
||||
import net.schueller.peertube.model.Avatar;
|
||||
import net.schueller.peertube.model.Video;
|
||||
|
||||
|
@ -4,6 +4,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="activity.VideoListActivity">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:orderInCategory="300"
|
||||
android:title="@string/action_bar_title_search"
|
||||
app:showAsAction="always" />
|
||||
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="300"
|
||||
|
@ -20,6 +20,7 @@
|
||||
</string>
|
||||
|
||||
<!-- Action bar -->
|
||||
<string name="action_bar_title_search">Search</string>
|
||||
<string name="action_bar_title_settings">Settings</string>
|
||||
|
||||
<!-- Bottom navigation bar -->
|
||||
|
Loading…
Reference in New Issue
Block a user