Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
9f20c9ca
Commit
9f20c9ca
authored
Jan 04, 2019
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor layout names
parent
924098a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
182 additions
and
183 deletions
+182
-183
app/src/main/java/app/insti/adapter/CardAdapter.java
app/src/main/java/app/insti/adapter/CardAdapter.java
+1
-2
app/src/main/java/app/insti/fragment/BodyFragment.java
app/src/main/java/app/insti/fragment/BodyFragment.java
+1
-1
app/src/main/res/layout/body_head_view.xml
app/src/main/res/layout/body_head_view.xml
+114
-0
app/src/main/res/layout/fragment_body.xml
app/src/main/res/layout/fragment_body.xml
+66
-91
app/src/main/res/layout/fragment_body_fragment_new.xml
app/src/main/res/layout/fragment_body_fragment_new.xml
+0
-89
No files found.
app/src/main/java/app/insti/adapter/CardAdapter.java
View file @
9f20c9ca
...
@@ -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
);
}
}
...
...
app/src/main/java/app/insti/fragment/BodyFragment.java
View file @
9f20c9ca
...
@@ -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
)
{
...
...
app/src/main/res/layout/body_head_view.xml
0 → 100644
View file @
9f20c9ca
<?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
app/src/main/res/layout/fragment_body.xml
View file @
9f20c9ca
<?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"
>
<
Line
arLayout
<
android.support.design.widget.AppB
arLayout
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"
>
<
Line
arLayout
<
android.support.design.widget.CollapsingToolb
arLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_cont
ent"
android:layout_height=
"
match_par
ent"
a
ndroid:orientation=
"horizontal
"
>
a
pp:layout_scrollFlags=
"scroll|exitUntilCollapsed
"
>
<TextView
<!-- HEADER -->
android:id=
"@+id/body_name"
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"10"
android:layout_width=
"wrap_content"
android:text=
"Org Title"
app:layout_collapseMode=
"parallax"
android:textColor=
"@color/colorWhite"
android:background=
"?attr/themeColor"
>
android:textSize=
"21sp"
android:textStyle=
"bold"
/>
<ImageButton
<ImageView
android:id=
"@+id/web_body_button"
android:id=
"@+id/body_picture"
android:layout_width=
"10dp"
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=
"Org Website"
android:background=
"?attr/themeColor"
/>
android:src=
"@drawable/ic_language_black_24dp"
android:tint=
"@color/colorWhite"
android:visibility=
"invisible"
/>
<ImageButton
</RelativeLayout>
android:id=
"@+id/share_body_button"
</android.support.design.widget.CollapsingToolbarLayout>
android:layout_width=
"0dp"
</android.support.design.widget.AppBarLayout>
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.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/body_subtitle"
android:id=
"@+id/body_swipe_refresh_layout"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
android:textColor=
"@color/colorWhite"
/>
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
>
</LinearLayout>
</android.support.v7.widget.CardView>
<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>
<LinearLayout
</android.support.design.widget.CoordinatorLayout>
style=
"?android:attr/buttonBarStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<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=
"16dp"
android:layout_margin=
"0dp"
android:src=
"@drawable/ic_edit_black_24dp"
android:layout_weight=
"1"
android:tint=
"@android:color/black"
android:clickable=
"true"
android:visibility=
"visible"
android:foreground=
"?attr/selectableItemBackground"
android:layout_gravity=
"end|bottom"
/>
android:text=
"FOLLOW"
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>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
android:theme=
"@style/BlueAccent"
/>
</RelativeLayout>
<
Text
View
<
app.insti.TouchImage
View
android:id=
"@+id/
body_description
"
android:id=
"@+id/
expanded_image_body
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"16dp"
android:contentDescription=
"Zoomed Image"
android:layout_marginEnd=
"10dp"
android:visibility=
"gone"
/>
android:layout_marginStart=
"10dp"
</FrameLayout>
android:layout_marginTop=
"12dp"
\ No newline at end of file
android:textColor=
"?attr/themeColorInverse"
android:textColorLink=
"?attr/urlColor"
android:textSize=
"16sp"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_body_fragment_new.xml
deleted
100644 → 0
View file @
924098a5
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment