mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-26 22:20:24 +00:00
move toolbar to fragments
This commit is contained in:
parent
a5ea942341
commit
6f9bf1844b
17 changed files with 396 additions and 249 deletions
|
@ -2,14 +2,13 @@ package de.nicidienase.chaosflix.touch.browse
|
|||
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.databinding.DataBindingUtil
|
||||
import android.os.Bundle
|
||||
import android.os.PersistableBundle
|
||||
import android.support.design.widget.AppBarLayout
|
||||
import android.support.design.widget.NavigationView
|
||||
import android.support.design.widget.Snackbar
|
||||
import android.support.v4.app.Fragment
|
||||
import android.support.v4.app.FragmentTransaction
|
||||
import android.support.v4.widget.DrawerLayout
|
||||
import android.support.v7.app.ActionBarDrawerToggle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
|
@ -20,8 +19,10 @@ import de.nicidienase.chaosflix.R
|
|||
import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent
|
||||
import de.nicidienase.chaosflix.common.entities.streaming.LiveConference
|
||||
import de.nicidienase.chaosflix.common.entities.streaming.Stream
|
||||
import de.nicidienase.chaosflix.databinding.ActivityBrowseBinding
|
||||
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
||||
import de.nicidienase.chaosflix.touch.activities.AboutActivity
|
||||
import de.nicidienase.chaosflix.touch.browse.download.DownloadsListFragment
|
||||
import de.nicidienase.chaosflix.touch.browse.eventslist.EventsListActivity
|
||||
import de.nicidienase.chaosflix.touch.browse.eventslist.EventsListFragment
|
||||
import de.nicidienase.chaosflix.touch.browse.streaming.LivestreamListFragment
|
||||
|
@ -29,44 +30,20 @@ import de.nicidienase.chaosflix.touch.eventdetails.EventDetailsActivity
|
|||
|
||||
class BrowseActivity : AppCompatActivity(),
|
||||
ConferencesTabBrowseFragment.OnInteractionListener,
|
||||
EventsListFragment.OnInteractionListener,
|
||||
LivestreamListFragment.InteractionListener,
|
||||
DownloadsListFragment.InteractionListener,
|
||||
OnEventSelectedListener {
|
||||
private var drawerOpen: Boolean = false
|
||||
|
||||
private lateinit var toolbar: Toolbar
|
||||
private lateinit var drawerToggle: ActionBarDrawerToggle
|
||||
private lateinit var drawerLayout: DrawerLayout
|
||||
private lateinit var appBarLayout: AppBarLayout
|
||||
private lateinit var binding: ActivityBrowseBinding
|
||||
|
||||
protected val numColumns: Int
|
||||
get() = resources.getInteger(R.integer.num_columns)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_browse)
|
||||
|
||||
toolbar = findViewById(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||
|
||||
appBarLayout = findViewById(R.id.app_bar_layout)
|
||||
|
||||
drawerLayout = findViewById(R.id.drawer_layout)
|
||||
drawerToggle = object : ActionBarDrawerToggle(this, drawerLayout,
|
||||
toolbar, R.string.drawer_open, R.string.drawer_close) {
|
||||
override fun onDrawerOpened(drawerView: View) {
|
||||
super.onDrawerOpened(drawerView)
|
||||
drawerOpen = true
|
||||
}
|
||||
|
||||
override fun onDrawerClosed(drawerView: View) {
|
||||
super.onDrawerClosed(drawerView)
|
||||
drawerOpen = false
|
||||
}
|
||||
}
|
||||
drawerLayout.addDrawerListener(drawerToggle)
|
||||
drawerToggle.syncState()
|
||||
binding = DataBindingUtil.setContentView(this,R.layout.activity_browse)
|
||||
|
||||
val navigationView = findViewById<NavigationView>(R.id.navigation_view)
|
||||
navigationView.setNavigationItemSelectedListener { item ->
|
||||
|
@ -75,12 +52,12 @@ class BrowseActivity : AppCompatActivity(),
|
|||
R.id.nav_bookmarks -> showBookmarksFragment()
|
||||
R.id.nav_inprogress -> showInProgressFragment()
|
||||
R.id.nav_about -> showAboutPage()
|
||||
R.id.nav_streams -> showStreamsFragmen()
|
||||
R.id.nav_downloads -> Snackbar.make(drawerLayout, "Not implemented yet", Snackbar.LENGTH_SHORT).show()
|
||||
R.id.nav_preferences -> Snackbar.make(drawerLayout, "Not implemented yet", Snackbar.LENGTH_SHORT).show()
|
||||
else -> Snackbar.make(drawerLayout, "Not implemented yet", Snackbar.LENGTH_SHORT).show()
|
||||
R.id.nav_streams -> showStreamsFragment()
|
||||
R.id.nav_downloads -> showDownloadsFragment()
|
||||
R.id.nav_preferences -> Snackbar.make(binding.drawerLayout, "Not implemented yet", Snackbar.LENGTH_SHORT).show()
|
||||
else -> Snackbar.make(binding.drawerLayout, "Not implemented yet", Snackbar.LENGTH_SHORT).show()
|
||||
}
|
||||
drawerLayout.closeDrawers()
|
||||
binding.drawerLayout.closeDrawers()
|
||||
true
|
||||
}
|
||||
|
||||
|
@ -89,6 +66,38 @@ class BrowseActivity : AppCompatActivity(),
|
|||
}
|
||||
}
|
||||
|
||||
fun setupDrawerToggle(toolbar: Toolbar?) {
|
||||
if(toolbar != null){
|
||||
drawerToggle = object : ActionBarDrawerToggle(this, binding.drawerLayout,
|
||||
toolbar, R.string.drawer_open, R.string.drawer_close) {
|
||||
override fun onDrawerOpened(drawerView: View) {
|
||||
super.onDrawerOpened(drawerView)
|
||||
drawerOpen = true
|
||||
}
|
||||
|
||||
override fun onDrawerClosed(drawerView: View) {
|
||||
super.onDrawerClosed(drawerView)
|
||||
drawerOpen = false
|
||||
}
|
||||
}
|
||||
} else {
|
||||
drawerToggle = object : ActionBarDrawerToggle(this, binding.drawerLayout,
|
||||
R.string.drawer_open, R.string.drawer_close) {
|
||||
override fun onDrawerOpened(drawerView: View) {
|
||||
super.onDrawerOpened(drawerView)
|
||||
drawerOpen = true
|
||||
}
|
||||
|
||||
override fun onDrawerClosed(drawerView: View) {
|
||||
super.onDrawerClosed(drawerView)
|
||||
drawerOpen = false
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.drawerLayout.addDrawerListener(drawerToggle)
|
||||
drawerToggle.syncState()
|
||||
}
|
||||
|
||||
override fun onPostCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
|
||||
super.onPostCreate(savedInstanceState, persistentState)
|
||||
drawerToggle.syncState()
|
||||
|
@ -115,44 +124,36 @@ class BrowseActivity : AppCompatActivity(),
|
|||
}
|
||||
|
||||
private fun showConferencesFragment() {
|
||||
toolbar.setTitle(R.string.app_name)
|
||||
showFragment(ConferencesTabBrowseFragment.newInstance(numColumns), "conferences")
|
||||
}
|
||||
|
||||
private fun showBookmarksFragment() {
|
||||
toolbar.setTitle(R.string.bookmarks)
|
||||
val bookmarksFragment = EventsListFragment.newInstance(EventsListFragment.BOOKMARKS_LIST_ID, numColumns)
|
||||
showFragment(bookmarksFragment, "bookmarks")
|
||||
}
|
||||
|
||||
private fun showInProgressFragment() {
|
||||
toolbar.setTitle(R.string.continue_watching)
|
||||
val progressEventsFragment = EventsListFragment.newInstance(EventsListFragment.IN_PROGRESS_LIST_ID, numColumns)
|
||||
showFragment(progressEventsFragment, "in_progress")
|
||||
}
|
||||
|
||||
private fun showStreamsFragmen() {
|
||||
toolbar.setTitle(getString(R.string.livestreams))
|
||||
private fun showStreamsFragment() {
|
||||
val fragment = LivestreamListFragment()
|
||||
showFragment(fragment, "streams")
|
||||
}
|
||||
|
||||
private fun showDownloadsFragment() {
|
||||
showFragment(DownloadsListFragment(),"downloads")
|
||||
}
|
||||
|
||||
private fun showAboutPage() {
|
||||
val intent = Intent(this, AboutActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
fun showToolbar(){
|
||||
appBarLayout.setExpanded(true)
|
||||
}
|
||||
|
||||
override fun setToolbarTitle(title: String) {
|
||||
toolbar.title = title
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (drawerOpen) {
|
||||
drawerLayout.closeDrawers()
|
||||
binding.drawerLayout.closeDrawers()
|
||||
} else {
|
||||
super.onBackPressed()
|
||||
}
|
||||
|
@ -180,7 +181,6 @@ class BrowseActivity : AppCompatActivity(),
|
|||
ft.addToBackStack(null)
|
||||
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
ft.commit()
|
||||
showToolbar()
|
||||
}
|
||||
|
||||
override fun onEventSelected(event: PersistentEvent, v: View) {
|
||||
|
|
|
@ -3,17 +3,46 @@ package de.nicidienase.chaosflix.touch.browse
|
|||
import android.arch.lifecycle.ViewModelProviders
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.Fragment
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
import android.view.View
|
||||
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.touch.ViewModelFactory
|
||||
|
||||
open class BrowseFragment : Fragment() {
|
||||
|
||||
lateinit var viewModel: BrowseViewModel
|
||||
var overlay: View? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
viewModel = ViewModelProviders.of(activity!!, ViewModelFactory).get(BrowseViewModel::class.java)
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
protected fun setupToolbar(toolbar: Toolbar, title: Int, isRoot: Boolean = true) {
|
||||
setupToolbar(toolbar,resources.getString(title),isRoot)
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
protected fun setupToolbar(toolbar: Toolbar, title: String, isRoot: Boolean = true) {
|
||||
val activity = activity as AppCompatActivity
|
||||
if(activity is BrowseActivity){
|
||||
(activity as BrowseActivity).setupDrawerToggle(toolbar)
|
||||
}
|
||||
activity.setSupportActionBar(toolbar)
|
||||
activity?.supportActionBar?.setTitle(title)
|
||||
if (isRoot) {
|
||||
activity?.supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||
} else {
|
||||
activity?.supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
}
|
||||
|
||||
protected fun setLoadingOverlayVisibility(visible: Boolean) {
|
||||
if (visible) {
|
||||
overlay?.setVisibility(View.VISIBLE)
|
||||
} else {
|
||||
overlay?.setVisibility(View.INVISIBLE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class ConferenceGroupFragment extends BrowseFragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_conferences_pager, container, false);
|
||||
View view = inflater.inflate(R.layout.fragment_conferences_page, container, false);
|
||||
|
||||
if (view instanceof RecyclerView) {
|
||||
Context context = view.getContext();
|
||||
|
|
|
@ -2,15 +2,13 @@ package de.nicidienase.chaosflix.touch.browse;
|
|||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import de.nicidienase.chaosflix.R;
|
||||
import de.nicidienase.chaosflix.databinding.FragmentTabPagerLayoutBinding;
|
||||
import de.nicidienase.chaosflix.touch.browse.adapters.ConferenceGroupsFragmentPager;
|
||||
|
||||
|
||||
|
@ -23,10 +21,7 @@ public class ConferencesTabBrowseFragment extends BrowseFragment {
|
|||
private static final String VIEWPAGER_STATE = "viewpager_state";
|
||||
private int mColumnCount = 1;
|
||||
private OnInteractionListener listener;
|
||||
private Toolbar mToolbar;
|
||||
private Context mContext;
|
||||
private ViewPager mViewPager;
|
||||
private View loadingOverlay;
|
||||
private FragmentTabPagerLayoutBinding binding;
|
||||
|
||||
public static ConferencesTabBrowseFragment newInstance(int columnCount) {
|
||||
ConferencesTabBrowseFragment fragment = new ConferencesTabBrowseFragment();
|
||||
|
@ -39,12 +34,11 @@ public class ConferencesTabBrowseFragment extends BrowseFragment {
|
|||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
mContext = context;
|
||||
if (context instanceof OnInteractionListener) {
|
||||
listener = (OnInteractionListener) context;
|
||||
} else {
|
||||
throw new RuntimeException(context.toString()
|
||||
+ " must implement OnListFragmentInteractionListener");
|
||||
+ " must implement OnInteractionListener");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,34 +55,33 @@ public class ConferencesTabBrowseFragment extends BrowseFragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_tab_pager_layout, container, false);
|
||||
binding = FragmentTabPagerLayoutBinding.inflate(inflater, container, false);
|
||||
|
||||
mViewPager = view.findViewById(R.id.viewpager);
|
||||
|
||||
loadingOverlay = view.findViewById(R.id.loading_overlay);
|
||||
setupToolbar(binding.incToolbar.toolbar, R.string.app_name);
|
||||
setOverlay(binding.incOverlay.loadingOverlay);
|
||||
|
||||
getViewModel().getConferenceGroups()
|
||||
.observe(this, conferenceGroups -> {
|
||||
ConferenceGroupsFragmentPager fragmentPager
|
||||
= new ConferenceGroupsFragmentPager(this.getContext(), getChildFragmentManager());
|
||||
fragmentPager.setContent(conferenceGroups);
|
||||
mViewPager.setAdapter(fragmentPager);
|
||||
mViewPager.onRestoreInstanceState(getArguments().getParcelable(VIEWPAGER_STATE));
|
||||
TabLayout tabLayout = view.findViewById(R.id.sliding_tabs);
|
||||
tabLayout.setupWithViewPager(mViewPager);
|
||||
if(conferenceGroups.size() > 0){
|
||||
binding.viewpager.setAdapter(fragmentPager);
|
||||
binding.viewpager.onRestoreInstanceState(getArguments().getParcelable(VIEWPAGER_STATE));
|
||||
|
||||
binding.slidingTabs.setupWithViewPager(binding.viewpager);
|
||||
if (conferenceGroups.size() > 0) {
|
||||
setLoadingOverlayVisibility(false);
|
||||
}
|
||||
});
|
||||
getViewModel().updateConferences().observe(this,
|
||||
loadingFinished -> setLoadingOverlayVisibility(!loadingFinished));
|
||||
return view;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
getArguments().putParcelable(VIEWPAGER_STATE, mViewPager.onSaveInstanceState());
|
||||
getArguments().putParcelable(VIEWPAGER_STATE,binding.viewpager.onSaveInstanceState());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,16 +90,6 @@ public class ConferencesTabBrowseFragment extends BrowseFragment {
|
|||
listener = null;
|
||||
}
|
||||
|
||||
private void setLoadingOverlayVisibility(boolean visible) {
|
||||
if (loadingOverlay != null) {
|
||||
if (visible) {
|
||||
loadingOverlay.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
loadingOverlay.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnInteractionListener {
|
||||
void onConferenceSelected(long conferenceId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package de.nicidienase.chaosflix.touch.browse.download
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.common.entities.streaming.LiveConference
|
||||
import de.nicidienase.chaosflix.common.entities.streaming.Stream
|
||||
import de.nicidienase.chaosflix.databinding.FragmentDownloadsBinding
|
||||
import de.nicidienase.chaosflix.databinding.FragmentLivestreamsBinding
|
||||
import de.nicidienase.chaosflix.touch.browse.BrowseFragment
|
||||
|
||||
class DownloadsListFragment : BrowseFragment(){
|
||||
|
||||
private lateinit var listener: InteractionListener
|
||||
private lateinit var binding: FragmentDownloadsBinding
|
||||
|
||||
override fun onAttach(context: Context?) {
|
||||
super.onAttach(context)
|
||||
if (context is InteractionListener) {
|
||||
listener = context
|
||||
} else {
|
||||
throw RuntimeException(context.toString() + " must implement LivestreamListFragment.InteractionListener")
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
binding = FragmentDownloadsBinding.inflate(inflater, container, false)
|
||||
setupToolbar(binding.incToolbar?.toolbar!!, R.string.livestreams)
|
||||
overlay = binding.incOverlay?.loadingOverlay
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setLoadingOverlayVisibility(false)
|
||||
}
|
||||
|
||||
interface InteractionListener{
|
||||
fun onStreamSelected(conference: LiveConference, stream: Stream)
|
||||
}
|
||||
}
|
|
@ -4,15 +4,13 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
import android.view.View
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent
|
||||
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
||||
import de.nicidienase.chaosflix.touch.eventdetails.EventDetailsActivity
|
||||
|
||||
class EventsListActivity : AppCompatActivity(), EventsListFragment.OnInteractionListener {
|
||||
|
||||
private lateinit var toolbar: Toolbar
|
||||
class EventsListActivity : AppCompatActivity(), OnEventSelectedListener {
|
||||
|
||||
protected val numColumns: Int
|
||||
get() = resources.getInteger(R.integer.num_columns)
|
||||
|
@ -21,10 +19,6 @@ class EventsListActivity : AppCompatActivity(), EventsListFragment.OnInteraction
|
|||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_events_list)
|
||||
|
||||
toolbar = findViewById(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
val conferenceId = intent.getLongExtra(CONFERENCE_ID_KEY, 0)
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
|
@ -40,10 +34,6 @@ class EventsListActivity : AppCompatActivity(), EventsListFragment.OnInteraction
|
|||
EventDetailsActivity.launch(this, event.eventId)
|
||||
}
|
||||
|
||||
override fun setToolbarTitle(title: String) {
|
||||
toolbar.setTitle(title)
|
||||
}
|
||||
|
||||
companion object {
|
||||
val CONFERENCE_ID_KEY = "conference_id"
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import android.content.Context;
|
|||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
@ -21,6 +21,7 @@ import java.util.List;
|
|||
|
||||
import de.nicidienase.chaosflix.R;
|
||||
import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent;
|
||||
import de.nicidienase.chaosflix.databinding.FragmentEventsListBinding;
|
||||
import de.nicidienase.chaosflix.touch.OnEventSelectedListener;
|
||||
import de.nicidienase.chaosflix.touch.browse.BrowseFragment;
|
||||
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter;
|
||||
|
@ -35,14 +36,14 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
public static final long IN_PROGRESS_LIST_ID = -2;
|
||||
|
||||
private int columnCount = 1;
|
||||
private OnInteractionListener listener;
|
||||
private OnEventSelectedListener listener;
|
||||
|
||||
private EventRecyclerViewAdapter eventAdapter;
|
||||
private long conferenceId;
|
||||
|
||||
private LinearLayoutManager layoutManager;
|
||||
private SearchView searchView;
|
||||
private View loadingOverlay;
|
||||
private FragmentEventsListBinding binding;
|
||||
|
||||
public static EventsListFragment newInstance(long conferenceId, int columnCount) {
|
||||
EventsListFragment fragment = new EventsListFragment();
|
||||
|
@ -57,8 +58,8 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
setHasOptionsMenu(true);
|
||||
if (context instanceof OnInteractionListener) {
|
||||
listener = (OnInteractionListener) context;
|
||||
if (context instanceof OnEventSelectedListener) {
|
||||
listener = (OnEventSelectedListener) context;
|
||||
} else {
|
||||
throw new RuntimeException(context.toString() + " must implement OnListFragmentInteractionListener");
|
||||
}
|
||||
|
@ -75,41 +76,43 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_events_list, container, false);
|
||||
loadingOverlay = view.findViewById(R.id.loading_overlay);
|
||||
Context context = view.getContext();
|
||||
RecyclerView recyclerView = view.findViewById(R.id.list);
|
||||
binding = FragmentEventsListBinding.inflate(inflater, container, false);
|
||||
|
||||
AppCompatActivity activity = (AppCompatActivity) getActivity();
|
||||
activity.setSupportActionBar(binding.incToolbar.toolbar);
|
||||
setOverlay(binding.incOverlay.loadingOverlay);
|
||||
|
||||
if (columnCount <= 1) {
|
||||
layoutManager = new LinearLayoutManager(context);
|
||||
layoutManager = new LinearLayoutManager(getContext());
|
||||
} else {
|
||||
layoutManager = new GridLayoutManager(context, columnCount);
|
||||
layoutManager = new GridLayoutManager(getContext(), columnCount);
|
||||
}
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
binding.list.setLayoutManager(layoutManager);
|
||||
|
||||
eventAdapter = new EventRecyclerViewAdapter(listener);
|
||||
recyclerView.setAdapter(eventAdapter);
|
||||
binding.list.setAdapter(eventAdapter);
|
||||
|
||||
Observer<List<PersistentEvent>> listObserver = persistentEvents -> {
|
||||
setEvents(persistentEvents);
|
||||
if(persistentEvents.size() > 0){
|
||||
if (persistentEvents.size() > 0) {
|
||||
setLoadingOverlayVisibility(false);
|
||||
}
|
||||
};
|
||||
|
||||
Resources resources = getResources();
|
||||
if (conferenceId == BOOKMARKS_LIST_ID) {
|
||||
listener.setToolbarTitle(resources.getString(R.string.bookmarks));
|
||||
setupToolbar(binding.incToolbar.toolbar, R.string.bookmarks);
|
||||
getViewModel().getBookmarkedEvents().observe(this, listObserver);
|
||||
setLoadingOverlayVisibility(false);
|
||||
} else if (conferenceId == IN_PROGRESS_LIST_ID) {
|
||||
listener.setToolbarTitle(resources.getString(R.string.continue_watching));
|
||||
setupToolbar(binding.incToolbar.toolbar, R.string.continue_watching);
|
||||
getViewModel().getInProgressEvents().observe(this, listObserver);
|
||||
setLoadingOverlayVisibility(false);
|
||||
} else {
|
||||
{
|
||||
getViewModel().getConference(conferenceId).observe(this, conference -> {
|
||||
if (conference != null) {
|
||||
listener.setToolbarTitle(conference.getTitle());
|
||||
setupToolbar(binding.incToolbar.toolbar, conference.getTitle(), false);
|
||||
eventAdapter.setShowTags(conference.getTagsUsefull());
|
||||
}
|
||||
});
|
||||
|
@ -120,7 +123,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
);
|
||||
}
|
||||
}
|
||||
return view;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
private void setEvents(List<PersistentEvent> persistentEvents) {
|
||||
|
@ -169,19 +172,4 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
eventAdapter.getFilter().filter(newText);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setLoadingOverlayVisibility(boolean visible){
|
||||
if(loadingOverlay != null){
|
||||
if(visible){
|
||||
loadingOverlay.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
loadingOverlay.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnInteractionListener extends OnEventSelectedListener {
|
||||
void setToolbarTitle(String title);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,11 +8,13 @@ import android.view.ViewGroup
|
|||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.common.entities.streaming.LiveConference
|
||||
import de.nicidienase.chaosflix.common.entities.streaming.Stream
|
||||
import de.nicidienase.chaosflix.databinding.FragmentLivestreamsBinding
|
||||
import de.nicidienase.chaosflix.touch.browse.BrowseFragment
|
||||
|
||||
class LivestreamListFragment : BrowseFragment(){
|
||||
|
||||
private lateinit var listener: InteractionListener
|
||||
private lateinit var binding: FragmentLivestreamsBinding
|
||||
|
||||
override fun onAttach(context: Context?) {
|
||||
super.onAttach(context)
|
||||
|
@ -24,11 +26,15 @@ class LivestreamListFragment : BrowseFragment(){
|
|||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.fragment_livestreams,null)
|
||||
binding = FragmentLivestreamsBinding.inflate(inflater, container, false)
|
||||
setupToolbar(binding.incToolbar?.toolbar!!, R.string.livestreams)
|
||||
overlay = binding.incOverlay?.loadingOverlay
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
setLoadingOverlayVisibility(false)
|
||||
}
|
||||
|
||||
interface InteractionListener{
|
||||
|
|
|
@ -1,39 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<!--<android.support.design.widget.CoordinatorLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:orientation="vertical">-->
|
||||
|
||||
<include layout="@layout/toolbar"/>
|
||||
<!--<android.support.design.widget.AppBarLayout-->
|
||||
<!--android:id="@+id/app_bar_layout"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content">-->
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
<!--<include layout="@layout/toolbar"/>-->
|
||||
|
||||
|
||||
<!--<android.support.design.widget.TabLayout-->
|
||||
<!--android:id="@+id/sliding_tabs"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:background="@color/primary"-->
|
||||
<!--app:layout_anchor="@id/toolbar"-->
|
||||
<!--app:tabIndicatorColor="@color/white"-->
|
||||
<!--app:tabMode="scrollable"-->
|
||||
<!--app:tabSelectedTextColor="@color/white"-->
|
||||
<!--app:tabTextColor="@color/inactive_tab_color"/>-->
|
||||
|
||||
<!--</android.support.design.widget.AppBarLayout>-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
<!--</android.support.design.widget.CoordinatorLayout>-->
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/navigation_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header"
|
||||
app:menu="@menu/navigation_menu"/>
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/navigation_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header"
|
||||
app:menu="@menu/navigation_menu"/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
||||
</layout>
|
|
@ -1,23 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/toolbar"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
android:layout_height="match_parent"/>
|
|
@ -7,5 +7,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_anchor="@id/sliding_tabs"
|
||||
app:layout_anchorGravity="bottom"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:listitem="@layout/item_conference_cardview"/>
|
46
touch/src/main/res/layout/fragment_downloads.xml
Normal file
46
touch/src/main/res/layout/fragment_downloads.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include
|
||||
android:id="@+id/inc_toolbar"
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Coming soon.."
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
</FrameLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/inc_overlay"
|
||||
layout="@layout/loading_overlay"/>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
|
@ -1,21 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="4dp"
|
||||
app:layout_anchor="@id/toolbar"
|
||||
app:layout_anchorGravity="bottom|end"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:listitem="@layout/item_conference_cardview"/>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/loading_overlay"/>
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</FrameLayout>
|
||||
<include
|
||||
android:id="@+id/inc_toolbar"
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<!--<android.support.design.widget.TabLayout-->
|
||||
<!--android:id="@+id/sliding_tabs"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:background="@color/primary"-->
|
||||
<!--android:visibility="invisible"-->
|
||||
<!--app:layout_anchor="@id/toolbar"-->
|
||||
<!--app:tabIndicatorColor="@color/white"-->
|
||||
<!--app:tabMode="scrollable"-->
|
||||
<!--app:tabSelectedTextColor="@color/white"-->
|
||||
<!--app:tabTextColor="@color/inactive_tab_color"/>-->
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_anchor="@id/app_bar_layout"
|
||||
tools:listitem="@layout/item_conference_cardview"/>
|
||||
</FrameLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/inc_overlay"
|
||||
layout="@layout/loading_overlay"/>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
|
|
|
@ -1,29 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
<layout
|
||||
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"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<FrameLayout
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Coming soon.."
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
</FrameLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include
|
||||
android:id="@+id/inc_toolbar"
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Coming soon.."
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
</FrameLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/inc_overlay"
|
||||
layout="@layout/loading_overlay"/>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
||||
|
|
|
@ -1,36 +1,44 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
<layout
|
||||
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">
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/sliding_tabs"
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/app_bar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/primary"
|
||||
android:elevation="4dp"
|
||||
app:layout_anchor="@id/toolbar"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
app:tabMode="scrollable"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextColor="@color/inactive_tab_color"/>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include
|
||||
android:id="@+id/inc_toolbar"
|
||||
layout="@layout/toolbar"/>
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/sliding_tabs"
|
||||
style="@style/ColoredToolbarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_anchor="@id/toolbar"
|
||||
app:layout_anchorGravity="bottom"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
app:tabMode="scrollable"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextColor="@color/inactive_tab_color"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_anchor="@id/sliding_tabs"
|
||||
app:layout_anchorGravity="bottom"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/loading_overlay"/>
|
||||
</FrameLayout>
|
||||
<include
|
||||
android:id="@+id/inc_overlay"
|
||||
layout="@layout/loading_overlay"/>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/loading_overlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -13,4 +15,5 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"/>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge>
|
||||
<android.support.v7.widget.Toolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/ColoredToolbarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:elevation="4dp"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap"
|
||||
app:titleTextColor="@color/white"
|
||||
tools:showIn="@layout/activity_browse"/>
|
||||
</merge>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<merge>
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/ColoredToolbarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap"
|
||||
app:titleTextColor="@color/white"
|
||||
tools:showIn="@layout/activity_browse"/>
|
||||
</merge>
|
||||
</layout>
|
||||
|
|
Loading…
Reference in a new issue