Commit 9f20c9ca authored by Varun Patil's avatar Varun Patil

Refactor layout names

parent 924098a5
...@@ -4,7 +4,6 @@ import android.content.Context; ...@@ -4,7 +4,6 @@ import android.content.Context;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
...@@ -59,7 +58,7 @@ public abstract class CardAdapter<T extends CardInterface> extends RecyclerView. ...@@ -59,7 +58,7 @@ public abstract class CardAdapter<T extends CardInterface> extends RecyclerView.
} }
if (viewType == 4) { if (viewType == 4) {
View bodyView = inflater.inflate(R.layout.fragment_body, viewGroup, false); View bodyView = inflater.inflate(R.layout.body_head_view, viewGroup, false);
return new BodyHeadViewHolder(bodyView); return new BodyHeadViewHolder(bodyView);
} }
......
...@@ -279,7 +279,7 @@ public class BodyFragment extends BackHandledFragment implements TransitionTarge ...@@ -279,7 +279,7 @@ public class BodyFragment extends BackHandledFragment implements TransitionTarge
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
// Inflate the layout for this fragment // Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_body_fragment_new, container, false); return inflater.inflate(R.layout.fragment_body, container, false);
} }
private void zoomImageFromThumb(final ImageView thumbView) { private void zoomImageFromThumb(final ImageView thumbView) {
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/container_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginBottom="12dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_weight="3"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/body_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:text="Org Title"
android:textColor="@color/colorWhite"
android:textSize="21sp"
android:textStyle="bold" />
<ImageButton
android:id="@+id/web_body_button"
android:layout_width="10dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="Org Website"
android:src="@drawable/ic_language_black_24dp"
android:tint="@color/colorWhite"
android:visibility="invisible" />
<ImageButton
android:id="@+id/share_body_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="Share Body"
android:src="@drawable/ic_menu_share"
android:tint="@color/colorWhite" />
</LinearLayout>
<TextView
android:id="@+id/body_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/colorWhite" />
</LinearLayout>
</android.support.v7.widget.CardView>
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/follow_button"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:layout_weight="1"
android:clickable="true"
android:foreground="?attr/selectableItemBackground"
android:text="FOLLOW"
android:textAllCaps="false"
android:textColor="@color/secondaryTextColor" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#aaa">
</View>
<TextView
android:id="@+id/body_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
android:layout_marginTop="12dp"
android:textColor="?attr/themeColorInverse"
android:textColorLink="?attr/urlColor"
android:textSize="16sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container_body" android:id="@+id/container_body"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical"
tools:context=".fragment.BodyFragment"
android:background="?attr/themeColor">
<android.support.v7.widget.CardView <android.support.design.widget.CoordinatorLayout
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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="0dp">
<LinearLayout <android.support.design.widget.AppBarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:layout_gravity="center_vertical"
android:layout_marginBottom="12dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_weight="3"
android:orientation="vertical">
<LinearLayout <android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="horizontal"> app:layout_scrollFlags="scroll|exitUntilCollapsed">
<TextView
android:id="@+id/body_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:text="Org Title"
android:textColor="@color/colorWhite"
android:textSize="21sp"
android:textStyle="bold" />
<ImageButton <!-- HEADER -->
android:id="@+id/web_body_button" <RelativeLayout
android:layout_width="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_width="wrap_content"
android:layout_weight="1" app:layout_collapseMode="parallax"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/themeColor">
android:contentDescription="Org Website"
android:src="@drawable/ic_language_black_24dp"
android:tint="@color/colorWhite"
android:visibility="invisible" />
<ImageButton <ImageView
android:id="@+id/share_body_button" android:id="@+id/body_picture"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:adjustViewBounds="true"
android:layout_weight="1" android:scaleType="centerCrop"
android:background="?attr/selectableItemBackgroundBorderless" android:transitionName="sharedAvatar"
android:contentDescription="Share Body" android:background="?attr/themeColor" />
android:src="@drawable/ic_menu_share"
android:tint="@color/colorWhite" />
</LinearLayout>
<TextView </RelativeLayout>
android:id="@+id/body_subtitle" </android.support.design.widget.CollapsingToolbarLayout>
android:layout_width="wrap_content" </android.support.design.widget.AppBarLayout>
android:layout_height="wrap_content"
android:textColor="@color/colorWhite" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/body_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <android.support.v7.widget.RecyclerView
style="?android:attr/buttonBarStyle" android:id="@+id/body_recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent" />
android:orientation="horizontal"> </android.support.v4.widget.SwipeRefreshLayout>
</android.support.design.widget.CoordinatorLayout>
<Button <android.support.design.widget.FloatingActionButton
android:id="@+id/follow_button" android:id="@+id/edit_fab"
style="?android:attr/buttonBarButtonStyle" android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="0dp" android:layout_margin="16dp"
android:layout_weight="1" android:src="@drawable/ic_edit_black_24dp"
android:clickable="true" android:tint="@android:color/black"
android:foreground="?attr/selectableItemBackground" android:visibility="visible"
android:text="FOLLOW" android:layout_gravity="end|bottom" />
android:textAllCaps="false"
android:textColor="@color/secondaryTextColor" />
</LinearLayout>
<View <RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="match_parent"
android:background="#aaa"> android:gravity="center">
</View>
<TextView <ProgressBar
android:id="@+id/body_description" android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" android:indeterminate="true"
android:layout_marginEnd="10dp" android:theme="@style/BlueAccent" />
android:layout_marginStart="10dp" </RelativeLayout>
android:layout_marginTop="12dp"
android:textColor="?attr/themeColorInverse"
android:textColorLink="?attr/urlColor"
android:textSize="16sp" />
</LinearLayout> <app.insti.TouchImageView
\ No newline at end of file android:id="@+id/expanded_image_body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="Zoomed Image"
android:visibility="gone" />
</FrameLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container_body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".fragment.BodyFragment"
android:background="?attr/themeColor">
<android.support.design.widget.CoordinatorLayout
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">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<!-- HEADER -->
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
app:layout_collapseMode="parallax"
android:background="?attr/themeColor">
<ImageView
android:id="@+id/body_picture"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:transitionName="sharedAvatar"
android:background="?attr/themeColor" />
</RelativeLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/body_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView
android:id="@+id/body_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/edit_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:src="@drawable/ic_edit_black_24dp"
android:tint="@android:color/black"
android:visibility="visible"
android:layout_gravity="end|bottom" />
<RelativeLayout
android:id="@+id/loadingPanel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:theme="@style/BlueAccent" />
</RelativeLayout>
<app.insti.TouchImageView
android:id="@+id/expanded_image_body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="Zoomed Image"
android:visibility="gone" />
</FrameLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment