comment #5 - prepare layouts

This commit is contained in:
Thomas 2020-10-09 10:19:46 +02:00
parent 641a616c96
commit fb83a1927d
14 changed files with 808 additions and 4 deletions

View File

@ -119,5 +119,6 @@ dependencies {
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.github.mancj:MaterialSearchBar:0.8.5'
}

View File

@ -200,7 +200,11 @@
<item>Navigateur</item>
<item>Streaming</item>
</string-array>
<string name="filter">Filtrer</string>
<string name="sepia_element_nsfw">Afficher le contenu sensible</string>
<string name="sepia_element_published_date">Date de publication</string>
<string name="sepia_search_hint">Mot clé, chaîne, vidéo, etc.</string>
<string name="sepia_search">Recherche Sepia</string>
<string name="set_cache_mode">Cache</string>
<string name="set_video_cache_description">Définir le cache pour les vidéos (défaut 100Mo)</string>
<string name="video_cache_value">Cache pour les vidéos: %d Mo</string>

View File

@ -110,6 +110,37 @@
<string name="delete_comment_confirm">Are you sure to delete this comment?</string>
<string name="set_video_mode">Mode for videos</string>
<string name="filter">Filter</string>
<string name="sepia_search">Sepia search</string>
<string name="sepia_element_nsfw">Display sensitive content</string>
<string name="sepia_element_published_date">Published date</string>
<string name="any">Any</string>
<string name="today">Today</string>
<string name="last_7_days">Last 7 days</string>
<string name="last_30_days">Last 30 days</string>
<string name="last_365_days">Last 365 days</string>
<string name="sepia_element_duration">Duration</string>
<string name="duration_short"><![CDATA[Short (<4 min)]]></string>
<string name="duration_medium"><![CDATA[Medium (410 min)]]></string>
<string name="duration_long"><![CDATA[Long (> 10 min)]]></string>
<string name="display_all_categories">Display all categories</string>
<string name="display_all_licenses">Display all licenses</string>
<string name="display_all_languages">Display all languages</string>
<string name="all_of_these_tags">All of these tags</string>
<string name="one_of_these_tags">One of these tags</string>
<string name="apply_filter">Apply filter</string>
<string-array name="sort_by_array">
<item>Best match</item>
<item>Most recent</item>
<item>Least recent</item>
</string-array>
<string name="sort_by">Sort by</string>
<string name="sepia_search_hint">Keyword, channel, video, etc.</string>
<string name="sepia_indication">Sepia Search displays videos and channels that match your search but is not the publisher, nor the owner. If you notice any problems with a video, report it to the administrators on the PeerTube website where the video is published.</string>
<string name="my_videos">My videos</string>
<string name="title">Title</string>
<string name="license">License</string>

View File

@ -90,6 +90,11 @@
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".SepiaSearchActivity"
android:configChanges="orientation|screenSize"
android:label="@string/sepia_search"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".WebviewActivity"
android:configChanges="keyboardHidden|orientation|screenSize"

View File

