Layout and UI improvements (#738)

Layout and UI improvements

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/738
This commit is contained in:
M M Arif 2020-10-29 13:53:03 +01:00
parent 3c7b505b5b
commit 6a9144435e
9 changed files with 41 additions and 32 deletions

View File

@ -89,8 +89,6 @@ public class AssigneesActions {
if(assigneesList_.size() > 0) {
dialogAssignees.show();
assigneesList.add(new Collaborators(tinyDB.getString("userFullname"), tinyDB.getString("loginUid"), tinyDB.getString("userAvatar")));
assigneesList.addAll(assigneesList_);
}

View File

@ -84,8 +84,6 @@ public class LabelsActions {
if(labelsList_.size() > 0) {
dialogLabels.show();
labelsList.addAll(labelsList_);
}
else {

View File

@ -185,6 +185,7 @@ public class CreateIssueActivity extends BaseActivity implements View.OnClickLis
dialogAssignees.dismiss()
);
dialogAssignees.show();
AssigneesActions.getRepositoryAssignees(ctx, instanceUrl, instanceToken, repoOwner, repoName, assigneesList, dialogAssignees, assigneesAdapter, assigneesBinding);
}
@ -206,6 +207,7 @@ public class CreateIssueActivity extends BaseActivity implements View.OnClickLis
dialogLabels.dismiss()
);
dialogLabels.show();
LabelsActions.getRepositoryLabels(ctx, instanceUrl, instanceToken, repoOwner, repoName, labelsList, dialogLabels, labelsAdapter, labelsBinding);
}

View File

@ -243,6 +243,7 @@ public class CreatePullRequestActivity extends BaseActivity implements LabelsLis
dialogLabels.dismiss()
);
dialogLabels.show();
LabelsActions.getRepositoryLabels(ctx, instanceUrl, instanceToken, repoOwner, repoName, labelsList, dialogLabels, labelsAdapter, labelsBinding);
}

View File

@ -293,6 +293,7 @@ public class IssueDetailActivity extends BaseActivity implements LabelsListAdapt
}
});
dialogAssignees.show();
AssigneesActions.getRepositoryAssignees(ctx, instanceUrl, instanceToken, repoOwner, repoName, assigneesList, dialogAssignees, assigneesAdapter, assigneesBinding);
}
@ -329,6 +330,7 @@ public class IssueDetailActivity extends BaseActivity implements LabelsListAdapt
}
});
dialogLabels.show();
LabelsActions.getRepositoryLabels(ctx, instanceUrl, instanceToken, repoOwner, repoName, labelsList, dialogLabels, labelsAdapter, labelsBinding);
}

View File

@ -17,6 +17,7 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import org.mian.gitnex.R;
import org.mian.gitnex.adapters.ExploreRepositoriesAdapter;
@ -96,6 +97,10 @@ public class ExploreRepositoriesFragment extends Fragment {
viewBinding.recyclerViewReposSearch.setLayoutManager(linearLayoutManager);
viewBinding.recyclerViewReposSearch.setAdapter(adapter);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(viewBinding.recyclerViewReposSearch.getContext(),
DividerItemDecoration.VERTICAL);
viewBinding.recyclerViewReposSearch.addItemDecoration(dividerItemDecoration);
viewBinding.searchKeyword.setOnEditorActionListener((v1, actionId, event) -> {
if(actionId == EditorInfo.IME_ACTION_SEND) {

View File

@ -22,38 +22,25 @@
android:textColor="?attr/primaryTextColor"
android:textSize="18sp" />
<TextView
android:id="@+id/commitCommitterVw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
<LinearLayout
android:id="@+id/frameViewnDate"
android:id="@+id/frameCommitterAndDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/frameViewInBrowser"
android:id="@+id/frameCommitter"
android:layout_width="0dp"
android:layout_weight=".25"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/commitHtmlUrlVw"
<TextView
android:id="@+id/commitCommitterVw"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:text="@string/viewInBrowser"
android:layout_marginTop="15dp"
android:textColor="@color/btnTextColor"
android:textSize="14sp"
android:minHeight="0dp"
android:minWidth="0dp"
android:padding="8dp" />
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />
</LinearLayout>
@ -64,8 +51,24 @@
android:layout_height="wrap_content"
android:gravity="end"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp"
android:layout_marginTop="20dp"/>
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/frameViewCommits"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/commitHtmlUrlVw"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:text="@string/viewInBrowser"
android:layout_marginTop="15dp"
android:textColor="@color/btnTextColor"
android:textSize="14sp" />
</LinearLayout>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/relativeLayoutFrameIssuesList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -80,7 +80,7 @@
android:layout_height="wrap_content"
android:gravity="start"
android:drawablePadding="5dp"
android:drawableStart="@drawable/ic_comment"
app:drawableStartCompat="@drawable/ic_comment"
android:layout_gravity="center_horizontal"
android:textColor="?attr/primaryTextColor"
android:textSize="14sp" />

View File

@ -143,7 +143,7 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_issue"
app:drawableStartCompat="@drawable/ic_issue"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:text="@string/repoWatchers"
@ -156,7 +156,7 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_star_unfilled"
app:drawableStartCompat="@drawable/ic_star_unfilled"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:text="@string/repoStars"
@ -169,7 +169,7 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_weight=".25"
android:drawableStart="@drawable/ic_fork"
app:drawableStartCompat="@drawable/ic_fork"
android:drawablePadding="6dp"
android:gravity="center_vertical"
android:text="@string/repoWatchers"