I used single textView for showing view like. As UpCase letter and integer take different margin or padding they aren't properly align I am trying to add
name: AnyName
age: 23
caseId: anyID
then
setColor(caseByTv, "By:	" + caseDetail.getUpdatedByUser().trim(), 0, 3, 0xFF777777);
setColor(serviceTypeTv, "Type:\t\t" + caseDetail.getType().trim(), 0, 5, 0xFF777777);
setColor(updatedDateTv, "Updated:\\u0009\\u0009" + caseDetail.getUpdatedOnDate().trim(), 0, 8, 0xFF777777);
setColor(orderDetailTv, "Order #\u0009\u0009" + caseDetail.getOrderNumber().trim(), 0, 8, 0xFF777777);
setColor(nameTv, "Name: " + caseDetail.getName().trim(), 0, 8, 0xFF777777);
setColor(emailTv, "Email: " + caseDetail.getEmail().trim(), 0, 7, 0xFF777777);
setColor(phoneNoTv, "Phone: " + caseDetail.getPhone().trim(), 0, 7, 0xFF777777);
setColor(categoryTypeTv, "Category: " + caseDetail.getCaseCategory().trim(), 0, 10, 0xFF777777);**strong text**
where setColor
public void setColor(TextView view, String fulltext, int startIndex, int endIndex, int color) {
Spannable str = new SpannableString(fulltext);
str.setSpan(new ForegroundColorSpan(mContext.getResources().getColor(R.color.guest_connection_grey)), startIndex, endIndex, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
view.setText(str);
}
I have tried multiple ways to add tab . Firstly the tab isn't working no space shown and I know I can achieve it by using two textView in a row. Can I achieve my goal in this manner.