Commit 7807c7fa authored by sshivam95's avatar sshivam95

Venter: Change the styling of ComplaintDetailsFragment as per the theme....

Venter: Change the styling of ComplaintDetailsFragment as per the theme. Migrate Up Vote button. Hide the Tab layout
parent 05af78d5
...@@ -45,16 +45,18 @@ public class CommentRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVie ...@@ -45,16 +45,18 @@ public class CommentRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVie
private Context context; private Context context;
private LayoutInflater inflater; private LayoutInflater inflater;
private String sessionId, userId; private String sessionId, userId;
private Activity activity; Activity activity;
private TextView textViewCommentLabel;
private List<Venter.Comment> commentList = new ArrayList<>(); private List<Venter.Comment> commentList = new ArrayList<>();
public CommentRecyclerViewAdapter(Activity activity, Context context, String sessionId, String userId) { public CommentRecyclerViewAdapter(Activity activity, Context context, String sessionId, String userId, TextView textViewCommentLabel) {
this.context = context; this.context = context;
this.sessionId = sessionId; this.sessionId = sessionId;
this.userId = userId; this.userId = userId;
inflater = LayoutInflater.from(context); inflater = LayoutInflater.from(context);
this.activity = activity; this.activity = activity;
this.textViewCommentLabel = textViewCommentLabel;
} }
public class CommentsViewHolder extends RecyclerView.ViewHolder { public class CommentsViewHolder extends RecyclerView.ViewHolder {
......
...@@ -17,23 +17,25 @@ public class ComplaintDetailsPagerAdapter extends FragmentPagerAdapter { ...@@ -17,23 +17,25 @@ public class ComplaintDetailsPagerAdapter extends FragmentPagerAdapter {
Venter.Complaint detailedComplaint; Venter.Complaint detailedComplaint;
Context context; Context context;
String sessionid, complaintid, userid; String sessionid, complaintid, userid;
int voteCount;
public ComplaintDetailsPagerAdapter(FragmentManager fm, Venter.Complaint detailedComplaint, Context context, String sessionid, String complaintid, String userid) { public ComplaintDetailsPagerAdapter(FragmentManager fm, Venter.Complaint detailedComplaint, Context context, String sessionid, String complaintid, String userid, int voteCount) {
super(fm); super(fm);
this.context = context; this.context = context;
this.detailedComplaint = detailedComplaint; this.detailedComplaint = detailedComplaint;
this.sessionid = sessionid; this.sessionid = sessionid;
this.complaintid = complaintid; this.complaintid = complaintid;
this.userid = userid; this.userid = userid;
this.voteCount = voteCount;
} }
@Override @Override
public Fragment getItem(int position) { public Fragment getItem(int position) {
switch (position) { switch (position) {
case 0: case 0:
return DetailedComplaintFragment.getInstance(sessionid, complaintid, userid); return DetailedComplaintFragment.getInstance(sessionid, complaintid, userid, voteCount);
default: default:
return DetailedComplaintFragment.getInstance(sessionid, complaintid, userid); return DetailedComplaintFragment.getInstance(sessionid, complaintid, userid, voteCount);
} }
} }
......
...@@ -36,14 +36,13 @@ import retrofit2.Response; ...@@ -36,14 +36,13 @@ import retrofit2.Response;
public class ComplaintDetailsFragment extends Fragment { public class ComplaintDetailsFragment extends Fragment {
private static final String TAG = ComplaintDetailsFragment.class.getSimpleName(); private static final String TAG = ComplaintDetailsFragment.class.getSimpleName();
Button buttonVoteUp;
TabLayout slidingTabLayout; TabLayout slidingTabLayout;
ViewPager viewPager; ViewPager viewPager;
View mview; View mview;
private String complaintId, sessionID, userId; private String complaintId, sessionID, userId;
private ComplaintDetailsPagerAdapter complaintDetailsPagerAdapter; private ComplaintDetailsPagerAdapter complaintDetailsPagerAdapter;
private int voteCount;
CircleIndicator circleIndicator; CircleIndicator circleIndicator;
private int voteCount = 0;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
...@@ -56,7 +55,6 @@ public class ComplaintDetailsFragment extends Fragment { ...@@ -56,7 +55,6 @@ public class ComplaintDetailsFragment extends Fragment {
getResources().getDisplayMetrics().heightPixels / 2); getResources().getDisplayMetrics().heightPixels / 2);
imageViewHolder.setLayoutParams(layoutParams); imageViewHolder.setLayoutParams(layoutParams);
buttonVoteUp = view.findViewById(R.id.buttonVoteUp);
slidingTabLayout = view.findViewById(R.id.sliding_tab_layout); slidingTabLayout = view.findViewById(R.id.sliding_tab_layout);
circleIndicator = view.findViewById(R.id.indicator); circleIndicator = view.findViewById(R.id.indicator);
this.mview = view; this.mview = view;
...@@ -67,13 +65,6 @@ public class ComplaintDetailsFragment extends Fragment { ...@@ -67,13 +65,6 @@ public class ComplaintDetailsFragment extends Fragment {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
buttonVoteUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
upVote();
}
});
Bundle bundle = getArguments(); Bundle bundle = getArguments();
complaintId = bundle.getString("id"); complaintId = bundle.getString("id");
sessionID = bundle.getString("sessionId"); sessionID = bundle.getString("sessionId");
...@@ -85,30 +76,6 @@ public class ComplaintDetailsFragment extends Fragment { ...@@ -85,30 +76,6 @@ public class ComplaintDetailsFragment extends Fragment {
} }
} }
private void upVote() {
if (voteCount == 0) {
RetrofitInterface retrofitInterface = Utils.getRetrofitInterface();
retrofitInterface.upVote("sessionid=" + sessionID, complaintId).enqueue(new Callback<Venter.Complaint>() {
@Override
public void onResponse(Call<Venter.Complaint> call, Response<Venter.Complaint> response) {
if (response.isSuccessful()) {
Venter.Complaint complaint = response.body();
initTabViews(complaint);
Toast.makeText(getActivity().getApplicationContext(), "You have Up Voted this complaint", Toast.LENGTH_SHORT).show();
voteCount++;
}
}
@Override
public void onFailure(Call<Venter.Complaint> call, Throwable t) {
Log.i(TAG, "failure in up vote: " + t.toString());
}
});
} else {
Toast.makeText(getActivity().getApplicationContext(), "You have already UpVoted this complaint", Toast.LENGTH_SHORT).show();
}
}
private void callServerToGetDetailedComplaint() { private void callServerToGetDetailedComplaint() {
RetrofitInterface retrofitInterface = Utils.getRetrofitInterface(); RetrofitInterface retrofitInterface = Utils.getRetrofitInterface();
...@@ -157,18 +124,13 @@ public class ComplaintDetailsFragment extends Fragment { ...@@ -157,18 +124,13 @@ public class ComplaintDetailsFragment extends Fragment {
} }
private void initTabViews(final Venter.Complaint detailedComplaint) { private void initTabViews(final Venter.Complaint detailedComplaint) {
try {
buttonVoteUp.setText("UpVote");
} catch (Exception e) {
e.printStackTrace();
}
try { try {
if (detailedComplaint != null) { if (detailedComplaint != null) {
viewPager = mview.findViewById(R.id.tab_viewpager_details); viewPager = mview.findViewById(R.id.tab_viewpager_details);
if (viewPager != null) { if (viewPager != null) {
Log.i(TAG, "viewPager != null"); Log.i(TAG, "viewPager != null");
complaintDetailsPagerAdapter = new ComplaintDetailsPagerAdapter(getChildFragmentManager(), detailedComplaint, getContext(), sessionID, complaintId, userId); complaintDetailsPagerAdapter = new ComplaintDetailsPagerAdapter(getChildFragmentManager(), detailedComplaint, getContext(), sessionID, complaintId, userId, voteCount);
viewPager.setAdapter(complaintDetailsPagerAdapter); viewPager.setAdapter(complaintDetailsPagerAdapter);
slidingTabLayout.setupWithViewPager(viewPager); slidingTabLayout.setupWithViewPager(viewPager);
...@@ -189,8 +151,9 @@ public class ComplaintDetailsFragment extends Fragment { ...@@ -189,8 +151,9 @@ public class ComplaintDetailsFragment extends Fragment {
int mActionBarSize = (int) styledAttributes.getDimension(0, 0); int mActionBarSize = (int) styledAttributes.getDimension(0, 0);
styledAttributes.recycle(); styledAttributes.recycle();
// 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,
mActionBarSize); 0);
slidingTabLayout.setLayoutParams(layoutParams); slidingTabLayout.setLayoutParams(layoutParams);
slidingTabLayout.setTabMode(TabLayout.MODE_FIXED); slidingTabLayout.setTabMode(TabLayout.MODE_FIXED);
...@@ -223,17 +186,8 @@ public class ComplaintDetailsFragment extends Fragment { ...@@ -223,17 +186,8 @@ public class ComplaintDetailsFragment extends Fragment {
"android:switcher:" + R.id.tab_viewpager_details + ":0" "android:switcher:" + R.id.tab_viewpager_details + ":0"
); );
Log.i(TAG, "detailedComplaintFragment: " + detailedComplaint); if (detailedComplaintFragment != null)
/*For Relevant Complaint Fragment
* RelevantComplaintFragment relevantComplaintFragment = (RelevantComplaintFragment) getSupportFragmentManager().findFragmentByTag(
"android:switcher:" + R.id.tab_viewpager + ":1");
*/
if (detailedComplaintFragment != null) {
Log.i(TAG, "detailedComplinatFragment != null");
detailedComplaintFragment.setDetailedComplaint(detailedComplaint); detailedComplaintFragment.setDetailedComplaint(detailedComplaint);
}
} }
} }
} catch (Exception e) { } catch (Exception e) {
......
...@@ -10,6 +10,7 @@ import android.util.Log; ...@@ -10,6 +10,7 @@ import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
...@@ -65,16 +66,19 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -65,16 +66,19 @@ public class DetailedComplaintFragment extends Fragment {
private ImageButton imageButtonSend; private ImageButton imageButtonSend;
private CircleImageView circleImageViewCommentUserImage; private CircleImageView circleImageViewCommentUserImage;
private RecyclerView recyclerViewComments; private RecyclerView recyclerViewComments;
private Button buttonVoteUp;
private static String sId, cId, uId; private static String sId, cId, uId;
private CommentRecyclerViewAdapter commentListAdapter; private CommentRecyclerViewAdapter commentListAdapter;
private List<Venter.Comment> commentList; private List<Venter.Comment> commentList;
private static int voteCount;
public static DetailedComplaintFragment getInstance(String sessionid, String complaintid, String userid) { public static DetailedComplaintFragment getInstance(String sessionid, String complaintid, String userid, int vCount) {
sId = sessionid; sId = sessionid;
cId = complaintid; cId = complaintid;
uId = userid; uId = userid;
voteCount = vCount;
return new DetailedComplaintFragment(); return new DetailedComplaintFragment();
} }
...@@ -93,6 +97,7 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -93,6 +97,7 @@ public class DetailedComplaintFragment extends Fragment {
imageButtonSend = view.findViewById(R.id.send_comment); imageButtonSend = view.findViewById(R.id.send_comment);
circleImageViewCommentUserImage = view.findViewById(R.id.comment_user_image); circleImageViewCommentUserImage = view.findViewById(R.id.comment_user_image);
Picasso.get().load(R.drawable.baseline_account_circle_black_36).into(circleImageViewCommentUserImage); Picasso.get().load(R.drawable.baseline_account_circle_black_36).into(circleImageViewCommentUserImage);
buttonVoteUp = view.findViewById(R.id.buttonVoteUp);
} }
...@@ -105,7 +110,7 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -105,7 +110,7 @@ public class DetailedComplaintFragment extends Fragment {
commentList = new ArrayList<>(); commentList = new ArrayList<>();
initialiseViews(view); initialiseViews(view);
commentListAdapter = new CommentRecyclerViewAdapter(getActivity(), getContext(), sId, uId); commentListAdapter = new CommentRecyclerViewAdapter(getActivity(), getContext(), sId, uId, textViewCommentLabel);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext()); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
recyclerViewComments.setLayoutManager(linearLayoutManager); recyclerViewComments.setLayoutManager(linearLayoutManager);
recyclerViewComments.setHasFixedSize(true); recyclerViewComments.setHasFixedSize(true);
...@@ -131,6 +136,14 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -131,6 +136,14 @@ public class DetailedComplaintFragment extends Fragment {
} }
} }
}); });
buttonVoteUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
upVote();
}
});
return view; return view;
} }
...@@ -160,6 +173,7 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -160,6 +173,7 @@ public class DetailedComplaintFragment extends Fragment {
commentListAdapter.setCommentList(commentList); commentListAdapter.setCommentList(commentList);
commentListAdapter.notifyItemInserted(commentList.indexOf(newComment)); commentListAdapter.notifyItemInserted(commentList.indexOf(newComment));
commentListAdapter.notifyItemRangeChanged(0, commentListAdapter.getItemCount()); commentListAdapter.notifyItemRangeChanged(0, commentListAdapter.getItemCount());
textViewCommentLabel.setText("Comments (" + commentList.size() + ")");
recyclerViewComments.post(new Runnable() { recyclerViewComments.post(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -175,6 +189,7 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -175,6 +189,7 @@ public class DetailedComplaintFragment extends Fragment {
private void populateViews() { private void populateViews() {
try { try {
buttonVoteUp.setText("UpVote");
textViewUserName.setText(detailedComplaint.getComplaintCreatedBy().getUserName()); textViewUserName.setText(detailedComplaint.getComplaintCreatedBy().getUserName());
String time = DateTimeUtil.getDate(detailedComplaint.getComplaintReportDate().toString()); String time = DateTimeUtil.getDate(detailedComplaint.getComplaintReportDate().toString());
Log.i(TAG, " time: " + time); Log.i(TAG, " time: " + time);
...@@ -192,8 +207,8 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -192,8 +207,8 @@ public class DetailedComplaintFragment extends Fragment {
textViewStatus.setBackgroundTintList(ColorStateList.valueOf(getContext().getResources().getColor(R.color.colorGreen))); textViewStatus.setBackgroundTintList(ColorStateList.valueOf(getContext().getResources().getColor(R.color.colorGreen)));
textViewStatus.setTextColor(getContext().getResources().getColor(R.color.secondaryTextColor)); textViewStatus.setTextColor(getContext().getResources().getColor(R.color.secondaryTextColor));
} }
textViewCommentLabel.setText("COMMENTS"); textViewCommentLabel.setText("Comments (" + detailedComplaint.getComment().size() + ")");
textViewVoteUpLabel.setText("UP VOTES"); textViewVoteUpLabel.setText("Up Votes (" + detailedComplaint.getUsersUpVoted().size() + ")");
addVotesToView(detailedComplaint); addVotesToView(detailedComplaint);
addCommentsToView(detailedComplaint); addCommentsToView(detailedComplaint);
} catch (Exception e) { } catch (Exception e) {
...@@ -232,6 +247,30 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -232,6 +247,30 @@ public class DetailedComplaintFragment extends Fragment {
commentListAdapter.notifyDataSetChanged(); commentListAdapter.notifyDataSetChanged();
} }
private void upVote() {
if (voteCount == 0) {
RetrofitInterface retrofitInterface = Utils.getRetrofitInterface();
retrofitInterface.upVote("sessionid=" + sId, cId).enqueue(new Callback<Venter.Complaint>() {
@Override
public void onResponse(Call<Venter.Complaint> call, Response<Venter.Complaint> response) {
if (response.isSuccessful()) {
Venter.Complaint complaint = response.body();
addVotesToView(complaint);
Toast.makeText(getActivity().getApplicationContext(), "You have Up Voted this complaint", Toast.LENGTH_SHORT).show();
voteCount++;
}
}
@Override
public void onFailure(Call<Venter.Complaint> call, Throwable t) {
Log.i(TAG, "failure in up vote: " + t.toString());
}
});
} else {
Toast.makeText(getActivity().getApplicationContext(), "You have already UpVoted this complaint", Toast.LENGTH_SHORT).show();
}
}
public void addVotesToView(Venter.Complaint detailedComplaint) { public void addVotesToView(Venter.Complaint detailedComplaint) {
layoutVotes.removeAllViews(); layoutVotes.removeAllViews();
for (User users : detailedComplaint.getUsersUpVoted()) { for (User users : detailedComplaint.getUsersUpVoted()) {
...@@ -246,6 +285,7 @@ public class DetailedComplaintFragment extends Fragment { ...@@ -246,6 +285,7 @@ public class DetailedComplaintFragment extends Fragment {
textViewName.setText(users.getUserName()); textViewName.setText(users.getUserName());
layoutVotes.addView(voteView); layoutVotes.addView(voteView);
} }
textViewVoteUpLabel.setText("Up Votes (" + detailedComplaint.getUsersUpVoted().size() + ")");
} }
@Override @Override
......
...@@ -239,6 +239,7 @@ public class FileComplaintFragment extends Fragment { ...@@ -239,6 +239,7 @@ public class FileComplaintFragment extends Fragment {
} else { } else {
buttonSubmit.setVisibility(View.INVISIBLE); buttonSubmit.setVisibility(View.INVISIBLE);
buttonSubmit.setVisibility(View.GONE); buttonSubmit.setVisibility(View.GONE);
linearLayoutAnalyse.setPadding(0, 0, 0, 0);
} }
} }
}); });
......
...@@ -71,25 +71,6 @@ ...@@ -71,25 +71,6 @@
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"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp"
android:weightSum="2"
android:layout_gravity="bottom">
<Button
android:id="@+id/buttonVoteUp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:textColor="@color/secondaryTextColor"
android:background="@color/colorSecondary"
android:text="Upvote"
android:layout_weight="2"/>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>
</LinearLayout> </LinearLayout>
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="10dp" android:paddingTop="10dp">
android:paddingBottom="60dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -42,11 +41,11 @@ ...@@ -42,11 +41,11 @@
android:id="@+id/textViewStatus" android:id="@+id/textViewStatus"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/customborder"
android:paddingHorizontal="10dp" android:paddingHorizontal="10dp"
android:text="STATUS" android:text="STATUS"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" android:textStyle="bold" />
android:background="@drawable/customborder"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -95,16 +94,14 @@ ...@@ -95,16 +94,14 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/darker_gray"
android:padding="10dp"> android:padding="10dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="TAGS" android:text="Tags"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="16sp" android:textSize="16sp" />
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
...@@ -143,17 +140,14 @@ ...@@ -143,17 +140,14 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/darker_gray"
android:padding="10dp"> android:padding="10dp">
<TextView <TextView
android:id="@+id/comment_label" android:id="@+id/comment_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="COMMENTS"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="16sp" android:textSize="16sp" />
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
...@@ -174,26 +168,42 @@ ...@@ -174,26 +168,42 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal"> android:orientation="horizontal"
android:paddingHorizontal="10dp">
<de.hdodenhof.circleimageview.CircleImageView <de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/comment_user_image" android:id="@+id/comment_user_image"
android:layout_width="60dp" android:layout_width="30dp"
android:layout_height="60dp" android:layout_height="30dp"
android:layout_gravity="center" android:layout_gravity="center"
android:scaleType="centerCrop" /> android:scaleType="centerCrop" />
<EditText <android.support.design.widget.TextInputLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/edit_comment" android:layout_width="0dp"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="9" android:layout_weight="9"
android:hint="@string/enter_comment" /> android:paddingHorizontal="10dp"
app:hintTextAppearance="@style/edit_text_hint_apperarance">
<EditText
android:id="@+id/edit_comment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top"
android:hint="Enter Comment"
android:inputType="textMultiLine"
android:textColor="@android:color/black"
android:textColorHint="#4a4a4a"
android:textSize="14sp" />
</android.support.design.widget.TextInputLayout>
<ImageButton <ImageButton
android:id="@+id/send_comment" android:id="@+id/send_comment"
android:layout_width="wrap_content" style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
app:srcCompat="@android:drawable/ic_menu_send" /> app:srcCompat="@android:drawable/ic_menu_send" />
</LinearLayout> </LinearLayout>
...@@ -209,17 +219,14 @@ ...@@ -209,17 +219,14 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/darker_gray"
android:padding="10dp"> android:padding="10dp">
<TextView <TextView
android:id="@+id/up_vote_label" android:id="@+id/up_vote_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="VoteUp"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="16sp" android:textSize="16sp" />
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
...@@ -233,9 +240,25 @@ ...@@ -233,9 +240,25 @@
</LinearLayout> </LinearLayout>
<View <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="20dp" /> android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:padding="10dp"
android:weightSum="2">
<Button
android:id="@+id/buttonVoteUp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_weight="2"
android:background="@color/colorSecondary"
android:text="Upvote"
android:textColor="@color/secondaryTextColor" />
</LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -144,6 +144,7 @@ ...@@ -144,6 +144,7 @@
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textColorHint="#4a4a4a" android:textColorHint="#4a4a4a"
android:textSize="14sp" /> android:textSize="14sp" />
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
</FrameLayout> </FrameLayout>
......
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