this commit fixes #187 by setting monospace to the diff text.

This commit is contained in:
Kosh 2017-03-24 19:26:50 +08:00
parent afc00cefc5
commit 974a9dedbc

View File

@ -1,6 +1,7 @@
package com.fastaccess.ui.adapter.viewholder;
import android.graphics.Color;
import android.graphics.Typeface;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.SpannableString;
@ -27,8 +28,6 @@ import butterknife.BindView;
*/
public class CommitFilesViewHolder extends BaseViewHolder<CommitFileModel> {
@BindView(R.id.name) FontTextView name;
@BindView(R.id.patch) FontTextView patch;
@BindView(R.id.changes) FontTextView changes;
@ -94,6 +93,7 @@ public class CommitFilesViewHolder extends BaseViewHolder<CommitFileModel> {
.append(statusText)
.append("\n")
.bold(String.valueOf(commit.getStatus())));
onToggle(onTogglePatch.isCollapsed(getAdapterPosition()));
}
@ -124,6 +124,7 @@ public class CommitFilesViewHolder extends BaseViewHolder<CommitFileModel> {
}
builder.append(spannableDiff);
}
patch.setTypeface(Typeface.MONOSPACE, Typeface.NORMAL);
patch.setText(builder);
}
}