Commit 098e3d2c authored by sshivam95's avatar sshivam95

Initiate development of imageView zoom

parent a1d90606
...@@ -52,6 +52,5 @@ dependencies { ...@@ -52,6 +52,5 @@ dependencies {
implementation "ru.noties:markwon:${markwonVersion}" implementation "ru.noties:markwon:${markwonVersion}"
implementation "com.github.Cutta:TagView:${tagViewVersion}" implementation "com.github.Cutta:TagView:${tagViewVersion}"
implementation "me.relex:circleindicator:${circleIndicatorVersion}" implementation "me.relex:circleindicator:${circleIndicatorVersion}"
implementation 'com.android.support:support-v4:28.0.0'
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
...@@ -38,12 +38,14 @@ public class ComplaintFragment extends Fragment { ...@@ -38,12 +38,14 @@ public class ComplaintFragment extends Fragment {
private View mview; private View mview;
private String complaintId, sessionID, userId, userProfileUrl; private String complaintId, sessionID, userId, userProfileUrl;
private CircleIndicator circleIndicator; private CircleIndicator circleIndicator;
private AppBarLayout appBarLayout;
@Override @Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_complaint, container, false); View view = inflater.inflate(R.layout.fragment_complaint, container, false);
appBarLayout = view.findViewById(R.id.appBar);
LinearLayout imageViewHolder = view.findViewById(R.id.image_holder_view); LinearLayout imageViewHolder = view.findViewById(R.id.image_holder_view);
CollapsingToolbarLayout.LayoutParams layoutParams = new CollapsingToolbarLayout.LayoutParams CollapsingToolbarLayout.LayoutParams layoutParams = new CollapsingToolbarLayout.LayoutParams
(CollapsingToolbarLayout.LayoutParams.MATCH_PARENT, (CollapsingToolbarLayout.LayoutParams.MATCH_PARENT,
...@@ -89,6 +91,7 @@ public class ComplaintFragment extends Fragment { ...@@ -89,6 +91,7 @@ public class ComplaintFragment extends Fragment {
} }
initViewPagerForImages(complaint); initViewPagerForImages(complaint);
initTabViews(complaint); initTabViews(complaint);
getActivity().findViewById(R.id.loadingPanel).setVisibility(View.GONE);
} }
} }
...@@ -144,10 +147,8 @@ public class ComplaintFragment extends Fragment { ...@@ -144,10 +147,8 @@ public class ComplaintFragment extends Fragment {
final TypedArray styledAttributes = Objects.requireNonNull(ComplaintFragment.this.getActivity()).getTheme().obtainStyledAttributes( final TypedArray styledAttributes = Objects.requireNonNull(ComplaintFragment.this.getActivity()).getTheme().obtainStyledAttributes(
new int[]{android.R.attr.actionBarSize}); new int[]{android.R.attr.actionBarSize});
// int mActionBarSize = (int) styledAttributes.getDimension(0, 0); For future Uae
styledAttributes.recycle(); styledAttributes.recycle();
//Replace second parameter to mActionBarSize = (int) styledAttributes.getDimension(0, 0) after adding "Relevant Complaints"
// Replace second parameter to mActionBarSize after adding "Relevant Complaints"
AppBarLayout.LayoutParams layoutParams = new AppBarLayout.LayoutParams(AppBarLayout.LayoutParams.MATCH_PARENT, AppBarLayout.LayoutParams layoutParams = new AppBarLayout.LayoutParams(AppBarLayout.LayoutParams.MATCH_PARENT,
0); 0);
slidingTabLayout.setLayoutParams(layoutParams); slidingTabLayout.setLayoutParams(layoutParams);
...@@ -190,4 +191,10 @@ public class ComplaintFragment extends Fragment { ...@@ -190,4 +191,10 @@ public class ComplaintFragment extends Fragment {
e.printStackTrace(); e.printStackTrace();
} }
} }
@Override
public void onStart() {
super.onStart();
appBarLayout.setExpanded(true);
}
} }
\ No newline at end of file
...@@ -280,7 +280,7 @@ public class FileComplaintFragment extends Fragment { ...@@ -280,7 +280,7 @@ public class FileComplaintFragment extends Fragment {
viewPager = view.findViewById(R.id.complaint_image_view_pager); viewPager = view.findViewById(R.id.complaint_image_view_pager);
indicator = view.findViewById(R.id.indicator); indicator = view.findViewById(R.id.indicator);
imageActionButton = view.findViewById(R.id.fabButton); imageActionButton = view.findViewById(R.id.add_image);
imageButtonAddTags = view.findViewById(R.id.imageButtonAddTags); imageButtonAddTags = view.findViewById(R.id.imageButtonAddTags);
editTextSuggestions = view.findViewById(R.id.editTextSuggestions); editTextSuggestions = view.findViewById(R.id.editTextSuggestions);
editTextLocationDetails = view.findViewById(R.id.editTextLocationDetails); editTextLocationDetails = view.findViewById(R.id.editTextLocationDetails);
......
...@@ -41,6 +41,12 @@ public class ImageFragment extends BaseFragment { ...@@ -41,6 +41,12 @@ public class ImageFragment extends BaseFragment {
View view = inflater.inflate(R.layout.fragment_image, container, false); View view = inflater.inflate(R.layout.fragment_image, container, false);
ImageView imageView = view.findViewById(R.id.imageView); ImageView imageView = view.findViewById(R.id.imageView);
Picasso.get().load(image).into(imageView); Picasso.get().load(image).into(imageView);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
return view; return view;
} }
} }
\ No newline at end of file
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
android:id="@+id/collapsing_toolbar" android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:contentScrim="@android:color/white"
android:background="@color/colorWhite" android:background="@color/colorWhite"
app:contentScrim="@android:color/white"
app:layout_scrollFlags="scroll|exitUntilCollapsed"> app:layout_scrollFlags="scroll|exitUntilCollapsed">
<LinearLayout <LinearLayout
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
android:layout_height="2dp" android:layout_height="2dp"
android:orientation="vertical" android:orientation="vertical"
app:layout_collapseMode="parallax"> app:layout_collapseMode="parallax">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/complaint_image_view_pager" android:id="@+id/complaint_image_view_pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent" />
<me.relex.circleindicator.CircleIndicator <me.relex.circleindicator.CircleIndicator
android:id="@+id/indicator" android:id="@+id/indicator"
...@@ -57,11 +58,11 @@ ...@@ -57,11 +58,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:layout_gravity="bottom" android:layout_gravity="bottom"
app:tabIndicatorColor="@color/colorPrimary"
android:background="@color/colorWhite" android:background="@color/colorWhite"
app:tabTextColor="@color/colorGray" app:tabIndicatorColor="@color/colorPrimary"
app:tabSelectedTextColor="#4a4a4a"
app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget" app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
app:tabSelectedTextColor="#4a4a4a"/> app:tabTextColor="@color/colorGray" />
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
...@@ -69,8 +70,21 @@ ...@@ -69,8 +70,21 @@
android:id="@+id/tab_viewpager_details" android:id="@+id/tab_viewpager_details"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>
<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>
</LinearLayout> </LinearLayout>
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