@ -22,6 +22,7 @@ import android.content.SharedPreferences;
import android.database.sqlite.SQLiteDatabase;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
@ -71,6 +72,7 @@ public class MainActivity extends AppCompatActivity {
Fragment active;
private DisplayVideosFragment recentFragment, locaFragment, trendingFragment, subscriptionFragment, mostLikedFragment;
private DisplayOverviewFragment overviewFragment;
private BottomNavigationView.OnNavigationItemSelectedListener mOnNavigationItemSelectedListener
= item -> {
DisplayVideosFragment displayVideosFragment = null;
@ -149,7 +151,10 @@ public class MainActivity extends AppCompatActivity {
overviewFragment = new DisplayOverviewFragment();
active = overviewFragment;
Log.v(Helper.TAG,"active: " + active);
if( active == null) {
active = overviewFragment;
}
fm.beginTransaction().add(R.id.nav_host_fragment, locaFragment, "5").hide(locaFragment).commit();
if (!Helper.isLoggedIn(MainActivity.this)) {
@ -272,6 +277,7 @@ public class MainActivity extends AppCompatActivity {
MenuItem historyItem = menu.findItem(R.id.action_history);
MenuItem mostLikedItem = menu.findItem(R.id.action_most_liked);
MenuItem settingsItem = menu.findItem(R.id.action_settings);
MenuItem sepiaSearchItem = menu.findItem(R.id.action_sepia_search);
if (Helper.isLoggedIn(MainActivity.this)) {
instanceItem.setVisible(false);
uploadItem.setVisible(true);
@ -289,6 +295,9 @@ public class MainActivity extends AppCompatActivity {
settingsItem.setVisible(true);
mostLikedItem.setVisible(false);
}
if( !BuildConfig.full_instances) {
sepiaSearchItem.setVisible(false);
}
return true;
}
@ -343,7 +352,11 @@ public class MainActivity extends AppCompatActivity {
Intent intent = new Intent(MainActivity.this, AllPlaylistsActivity.class);
startActivity(intent);
return true;
} else if (item.getItemId() == R.id.action_about) {
}else if(item.getItemId() == R.id.action_sepia_search) {
Intent intent = new Intent(MainActivity.this, SepiaSearchActivity.class);
startActivity(intent);
return true;
}else if (item.getItemId() == R.id.action_about) {
Intent intent = new Intent(MainActivity.this, AboutActivity.class);
startActivity(intent);
return true;

View File

@ -0,0 +1,54 @@
package app.fedilab.fedilabtube;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of TubeLab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */
import android.os.Bundle;
import android.view.MenuItem;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction;
import app.fedilab.fedilabtube.fragment.DisplayVideosFragment;
import app.fedilab.fedilabtube.helper.Helper;
public class SepiaSearchActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sepia_search);
if (getSupportActionBar() != null)
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
}

View File

@ -0,0 +1,55 @@
package app.fedilab.fedilabtube.client;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of TubeLab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */
import android.content.Context;
import android.content.SharedPreferences;
import java.util.Set;
import app.fedilab.fedilabtube.R;
import app.fedilab.fedilabtube.helper.Helper;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
class RetrofitSepiaSearchAPI {
private String finalUrl;
private Context _context;
private Set<String> selection;
private String count;
public RetrofitSepiaSearchAPI(Context context) {
_context = context;
finalUrl = "https://search.joinpeertube.org/api/v1/";
SharedPreferences sharedpreferences = _context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
count = String.valueOf(sharedpreferences.getInt(Helper.SET_VIDEOS_PER_PAGE, Helper.VIDEOS_PER_PAGE));
}
private SepiaSearchService init() {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(finalUrl)
.addConverterFactory(GsonConverterFactory.create())
.build();
SharedPreferences sharedpreferences = _context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
selection = sharedpreferences.getStringSet(_context.getString(R.string.set_video_language_choice), null);
return retrofit.create(SepiaSearchService.class);
}
}

View File

@ -0,0 +1,53 @@
package app.fedilab.fedilabtube.client;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of TubeLab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */
import java.util.Date;
import java.util.List;
import app.fedilab.fedilabtube.client.data.ChannelData;
import app.fedilab.fedilabtube.client.data.VideoData;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
interface SepiaSearchService {
@GET("search/videos")
Call<VideoData> getVideos(
@Query("start") String maxId,
@Query("count") String count,
@Query("search") String search,
@Query("durationMax") int durationMax,
@Query("startDate") Date startDate,
@Query("boostLanguages") List<String> languageOneOf,
@Query("categoryOneOf") List<String> categoryOneOf,
@Query("licenceOneOf") List<String> licenceOneOf,
@Query("tagsOneOf") List<String> tagsOneOf,
@Query("tagsAllOf") List<String> tagsAllOf,
@Query("nsfw") boolean nsfw,
@Query("sort") String sort
);
@GET("search/channels")
Call<ChannelData> getChannels(
@Query("search") String search,
@Query("start") String maxId,
@Query("count") String count
);
}

View File

@ -0,0 +1,202 @@
package app.fedilab.fedilabtube.client.entities;
/* Copyright 2020 Thomas Schneider
*
* This file is a part of TubeLab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
* see <http://www.gnu.org/licenses>. */
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;
import java.util.Date;
import java.util.List;
@SuppressWarnings("unused")
class SepiaSearch implements Parcelable {
@SerializedName("start")
private String start;
@SerializedName("count")
private String count;
@SerializedName("search")
private String search;
@SerializedName("durationMax")
private int durationMax;
@SerializedName("startDate")
private Date startDate;
@SerializedName("boostLanguages")
private List<String> boostLanguages;
@SerializedName("categoryOneOf")
private List<String> categoryOneOf;
@SerializedName("licenceOneOf")
private List<String> licenceOneOf;
@SerializedName("tagsOneOf")
private List<String> tagsOneOf;
@SerializedName("tagsAllOf")
private List<String> tagsAllOf;
@SerializedName("nsfw")
private boolean nsfw;
@SerializedName("sort")
private String sort;
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
public int getDurationMax() {
return durationMax;
}
public void setDurationMax(int durationMax) {
this.durationMax = durationMax;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public List<String> getBoostLanguages() {
return boostLanguages;
}
public void setBoostLanguages(List<String> boostLanguages) {
this.boostLanguages = boostLanguages;
}
public List<String> getCategoryOneOf() {
return categoryOneOf;
}
public void setCategoryOneOf(List<String> categoryOneOf) {
this.categoryOneOf = categoryOneOf;
}
public List<String> getLicenceOneOf() {
return licenceOneOf;
}
public void setLicenceOneOf(List<String> licenceOneOf) {
this.licenceOneOf = licenceOneOf;
}
public List<String> getTagsOneOf() {
return tagsOneOf;
}
public void setTagsOneOf(List<String> tagsOneOf) {
this.tagsOneOf = tagsOneOf;
}
public List<String> getTagsAllOf() {
return tagsAllOf;
}
public void setTagsAllOf(List<String> tagsAllOf) {
this.tagsAllOf = tagsAllOf;
}
public boolean isNsfw() {
return nsfw;
}
public void setNsfw(boolean nsfw) {
this.nsfw = nsfw;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.start);
dest.writeString(this.count);
dest.writeString(this.search);
dest.writeInt(this.durationMax);
dest.writeLong(this.startDate != null ? this.startDate.getTime() : -1);
dest.writeStringList(this.boostLanguages);
dest.writeStringList(this.categoryOneOf);
dest.writeStringList(this.licenceOneOf);
dest.writeStringList(this.tagsOneOf);
dest.writeStringList(this.tagsAllOf);
dest.writeByte(this.nsfw ? (byte) 1 : (byte) 0);
dest.writeString(this.sort);
}
public SepiaSearch() {
}
protected SepiaSearch(Parcel in) {
this.start = in.readString();
this.count = in.readString();
this.search = in.readString();
this.durationMax = in.readInt();
long tmpStartDate = in.readLong();
this.startDate = tmpStartDate == -1 ? null : new Date(tmpStartDate);
this.boostLanguages = in.createStringArrayList();
this.categoryOneOf = in.createStringArrayList();
this.licenceOneOf = in.createStringArrayList();
this.tagsOneOf = in.createStringArrayList();
this.tagsAllOf = in.createStringArrayList();
this.nsfw = in.readByte() != 0;
this.sort = in.readString();
}
public static final Parcelable.Creator<SepiaSearch> CREATOR = new Parcelable.Creator<SepiaSearch>() {
@Override
public SepiaSearch createFromParcel(Parcel source) {
return new SepiaSearch(source);
}
@Override
public SepiaSearch[] newArray(int size) {
return new SepiaSearch[size];
}
};
}

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="@color/white">
<path
android:fillColor="@android:color/white"
android:pathData="M7,10l5,5 5,-5z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<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>

View File

@ -0,0 +1,361 @@
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2020 Thomas Schneider
This file is a part of TubeLab
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.
TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with TubeLab; if not,
see <http://www.gnu.org/licenses>.
-->
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/fab_margin"
android:layout_marginEnd="@dimen/fab_margin"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:TagsEditText="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:id="@+id/header"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<com.mancj.materialsearchbar.MaterialSearchBar
style="@style/MaterialSearchBarLight"
app:mt_speechMode="false"
app:mt_hint="@string/sepia_search_hint"
app:mt_maxSuggestionsCount="10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/searchBar" />
<TextView
android:layout_marginTop="5dp"
app:layout_constraintTop_toBottomOf="@+id/searchBar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/colorAccent"
android:id="@+id/explanations"
android:text="@string/sepia_indication"
/>
<Button
android:id="@+id/filter"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/filter"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explanations"
android:drawableEnd="@drawable/ic_baseline_arrow_drop_down_24"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explanations"
app:layout_constraintEnd_toStartOf="@+id/sort_by"
android:text="@string/sort_by"
android:labelFor="@+id/sort_by"/>
<Spinner
android:id="@+id/sort_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/explanations"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/filter_elements"
app:layout_constraintTop_toBottomOf="@+id/filter"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_nsfw"
android:text="@string/sepia_element_nsfw"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:id="@+id/sepia_element_nsfw_label"
/>
<RadioGroup
android:id="@+id/sepia_element_nsfw"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_nsfw_label"
app:layout_constraintStart_toStartOf="parent"
>
<RadioButton
android:id="@+id/sepia_element_nsfw_yes"
android:text="@string/yes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_nsfw_no"
android:text="@string/no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RadioGroup>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_published_date"
android:text="@string/sepia_element_published_date"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_nsfw"
app:layout_constraintStart_toStartOf="parent"
android:id="@+id/sepia_element_published_date_label"
/>
<HorizontalScrollView
android:layout_width="wrap_content"
android:id="@+id/sepia_element_published_date"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:paddingBottom="5dp"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_published_date_label"
app:layout_constraintStart_toStartOf="parent">
<RadioGroup
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<RadioButton
android:id="@+id/sepia_element_published_date_any"
android:text="@string/any"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_published_date_today"
android:text="@string/today"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_published_date_last_7_days"
android:text="@string/last_7_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_published_date_last_30_days"
android:text="@string/last_30_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_published_date_last_365_days"
android:text="@string/last_365_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RadioGroup>
</HorizontalScrollView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_duration"
android:text="@string/sepia_element_duration"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_published_date"
app:layout_constraintStart_toStartOf="parent"
android:id="@+id/sepia_element_duration_label"
/>
<HorizontalScrollView
android:layout_width="wrap_content"
android:id="@+id/sepia_element_duration"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:paddingBottom="5dp"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration_label"
app:layout_constraintStart_toStartOf="parent">
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<RadioButton
android:id="@+id/sepia_element_duration_any"
android:text="@string/any"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_duration_short"
android:text="@string/duration_short"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_duration_medium"
android:text="@string/duration_medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/sepia_element_duration_long"
android:text="@string/duration_long"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RadioGroup>
</HorizontalScrollView>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_category"
android:text="@string/category"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/sepia_element_license_label"
android:id="@+id/sepia_element_category_label"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_license"
android:text="@string/license"
app:layout_constraintStart_toEndOf="@+id/sepia_element_category_label"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration"
app:layout_constraintEnd_toStartOf="@+id/sepia_element_language_label"
android:id="@+id/sepia_element_license_label"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_language"
android:text="@string/language"
app:layout_constraintStart_toEndOf="@+id/sepia_element_license_label"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_duration"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/sepia_element_language_label"
/>
<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_category_label"
app:layout_constraintStart_toStartOf="@+id/sepia_element_category_label"
app:layout_constraintStart_toEndOf="@+id/sepia_element_category_label"
android:id="@+id/sepia_element_category"
/>
<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/category"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_license_label"
app:layout_constraintStart_toStartOf="@+id/sepia_element_license_label"
app:layout_constraintEnd_toEndOf="@+id/sepia_element_license_label"
android:id="@+id/sepia_element_license"
/>
<Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/category"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_language_label"
app:layout_constraintStart_toStartOf="@+id/sepia_element_language_label"
app:layout_constraintEnd_toEndOf="@+id/sepia_element_language_label"
android:id="@+id/sepia_element_language"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_all_of_tags"
android:text="@string/all_of_these_tags"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_category"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/sepia_element_all_of_tags_label"
/>
<mabbas007.tagsedittext.TagsEditText
android:id="@+id/sepia_element_all_of_tags"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_all_of_tags_label"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:lines="2"
android:minLines="2"
TagsEditText:allowSpaceInTag="true"
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
TagsEditText:tagsTextColor="?colorAccent"
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:labelFor="@+id/sepia_element_one_of_tags"
android:text="@string/one_of_these_tags"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_all_of_tags"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/sepia_element_one_of_tags_label"
/>
<mabbas007.tagsedittext.TagsEditText
android:id="@+id/sepia_element_one_of_tags"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_one_of_tags_label"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:lines="2"
android:minLines="2"
TagsEditText:allowSpaceInTag="true"
TagsEditText:tagsCloseImagePadding="@dimen/defaultTagsCloseImagePadding"
TagsEditText:tagsCloseImageRight="@drawable/tag_close"
TagsEditText:tagsTextColor="?colorAccent"
TagsEditText:tagsTextSize="@dimen/defaultTagsTextSize" />
<Button
android:id="@+id/apply_filter"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/apply_filter"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sepia_element_one_of_tags"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<fragment
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:defaultNavHost="true"
app:layout_constraintTop_toBottomOf="@+id/header"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.drawerlayout.widget.DrawerLayout>

View File

@ -50,6 +50,11 @@
android:icon="@drawable/ic_baseline_settings_24"
android:title="@string/settings"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_sepia_search"
android:icon="@drawable/ic_baseline_search_24"
android:title="@string/sepia_search"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_about"
android:icon="@drawable/ic_baseline_info_24"

View File

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:4.0.2'
def nav_version = "2.3.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
// NOTE: Do not place your application dependencies here; they belong