Replace textview with button for view commits in branches (#437)

Replace textview with button for view commits in branches

Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/437
Reviewed-by: 6543 <6543@noreply.gitea.io>
This commit is contained in:
M M Arif 2020-04-22 10:12:56 +00:00 committed by 6543
parent f39357f596
commit dd1fce892a
2 changed files with 11 additions and 6 deletions

View File

@ -5,6 +5,7 @@ import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.CommitsActivity;
@ -34,7 +35,7 @@ public class BranchesAdapter extends RecyclerView.Adapter<BranchesAdapter.Branch
branchNameTv = itemView.findViewById(R.id.branchName);
branchCommitAuthor = itemView.findViewById(R.id.branchCommitAuthor);
TextView branchCommitHash = itemView.findViewById(R.id.branchCommitHash);
Button branchCommitHash = itemView.findViewById(R.id.branchCommitHash);
branchCommitHash.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {

View File

@ -31,14 +31,18 @@
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
<TextView
<Button
android:id="@+id/branchCommitHash"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/lightBlue"
android:text="@string/viewCommits"
android:textSize="14sp" />
android:layout_marginTop="15dp"
android:textColor="@color/btnTextColor"
android:textSize="14sp"
android:minHeight="0dp"
android:minWidth="0dp"
android:padding="8dp"
android:background="@drawable/shape_buttons" />
</LinearLayout>