parent
9e5622c92e
commit
393caaa549
@ -0,0 +1,55 @@
|
||||
package eu.kanade.mangafeed.ui.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import eu.kanade.mangafeed.R;
|
||||
import eu.kanade.mangafeed.ui.activity.BaseActivity;
|
||||
|
||||
public class LibraryFragment extends Fragment {
|
||||
|
||||
public static LibraryFragment newInstance() {
|
||||
LibraryFragment fragment = new LibraryFragment();
|
||||
Bundle args = new Bundle();
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
public LibraryFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
((BaseActivity) getActivity()).getSupportActionBar().setTitle(R.string.library_title);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_library, container, false);
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
public class LocalManga {
|
||||
public String name;
|
||||
public String url;
|
||||
|
||||
public LocalManga(String name, String url) {
|
||||
this.name = name;
|
||||
this.url = url;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,55 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_light_grey">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler_characters"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:clipToPadding="false"/>
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:id="@+id/progress_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||
android:elevation="4dp" />
|
||||
|
||||
<!-- the layout which will contain (host) the drawerLayout -->
|
||||
<FrameLayout
|
||||
android:layout_below="@id/toolbar"
|
||||
android:id="@+id/drawer_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
<!-- the layout which will be the content of the activity (which will be hosted inside the drawer (NOT the list of the drawer)) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/AppTheme.ActionBar"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
@ -0,0 +1,20 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="eu.kanade.mangafeed.ui.fragment.LibraryFragment">
|
||||
|
||||
<GridView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="4dp"
|
||||
android:clipToPadding="false"
|
||||
android:verticalSpacing="4dp"
|
||||
android:horizontalSpacing="4dp"
|
||||
android:columnWidth="96dp"
|
||||
android:numColumns="auto_fit"
|
||||
android:stretchMode="columnWidth"
|
||||
android:drawSelectorOnTop="true"
|
||||
android:fastScrollEnabled="true"
|
||||
android:id="@+id/gridView" />
|
||||
|
||||
</FrameLayout>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="144dp"
|
||||
android:id="@+id/thumbnailImageView"/>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:id="@+id/footerLinearLayout">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:ellipsize="middle"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
android:id="@+id/nameTextView" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<item name="nav_drawer_library" type="id">nav_drawer_library</item>
|
||||
<item name="nav_drawer_recent_updates" type="id">nav_drawer_recent_updates</item>
|
||||
<item name="nav_drawer_catalogues" type="id">nav_drawer_catalogues</item>
|
||||
<item name="nav_drawer_settings" type="id">nav_drawer_settings</item>
|
||||
</resources>
|
Loading…
Reference in new issue