mirror of
https://codeberg.org/gitnex/GitNex
synced 2025-02-01 11:56:55 +01:00
UI improvements (#1386)
Possibly fixes #1381 Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1386 Co-authored-by: M M Arif <mmarif@swatian.com> Co-committed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
parent
8fd3bc9d90
commit
027d9a6c80
@ -47,7 +47,7 @@ public class AssigneesActions {
|
||||
|
||||
if (issueAssigneesList.getAssignees() != null) {
|
||||
|
||||
if (issueAssigneesList.getAssignees().size() > 0) {
|
||||
if (!issueAssigneesList.getAssignees().isEmpty()) {
|
||||
|
||||
for (int i = 0;
|
||||
i < issueAssigneesList.getAssignees().size();
|
||||
@ -105,7 +105,7 @@ public class AssigneesActions {
|
||||
|
||||
assert assigneesList_ != null;
|
||||
|
||||
if (assigneesList_.size() > 0) {
|
||||
if (!assigneesList_.isEmpty()) {
|
||||
|
||||
assigneesList.addAll(assigneesList_);
|
||||
materialAlertDialogBuilder.show();
|
||||
|
@ -40,6 +40,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.amulyakhare.textdrawable.TextDrawable;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
@ -161,8 +163,8 @@ public class IssueDetailActivity extends BaseActivity
|
||||
private AttachmentsAdapter attachmentsAdapter;
|
||||
private static final List<Uri> contentUri = new ArrayList<>();
|
||||
private InputMethodManager imm;
|
||||
private float buttonAlphaStatDisabled = .5F;
|
||||
private float buttonAlphaStatEnabled = 1F;
|
||||
private final float buttonAlphaStatDisabled = .5F;
|
||||
private final float buttonAlphaStatEnabled = 1F;
|
||||
|
||||
private enum Mode {
|
||||
EDIT,
|
||||
@ -1346,6 +1348,7 @@ public class IssueDetailActivity extends BaseActivity
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.placeholder(R.drawable.loader_animated)
|
||||
.centerCrop()
|
||||
.apply(RequestOptions.bitmapTransform(new RoundedCorners(20)))
|
||||
.into(assigneesView);
|
||||
|
||||
viewBinding.frameAssignees.addView(assigneesView);
|
||||
@ -1424,7 +1427,7 @@ public class IssueDetailActivity extends BaseActivity
|
||||
.height(height)
|
||||
.endConfig()
|
||||
.buildRoundRect(
|
||||
labelName, color, AppUtil.getPixelsFromDensity(ctx, 18));
|
||||
labelName, color, AppUtil.getPixelsFromDensity(ctx, 6));
|
||||
|
||||
labelsView.setImageDrawable(drawable);
|
||||
viewBinding.frameLabels.addView(labelsView);
|
||||
|
@ -60,6 +60,7 @@ public class ProfileActivity extends BaseActivity implements BottomSheetListener
|
||||
} else {
|
||||
Toasty.warning(ctx, ctx.getResources().getString(R.string.userInvalidUserName));
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
setSupportActionBar(toolbar);
|
||||
|
@ -301,7 +301,7 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
.buildRoundRect(
|
||||
labelName,
|
||||
color,
|
||||
AppUtil.getPixelsFromDensity(context, 18));
|
||||
AppUtil.getPixelsFromDensity(context, 6));
|
||||
|
||||
labelsView.setImageDrawable(drawable);
|
||||
frameLabels.addView(labelsView);
|
||||
|
@ -527,7 +527,7 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
.buildRoundRect(
|
||||
issueComment.getLabel().getName(),
|
||||
color,
|
||||
AppUtil.getPixelsFromDensity(context, 18));
|
||||
AppUtil.getPixelsFromDensity(context, 6));
|
||||
|
||||
TextView textView = new TextView(context);
|
||||
String text;
|
||||
|
@ -276,7 +276,7 @@ public class IssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
.buildRoundRect(
|
||||
labelName,
|
||||
color,
|
||||
AppUtil.getPixelsFromDensity(context, 18));
|
||||
AppUtil.getPixelsFromDensity(context, 6));
|
||||
|
||||
labelsView.setImageDrawable(drawable);
|
||||
frameLabels.addView(labelsView);
|
||||
|
@ -269,7 +269,7 @@ public class PullRequestsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
||||
.buildRoundRect(
|
||||
labelName,
|
||||
color,
|
||||
AppUtil.getPixelsFromDensity(context, 12));
|
||||
AppUtil.getPixelsFromDensity(context, 6));
|
||||
|
||||
labelsView.setImageDrawable(drawable);
|
||||
frameLabels.addView(labelsView);
|
||||
|
@ -292,7 +292,7 @@ public class IssuesFragment extends Fragment {
|
||||
|
||||
if (response.code() == 200) {
|
||||
assert response.body() != null;
|
||||
if (response.body().size() > 0) {
|
||||
if (!response.body().isEmpty()) {
|
||||
issuesList.clear();
|
||||
issuesList.addAll(response.body());
|
||||
adapter.notifyDataChanged();
|
||||
@ -357,7 +357,7 @@ public class IssuesFragment extends Fragment {
|
||||
if (response.code() == 200) {
|
||||
List<Issue> result = response.body();
|
||||
assert result != null;
|
||||
if (result.size() > 0) {
|
||||
if (!result.isEmpty()) {
|
||||
pageSize = result.size();
|
||||
issuesList.addAll(result);
|
||||
} else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="512dp"
|
||||
android:height="512dp"
|
||||
android:width="@dimen/dimen200dp"
|
||||
android:height="@dimen/dimen200dp"
|
||||
android:viewportWidth="135.47"
|
||||
android:viewportHeight="135.47">
|
||||
<path
|
||||
|
BIN
app/src/main/res/drawable/gitnex.png
Normal file
BIN
app/src/main/res/drawable/gitnex.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -18,18 +18,29 @@
|
||||
android:gravity="center"
|
||||
android:layout_above="@id/card_view">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dimen80dp"
|
||||
android:layout_height="@dimen/dimen80dp"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:baselineAligned="false"
|
||||
app:cardCornerRadius="@dimen/dimen16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/appLogo"
|
||||
android:layout_width="@dimen/dimen72dp"
|
||||
android:layout_height="@dimen/dimen72dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:contentDescription="@string/appName"
|
||||
android:src="@mipmap/app_logo" />
|
||||
android:src="@drawable/gitnex" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/appName"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/dimen24sp"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:layout_marginTop="@dimen/dimen8dp" />
|
||||
|
@ -26,7 +26,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="@dimen/dimen36dp">
|
||||
app:cardCornerRadius="@dimen/dimen16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/appLogo"
|
||||
@ -35,7 +35,7 @@
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:contentDescription="@string/appName"
|
||||
android:src="@mipmap/app_logo" />
|
||||
android:src="@drawable/gitnex" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@ -52,8 +52,7 @@
|
||||
android:layout_marginTop="@dimen/dimen6dp"
|
||||
android:text="@string/appName"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen24sp"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="@dimen/dimen24sp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
|
@ -53,7 +53,8 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="@dimen/dimen96dp"
|
||||
android:layout_height="@dimen/dimen96dp"
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_marginBottom="@dimen/dimen8dp"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
app:cardCornerRadius="@dimen/dimen16dp">
|
||||
@ -62,6 +63,7 @@
|
||||
android:id="@+id/userAvatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/loader_animated"
|
||||
android:contentDescription="@string/generalImgContentText" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -6,21 +6,21 @@
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginEnd="@dimen/dimen6dp"
|
||||
app:cardBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardCornerRadius="@dimen/dimen10dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/symbol"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingStart="@dimen/dimen10dp"
|
||||
android:paddingTop="@dimen/dimen6dp"
|
||||
android:paddingEnd="@dimen/dimen10dp"
|
||||
android:paddingBottom="@dimen/dimen6dp"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="14sp"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
tools:text="👍"/>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -8,7 +8,7 @@
|
||||
android:layout_height="@dimen/dimen40dp"
|
||||
android:layout_marginEnd="@dimen/dimen8dp"
|
||||
app:cardBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:cardCornerRadius="@dimen/dimen20dp"
|
||||
app:cardCornerRadius="@dimen/dimen10dp"
|
||||
app:cardElevation="@dimen/dimen0dp">
|
||||
|
||||
<TextView
|
||||
|
@ -32,6 +32,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_gravity="center"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -25,6 +25,7 @@
|
||||
android:layout_width="@dimen/dimen60dp"
|
||||
android:layout_height="@dimen/dimen60dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_gravity="center"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
app:cardCornerRadius="@dimen/dimen16dp">
|
||||
|
@ -25,6 +25,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -52,6 +52,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen6dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -35,6 +35,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -53,6 +53,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp"
|
||||
|
@ -34,6 +34,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -28,7 +28,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
app:contentPaddingBottom="@dimen/dimen4dp"
|
||||
app:contentPaddingLeft="@dimen/dimen12dp"
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="@dimen/dimen24dp"
|
||||
android:layout_height="@dimen/dimen24dp"
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:layout_marginStart="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen10dp"
|
||||
android:contentDescription="@string/repoContentAvatar"
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp"
|
||||
|
@ -36,6 +36,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -35,6 +35,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
|
@ -70,6 +70,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp"
|
||||
|
@ -43,6 +43,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -25,6 +25,7 @@
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
android:layout_marginEnd="@dimen/dimen12dp"
|
||||
app:cardCornerRadius="@dimen/dimen8dp">
|
||||
|
@ -25,6 +25,7 @@
|
||||
android:layout_width="@dimen/dimen60dp"
|
||||
android:layout_height="@dimen/dimen60dp"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_gravity="center"
|
||||
app:cardElevation="@dimen/dimen0dp"
|
||||
app:cardCornerRadius="@dimen/dimen12dp">
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_avatar"
|
||||
android:layout_width="@dimen/dimen24dp"
|
||||
android:layout_height="@dimen/dimen24dp"
|
||||
android:layout_width="@dimen/dimen32dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:contentDescription="@string/wiki"
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:backgroundTint="@android:color/transparent"
|
||||
android:layout_width="@dimen/dimen60dp"
|
||||
android:layout_height="@dimen/dimen60dp"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
@ -37,6 +38,7 @@
|
||||
android:id="@+id/userAvatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/loader_animated"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
tools:srcCompat="@tools:sample/avatars"/>
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
android:id="@+id/userAccountAvatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/loader_animated"
|
||||
android:contentDescription="@string/generalImgContentText" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
Loading…
x
Reference in New Issue
Block a user