forked from github/wulkanowy-mirror
Correct the appearance of the grid and add automatic calculation of fragments layouts
This commit is contained in:
parent
13e5b69e10
commit
cdb9f97904
@ -34,7 +34,11 @@ public class ImageAdapter extends RecyclerView.Adapter<ImageAdapter.ViewHolder>
|
|||||||
public void onBindViewHolder(ImageAdapter.ViewHolder viewHolder, int i) {
|
public void onBindViewHolder(ImageAdapter.ViewHolder viewHolder, int i) {
|
||||||
|
|
||||||
viewHolder.tv_android.setText(lista.get(i));
|
viewHolder.tv_android.setText(lista.get(i));
|
||||||
Picasso.with(context).load(R.drawable.sample_0).into(viewHolder.img_android);
|
Picasso.with(context)
|
||||||
|
.load(R.drawable.sample_0)
|
||||||
|
.noFade()
|
||||||
|
.into(viewHolder.img_android);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,9 +11,12 @@
|
|||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fragment_container"
|
android:id="@+id/fragment_container"
|
||||||
|
app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1" />
|
android:fitsSystemWindows="true"
|
||||||
|
android:layout_weight="1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
<android.support.design.widget.BottomNavigationView
|
<android.support.design.widget.BottomNavigationView
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -9,4 +9,4 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:text="Fragment Frekwencja" />
|
android:text="Fragment Frekwencja" />
|
||||||
|
|
||||||
</FrameLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -11,4 +11,4 @@
|
|||||||
android:text="Fragment Dashboard" />
|
android:text="Fragment Dashboard" />
|
||||||
|
|
||||||
|
|
||||||
</FrameLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -9,4 +9,4 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:text="Fragment Plan lekcji" />
|
android:text="Fragment Plan lekcji" />
|
||||||
|
|
||||||
</FrameLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
tools:context="io.github.wulkanowy.activity.dashboard.marks.MarksFragment">
|
tools:context="io.github.wulkanowy.activity.dashboard.marks.MarksFragment">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
@ -11,4 +10,4 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@color/colorPrimaryDark"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -9,12 +8,19 @@
|
|||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="1dp"
|
||||||
|
android:layout_marginRight="1dp"
|
||||||
/>
|
/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_android"
|
android:id="@+id/tv_android"
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textColor="#FFFFFF"
|
android:gravity="center"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:background="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:layout_marginLeft="1.5dp"
|
||||||
|
android:layout_marginRight="1.5dp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user