Commit c05d4184 authored by preetamozarde3's avatar preetamozarde3 Committed by Varun Patil

feat(venter): Allow editing comments (#276)

* Add feature for editing comments

* Use a vector asset for the arrow

* Add back arrow vector asset to drawable
parent f29295e9
......@@ -106,7 +106,7 @@ public class ComplaintDetailsFragment extends Fragment {
initialiseViews(view);
upVotesList = new ArrayList<>();
commentListAdapter = new CommentsAdapter(getContext(), uId, this);
commentListAdapter = new CommentsAdapter(getActivity(), uId, this);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
upVotesAdapter = new UpVotesAdapter(this, getContext());
recyclerViewComments.setLayoutManager(linearLayoutManager);
......
<vector android:height="18dp" android:viewportHeight="24.0"
android:viewportWidth="24.0" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>
......@@ -56,6 +56,15 @@
</LinearLayout>
<ImageButton
android:id="@+id/back_button"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
style="@style/Widget.AppCompat.Button.Borderless"
android:src="@drawable/ic_arrow_back_black_24dp"
android:visibility="gone"/>
</LinearLayout>
<TextView
......@@ -70,6 +79,28 @@
android:textColor="@android:color/black"
android:textSize="16sp" />
<EditText
android:id="@+id/editTextComment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:scrollHorizontally="true"
android:text="Comment"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textColor="@android:color/black"
android:textSize="16sp"
android:visibility="gone"/>
<ImageButton
android:id="@+id/send_comment"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:src="@drawable/baseline_send_black_18"
android:visibility="gone"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/edit_comment_option"
android:title="Edit"/>
<item
android:id="@+id/copy_comment_option"
android:title="Copy"/>
......
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