mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
TEST - New toolbar in HomeFragment and LibraryFragment
This commit is contained in:
parent
661899c7f7
commit
fbb9536d7e
9 changed files with 837 additions and 665 deletions
10
.idea/misc.xml
generated
10
.idea/misc.xml
generated
|
|
@ -7,6 +7,7 @@
|
|||
<entry key="app/src/main/res/drawable-v24/ic_download.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2814814814814815" />
|
||||
<entry key="app/src/main/res/drawable-v24/ic_shuffle.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/bottom_nav_shape.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/dialog_shape.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable/ic_arrow_back.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_close.xml" value="0.27685185185185185" />
|
||||
|
|
@ -16,10 +17,16 @@
|
|||
<entry key="app/src/main/res/drawable/ic_drag_handle.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable/ic_file_download.xml" value="0.2722222222222222" />
|
||||
<entry key="app/src/main/res/drawable/ic_launcher_background.xml" value="0.2814814814814815" />
|
||||
<entry key="app/src/main/res/drawable/ic_pause.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_play.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable/ic_play_arrow_white_24dp.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_refresh.xml" value="0.18958333333333333" />
|
||||
<entry key="app/src/main/res/drawable/ic_search.xml" value="0.27685185185185185" />
|
||||
<entry key="app/src/main/res/drawable/ic_settings.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_shuffle.xml" value="0.2722222222222222" />
|
||||
<entry key="app/src/main/res/drawable/ic_skip_next.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_skip_next_white_24dp.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_skip_previous_white_24dp.xml" value="0.28055555555555556" />
|
||||
<entry key="app/src/main/res/drawable/ic_star.xml" value="0.2722222222222222" />
|
||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/bottom_sheet_song_dialog.xml" value="0.21666666666666667" />
|
||||
|
|
@ -31,7 +38,7 @@
|
|||
<entry key="app/src/main/res/layout/fragment_album_catalogue.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/fragment_album_page.xml" value="0.2769409038238702" />
|
||||
<entry key="app/src/main/res/layout/fragment_artist_page.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/fragment_home.xml" value="0.2212962962962963" />
|
||||
<entry key="app/src/main/res/layout/fragment_home.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/fragment_login.xml" value="0.3166496424923391" />
|
||||
<entry key="app/src/main/res/layout/fragment_player_bottom_sheet.xml" value="0.3166496424923391" />
|
||||
<entry key="app/src/main/res/layout/fragment_playlist_catalogue.xml" value="0.3229166666666667" />
|
||||
|
|
@ -61,6 +68,7 @@
|
|||
<entry key="app/src/main/res/layout/item_player_queue_song.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/player_body_bottom_sheet.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/menu/login_page_menu.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/menu/main_page_menu.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/menu/toolbar_menu.xml" value="0.3229166666666667" />
|
||||
</map>
|
||||
</option>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
package com.cappielloantonio.play.ui.fragment;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
|
|
@ -31,10 +35,14 @@ import com.cappielloantonio.play.model.Album;
|
|||
import com.cappielloantonio.play.model.Artist;
|
||||
import com.cappielloantonio.play.model.Song;
|
||||
import com.cappielloantonio.play.ui.activity.MainActivity;
|
||||
import com.cappielloantonio.play.util.DownloadUtil;
|
||||
import com.cappielloantonio.play.util.MappingUtil;
|
||||
import com.cappielloantonio.play.util.MusicUtil;
|
||||
import com.cappielloantonio.play.util.UIUtil;
|
||||
import com.cappielloantonio.play.viewmodel.HomeViewModel;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class HomeFragment extends Fragment {
|
||||
private static final String TAG = "CategoriesFragment";
|
||||
|
||||
|
|
@ -53,6 +61,18 @@ public class HomeFragment extends Fragment {
|
|||
private TrackAdapter dowanloadedMusicAdapter;
|
||||
private SimilarTrackAdapter similarMusicAdapter;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
inflater.inflate(R.menu.main_page_menu, menu);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
|
@ -71,6 +91,7 @@ public class HomeFragment extends Fragment {
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
initAppBar();
|
||||
initDiscoverSongSlideView();
|
||||
initSimilarSongView();
|
||||
initMostPlayedAlbumView();
|
||||
|
|
@ -96,6 +117,22 @@ public class HomeFragment extends Fragment {
|
|||
bind = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_search:
|
||||
activity.navController.navigate(R.id.action_homeFragment_to_searchFragment);
|
||||
return true;
|
||||
case R.id.action_settings:
|
||||
activity.navController.navigate(R.id.action_homeFragment_to_settingsFragment);
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
bind.recentlyAddedAlbumsTextViewClickable.setOnClickListener(v -> {
|
||||
Bundle bundle = new Bundle();
|
||||
|
|
@ -139,8 +176,6 @@ public class HomeFragment extends Fragment {
|
|||
activity.navController.navigate(R.id.action_homeFragment_to_songListPageFragment, bundle);
|
||||
});
|
||||
|
||||
bind.homeSettingsImageView.setOnClickListener(v -> activity.navController.navigate(R.id.action_homeFragment_to_settingsFragment));
|
||||
|
||||
bind.musicDiscoveryTextViewRefreshable.setOnLongClickListener(v -> {
|
||||
homeViewModel.refreshDiscoverySongSample(requireActivity());
|
||||
return true;
|
||||
|
|
@ -182,6 +217,11 @@ public class HomeFragment extends Fragment {
|
|||
});
|
||||
}
|
||||
|
||||
private void initAppBar() {
|
||||
activity.setSupportActionBar(bind.toolbar);
|
||||
Objects.requireNonNull(bind.toolbar.getOverflowIcon()).setTint(requireContext().getResources().getColor(R.color.titleTextColor, null));
|
||||
}
|
||||
|
||||
private void initDiscoverSongSlideView() {
|
||||
bind.discoverSongViewPager.setOrientation(ViewPager2.ORIENTATION_HORIZONTAL);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.cappielloantonio.play.ui.fragment;
|
|||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
|
|
@ -25,6 +28,8 @@ import com.cappielloantonio.play.model.Song;
|
|||
import com.cappielloantonio.play.ui.activity.MainActivity;
|
||||
import com.cappielloantonio.play.viewmodel.LibraryViewModel;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class LibraryFragment extends Fragment {
|
||||
private static final String TAG = "LibraryFragment";
|
||||
|
||||
|
|
@ -37,6 +42,18 @@ public class LibraryFragment extends Fragment {
|
|||
private GenreAdapter genreAdapter;
|
||||
private PlaylistAdapter playlistAdapter;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
inflater.inflate(R.menu.main_page_menu, menu);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
|
@ -55,6 +72,7 @@ public class LibraryFragment extends Fragment {
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
initAppBar();
|
||||
initAlbumView();
|
||||
initArtistView();
|
||||
initGenreView();
|
||||
|
|
@ -73,6 +91,22 @@ public class LibraryFragment extends Fragment {
|
|||
bind = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_search:
|
||||
activity.navController.navigate(R.id.action_libraryFragment_to_searchFragment);
|
||||
return true;
|
||||
case R.id.action_settings:
|
||||
activity.navController.navigate(R.id.action_libraryFragment_to_settingsFragment);
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
bind.albumCatalogueTextViewClickable.setOnClickListener(v -> activity.navController.navigate(R.id.action_libraryFragment_to_albumCatalogueFragment));
|
||||
bind.artistCatalogueTextViewClickable.setOnClickListener(v -> activity.navController.navigate(R.id.action_libraryFragment_to_artistCatalogueFragment));
|
||||
|
|
@ -97,6 +131,11 @@ public class LibraryFragment extends Fragment {
|
|||
});
|
||||
}
|
||||
|
||||
private void initAppBar() {
|
||||
activity.setSupportActionBar(bind.toolbar);
|
||||
Objects.requireNonNull(bind.toolbar.getOverflowIcon()).setTint(requireContext().getResources().getColor(R.color.titleTextColor, null));
|
||||
}
|
||||
|
||||
private void initAlbumView() {
|
||||
bind.albumRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||
bind.albumRecyclerView.setHasFixedSize(true);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:fillColor="@color/titleTextColor"
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:fillColor="@color/titleTextColor"
|
||||
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z" />
|
||||
</vector>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,246 +1,290 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/fragment_library_nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/global_padding_bottom">
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
|
||||
app:elevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/library_album_sector"
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
android:background="@color/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap"
|
||||
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light">
|
||||
|
||||
<!-- Album -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/ic_play" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
style="@style/TitleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Albums" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="Play" />
|
||||
</LinearLayout>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/album_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/library_album_placeholder"
|
||||
layout="@layout/item_placeholder_album"
|
||||
android:visibility="gone"/>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/fragment_library_nested_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/library_artist_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
android:paddingBottom="@dimen/global_padding_bottom">
|
||||
|
||||
<!-- Artist -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:id="@+id/library_album_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
<!-- Album -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Albums" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/album_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Artists" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
|
||||
android:paddingBottom="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/artist_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="8dp" />
|
||||
</LinearLayout>
|
||||
<include
|
||||
android:id="@+id/library_album_placeholder"
|
||||
layout="@layout/item_placeholder_album"
|
||||
android:visibility="gone" />
|
||||
|
||||
<include
|
||||
android:id="@+id/library_artist_placeholder"
|
||||
layout="@layout/item_placeholder_album"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/library_genres_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<!-- Genre -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:id="@+id/library_artist_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
<!-- Artist -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Genres" />
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Artists" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
<TextView
|
||||
android:id="@+id/artist_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/artist_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
android:paddingBottom="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/genre_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp" />
|
||||
</LinearLayout>
|
||||
<include
|
||||
android:id="@+id/library_artist_placeholder"
|
||||
layout="@layout/item_placeholder_album"
|
||||
android:visibility="gone" />
|
||||
|
||||
<include
|
||||
android:id="@+id/library_genre_placeholder"
|
||||
layout="@layout/item_placeholder_genre"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/library_playlist_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<!-- Playlist -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:id="@+id/library_genres_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
<!-- Genre -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Playlists" />
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Genres" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
<TextView
|
||||
android:id="@+id/genre_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/genre_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- slideview -->
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/playlist_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="212dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp" />
|
||||
</LinearLayout>
|
||||
<include
|
||||
android:id="@+id/library_genre_placeholder"
|
||||
layout="@layout/item_placeholder_genre"
|
||||
android:visibility="gone" />
|
||||
|
||||
<include
|
||||
android:id="@+id/library_playlist_placeholder"
|
||||
layout="@layout/item_placeholder_album"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
<LinearLayout
|
||||
android:id="@+id/library_playlist_sector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<!-- Playlist -->
|
||||
<!-- Label and button -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_catalogue_sample_text_view_refreshable"
|
||||
style="@style/HeadlineTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="Playlists" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playlist_catalogue_text_view_clickable"
|
||||
style="@style/SubheadTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:text="See all" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- slideview -->
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/playlist_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="212dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/library_playlist_placeholder"
|
||||
layout="@layout/item_placeholder_album"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
15
app/src/main/res/menu/main_page_menu.xml
Normal file
15
app/src/main/res/menu/main_page_menu.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@drawable/ic_search"
|
||||
android:title="Search"
|
||||
app:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:title="Settings"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
|
@ -57,6 +57,9 @@
|
|||
<action
|
||||
android:id="@+id/action_homeFragment_to_artistPageFragment"
|
||||
app:destination="@id/artistPageFragment" />
|
||||
<action
|
||||
android:id="@+id/action_homeFragment_to_searchFragment"
|
||||
app:destination="@id/searchFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/libraryFragment"
|
||||
|
|
@ -87,6 +90,12 @@
|
|||
<action
|
||||
android:id="@+id/action_libraryFragment_to_playlistPageFragment"
|
||||
app:destination="@id/playlistPageFragment" />
|
||||
<action
|
||||
android:id="@+id/action_libraryFragment_to_settingsFragment"
|
||||
app:destination="@id/settingsFragment" />
|
||||
<action
|
||||
android:id="@+id/action_libraryFragment_to_searchFragment"
|
||||
app:destination="@id/searchFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/settingsFragment"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue