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"?>
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<android.support.design.widget.CoordinatorLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:gravity="center"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:background="@color/bg_light_grey">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
android:background="?attr/colorPrimary"
|
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||||
<android.support.v4.widget.SwipeRefreshLayout
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||||
android:id="@+id/swipe_container"
|
android:elevation="4dp" />
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
<!-- the layout which will contain (host) the drawerLayout -->
|
||||||
|
<FrameLayout
|
||||||
<android.support.v7.widget.RecyclerView
|
android:layout_below="@id/toolbar"
|
||||||
android:id="@+id/recycler_characters"
|
android:id="@+id/drawer_container"
|
||||||
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_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:fitsSystemWindows="true">
|
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<!-- the layout which will be the content of the activity (which will be hosted inside the drawer (NOT the list of the drawer)) -->
|
||||||
android:id="@+id/toolbar"
|
<FrameLayout
|
||||||
|
android:id="@+id/frame_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="match_parent">
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
|
||||||
android:background="@color/primary"
|
|
||||||
android:theme="@style/AppTheme.ActionBar"/>
|
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
|
||||||
|
|
||||||
</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