Commit 098e3d2c authored by sshivam95's avatar sshivam95

Initiate development of imageView zoom

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