Use FAB buttons for org repo, label, team creation

This commit is contained in:
M M Arif
2023-03-12 15:38:14 +05:00
parent 6037c1dde0
commit e2be2ec018
13 changed files with 198 additions and 248 deletions

View File

@@ -174,6 +174,7 @@ public class CreateRepoActivity extends BaseActivity {
if (response.code() == 201) {
MainActivity.reloadRepos = true;
OrganizationDetailActivity.updateOrgFABActions = true;
Toasty.success(ctx, getString(R.string.repoCreated));
enableProcessButton();
finish();

View File

@@ -1,6 +1,5 @@
package org.mian.gitnex.activities;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.Menu;
@@ -38,6 +37,7 @@ import retrofit2.Response;
*/
public class OrganizationDetailActivity extends BaseActivity implements BottomSheetListener {
public static boolean updateOrgFABActions = false;
public OrganizationPermissions permissions;
private String orgName;
private boolean isMember = false;
@@ -175,8 +175,7 @@ public class OrganizationDetailActivity extends BaseActivity implements BottomSh
return true;
} else if (id == R.id.repoMenu) {
BottomSheetOrganizationFragment bottomSheet =
new BottomSheetOrganizationFragment(permissions);
BottomSheetOrganizationFragment bottomSheet = new BottomSheetOrganizationFragment();
bottomSheet.show(getSupportFragmentManager(), "orgBottomSheet");
return true;
} else {
@@ -195,25 +194,6 @@ public class OrganizationDetailActivity extends BaseActivity implements BottomSh
url = url + getIntent().getStringExtra("orgName");
switch (text) {
case "repository":
Intent intentRepo = new Intent(this, CreateRepoActivity.class);
intentRepo.putExtra("organizationAction", true);
intentRepo.putExtra("orgName", getIntent().getStringExtra("orgName"));
intentRepo.putExtras(getIntent().getExtras());
startActivity(intentRepo);
break;
case "label":
Intent intent = new Intent(ctx, CreateLabelActivity.class);
intent.putExtra("orgName", getIntent().getStringExtra("orgName"));
intent.putExtra("type", "org");
ctx.startActivity(intent);
break;
case "team":
Intent intentTeam =
new Intent(OrganizationDetailActivity.this, CreateTeamByOrgActivity.class);
intentTeam.putExtras(getIntent().getExtras());
startActivity(intentTeam);
break;
case "copyOrgUrl":
AppUtil.copyToClipboard(this, url, ctx.getString(R.string.copyIssueUrlToastMsg));
break;
@@ -242,9 +222,9 @@ public class OrganizationDetailActivity extends BaseActivity implements BottomSh
case 0: // info
return OrganizationInfoFragment.newInstance(orgName);
case 1: // repos
return OrganizationRepositoriesFragment.newInstance(orgName);
return OrganizationRepositoriesFragment.newInstance(orgName, permissions);
case 2: // labels
return OrganizationLabelsFragment.newInstance(orgName);
return OrganizationLabelsFragment.newInstance(orgName, permissions);
case 3: // teams / members
if (isMember) {
return OrganizationTeamsFragment.newInstance(orgName, permissions);

View File

@@ -8,7 +8,6 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.databinding.BottomSheetOrganizationBinding;
import org.mian.gitnex.structs.BottomSheetListener;
@@ -17,13 +16,8 @@ import org.mian.gitnex.structs.BottomSheetListener;
*/
public class BottomSheetOrganizationFragment extends BottomSheetDialogFragment {
private final OrganizationPermissions permissions;
private BottomSheetListener bmListener;
public BottomSheetOrganizationFragment(OrganizationPermissions org) {
permissions = org;
}
@Nullable @Override
public View onCreateView(
@NonNull LayoutInflater inflater,
@@ -33,39 +27,6 @@ public class BottomSheetOrganizationFragment extends BottomSheetDialogFragment {
BottomSheetOrganizationBinding bottomSheetOrganizationBinding =
BottomSheetOrganizationBinding.inflate(inflater, container, false);
if (permissions != null) {
if (!permissions.isCanCreateRepository()) {
bottomSheetOrganizationBinding.createRepository.setVisibility(View.GONE);
}
if (!permissions.isIsOwner()) {
bottomSheetOrganizationBinding.createLabel.setVisibility(View.GONE);
bottomSheetOrganizationBinding.createTeam.setVisibility(View.GONE);
}
if (!permissions.isCanCreateRepository() || !permissions.isIsOwner()) {
bottomSheetOrganizationBinding.organizationHeadFrame.setVisibility(View.GONE);
bottomSheetOrganizationBinding.orgCreateSection.setVisibility(View.GONE);
bottomSheetOrganizationBinding.orgDivider.setVisibility(View.GONE);
}
}
bottomSheetOrganizationBinding.createTeam.setOnClickListener(
v1 -> {
bmListener.onButtonClicked("team");
dismiss();
});
bottomSheetOrganizationBinding.createLabel.setOnClickListener(
v1 -> {
bmListener.onButtonClicked("label");
dismiss();
});
bottomSheetOrganizationBinding.createRepository.setOnClickListener(
v12 -> {
bmListener.onButtonClicked("repository");
dismiss();
});
bottomSheetOrganizationBinding.copyOrgUrl.setOnClickListener(
v1 -> {
bmListener.onButtonClicked("copyOrgUrl");

View File

@@ -1,5 +1,6 @@
package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -14,6 +15,7 @@ import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.activities.CreateLabelActivity;
import org.mian.gitnex.adapters.LabelsAdapter;
import org.mian.gitnex.databinding.FragmentLabelsBinding;
@@ -24,21 +26,26 @@ import org.mian.gitnex.viewmodels.OrganizationLabelsViewModel;
*/
public class OrganizationLabelsFragment extends Fragment {
private final OrganizationPermissions permissions;
private OrganizationLabelsViewModel organizationLabelsViewModel;
private ProgressBar mProgressBar;
private RecyclerView mRecyclerView;
private LabelsAdapter adapter;
private TextView noData;
private static final String repoOwnerF = "param1";
private static final String getOrgName = null;
private String repoOwner;
private final String type = "org";
private String repoOwner;
public OrganizationLabelsFragment(OrganizationPermissions permissions) {
this.permissions = permissions;
}
public static OrganizationLabelsFragment newInstance(String param1) {
public static OrganizationLabelsFragment newInstance(
String repoOwner, OrganizationPermissions permissions) {
OrganizationLabelsFragment fragment = new OrganizationLabelsFragment();
OrganizationLabelsFragment fragment = new OrganizationLabelsFragment(permissions);
Bundle args = new Bundle();
args.putString(repoOwnerF, param1);
args.putString(getOrgName, repoOwner);
fragment.setArguments(args);
return fragment;
}
@@ -50,7 +57,7 @@ public class OrganizationLabelsFragment extends Fragment {
if (getArguments() != null) {
repoOwner = getArguments().getString(repoOwnerF);
repoOwner = getArguments().getString(getOrgName);
}
}
@@ -86,6 +93,18 @@ public class OrganizationLabelsFragment extends Fragment {
fetchDataAsync(repoOwner);
if (!permissions.isIsOwner()) {
fragmentLabelsBinding.createLabel.setVisibility(View.GONE);
}
fragmentLabelsBinding.createLabel.setOnClickListener(
v1 -> {
Intent intent = new Intent(getContext(), CreateLabelActivity.class);
intent.putExtra("orgName", repoOwner);
intent.putExtra("type", "org");
startActivity(intent);
});
return fragmentLabelsBinding.getRoot();
}

View File

@@ -1,5 +1,6 @@
package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -14,8 +15,10 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.MainActivity;
import org.mian.gitnex.activities.CreateRepoActivity;
import org.mian.gitnex.activities.OrganizationDetailActivity;
import org.mian.gitnex.adapters.ReposListAdapter;
import org.mian.gitnex.databinding.FragmentRepositoriesBinding;
import org.mian.gitnex.helpers.Constants;
@@ -26,6 +29,7 @@ import org.mian.gitnex.viewmodels.RepositoriesViewModel;
*/
public class OrganizationRepositoriesFragment extends Fragment {
private final OrganizationPermissions permissions;
private RepositoriesViewModel repositoriesViewModel;
private FragmentRepositoriesBinding fragmentRepositoriesBinding;
private ReposListAdapter adapter;
@@ -34,10 +38,14 @@ public class OrganizationRepositoriesFragment extends Fragment {
private static final String getOrgName = null;
private String orgName;
public OrganizationRepositoriesFragment() {}
public OrganizationRepositoriesFragment(OrganizationPermissions permissions) {
this.permissions = permissions;
}
public static OrganizationRepositoriesFragment newInstance(String orgName) {
OrganizationRepositoriesFragment fragment = new OrganizationRepositoriesFragment();
public static OrganizationRepositoriesFragment newInstance(
String orgName, OrganizationPermissions permissions) {
OrganizationRepositoriesFragment fragment =
new OrganizationRepositoriesFragment(permissions);
Bundle args = new Bundle();
args.putString(getOrgName, orgName);
fragment.setArguments(args);
@@ -63,8 +71,6 @@ public class OrganizationRepositoriesFragment extends Fragment {
resultLimit = Constants.getCurrentResultLimit(getContext());
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
fragmentRepositoriesBinding.recyclerView.setHasFixedSize(true);
fragmentRepositoriesBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext()));
@@ -86,9 +92,23 @@ public class OrganizationRepositoriesFragment extends Fragment {
page = 1;
fetchDataAsync();
if (permissions != null) {
if (!permissions.isCanCreateRepository()) {
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
}
}
fragmentRepositoriesBinding.addNewRepo.setOnClickListener(
v12 -> {
Intent intentRepo = new Intent(getContext(), CreateRepoActivity.class);
intentRepo.putExtra("organizationAction", true);
intentRepo.putExtra("orgName", orgName);
intentRepo.putExtras(requireActivity().getIntent().getExtras());
startActivity(intentRepo);
});
return fragmentRepositoriesBinding.getRoot();
}
;
private void fetchDataAsync() {
@@ -144,10 +164,10 @@ public class OrganizationRepositoriesFragment extends Fragment {
super.onResume();
if (MainActivity.reloadRepos) {
repositoriesViewModel.loadReposList(
page, resultLimit, null, "org", orgName, getContext());
MainActivity.reloadRepos = false;
if (OrganizationDetailActivity.updateOrgFABActions) {
page = 1;
fetchDataAsync();
OrganizationDetailActivity.updateOrgFABActions = false;
}
}

View File

@@ -1,5 +1,6 @@
package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@@ -20,6 +21,7 @@ import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.R;
import org.mian.gitnex.activities.CreateTeamByOrgActivity;
import org.mian.gitnex.adapters.OrganizationTeamsAdapter;
import org.mian.gitnex.databinding.FragmentOrganizationTeamsBinding;
import org.mian.gitnex.viewmodels.TeamsByOrgViewModel;
@@ -96,6 +98,17 @@ public class OrganizationTeamsFragment extends Fragment {
fetchDataAsync(orgName);
if (!permissions.isIsOwner()) {
fragmentTeamsByOrgBinding.createTeam.setVisibility(View.GONE);
}
fragmentTeamsByOrgBinding.createTeam.setOnClickListener(
v1 -> {
Intent intentTeam = new Intent(getContext(), CreateTeamByOrgActivity.class);
intentTeam.putExtras(requireActivity().getIntent().getExtras());
startActivity(intentTeam);
});
return fragmentTeamsByOrgBinding.getRoot();
}

View File

@@ -57,9 +57,6 @@ public class RepositoriesFragment extends Fragment {
fragmentRepositoriesBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext()));
fragmentRepositoriesBinding.recyclerView.setPadding(0, 0, 0, 220);
fragmentRepositoriesBinding.recyclerView.setClipToPadding(false);
fragmentRepositoriesBinding.pullToRefresh.setOnRefreshListener(
() ->
new Handler(Looper.getMainLooper())

View File

@@ -6,8 +6,8 @@
android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical"
android:paddingTop="6dp"
android:paddingBottom="12dp">
android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
@@ -18,88 +18,12 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/organizationHeadFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:id="@+id/bottomSheetHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/newCreateButtonCopy"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/>
</LinearLayout>
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/orgCreateSection"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp"
app:alignContent="center"
app:alignItems="flex_start"
app:flexWrap="wrap"
app:justifyContent="center">
<TextView
android:id="@+id/createRepository"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/repository"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_repo"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/createTeam"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/team"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_people"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/createLabel"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/labelTxt"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_tag"
app:layout_alignSelf="flex_start"/>
</com.google.android.flexbox.FlexboxLayout>
<View
android:id="@+id/orgDivider"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_marginBottom="16dp"
android:background="?attr/dividerColor"/>
<LinearLayout
android:id="@+id/organizationShareHeadFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
android:padding="@dimen/dimen8dp">
<TextView
android:id="@+id/bottomSheetHeaderOrg"
@@ -108,14 +32,14 @@
android:gravity="center"
android:text="@string/organization"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/>
android:textSize="@dimen/dimen18sp" />
</LinearLayout>
<com.google.android.flexbox.FlexboxLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
app:alignContent="center"
app:alignItems="flex_start"
app:flexWrap="wrap"
@@ -123,42 +47,42 @@
<TextView
android:id="@+id/copyOrgUrl"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="8dp"
android:padding="@dimen/dimen4dp"
android:text="@string/genericCopyUrl"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_copy"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/share"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="8dp"
android:padding="@dimen/dimen4dp"
android:text="@string/share"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_share"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/open"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="8dp"
android:padding="@dimen/dimen4dp"
android:text="@string/openInBrowser"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_browser"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
</com.google.android.flexbox.FlexboxLayout>

View File

@@ -6,8 +6,8 @@
android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical"
android:paddingTop="6dp"
android:paddingBottom="12dp">
android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
@@ -155,16 +155,16 @@
<View
android:id="@+id/repoDivider"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_marginBottom="16dp"
android:background="?attr/dividerColor"/>
android:layout_height="@dimen/dimen4dp"
android:layout_marginBottom="@dimen/dimen16dp"
android:background="?attr/dividerColor" />
<LinearLayout
android:id="@+id/repoOthersHeadFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
android:padding="@dimen/dimen8dp">
<TextView
android:id="@+id/bottomSheetHeaderRepo"
@@ -173,7 +173,7 @@
android:gravity="center"
android:text="@string/repository"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/>
android:textSize="@dimen/dimen18sp" />
</LinearLayout>
@@ -181,7 +181,7 @@
android:id="@+id/repoOthersSection"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
app:alignContent="center"
app:alignItems="flex_start"
app:flexWrap="wrap"
@@ -189,107 +189,107 @@
<TextView
android:id="@+id/starRepository"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/starMember"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_star"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/unStarRepository"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/unstar"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_star_unfilled"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/watchRepository"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/watch"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_watchers"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/unWatchRepository"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/unwatch"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_unwatch"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/copyRepoUrl"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/genericCopyUrl"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_copy"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/shareRepository"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/share"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_share"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/openWebRepo"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/openInBrowser"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_browser"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
<TextView
android:id="@+id/repoSettings"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_width="@dimen/dimen132dp"
android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:padding="@dimen/dimen4dp"
android:text="@string/navSettings"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_settings"
app:layout_alignSelf="flex_start"/>
app:layout_alignSelf="flex_start" />
</com.google.android.flexbox.FlexboxLayout>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -20,7 +21,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="@dimen/dimen72dp" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@@ -32,17 +35,30 @@
android:layout_height="wrap_content"
android:indeterminate="true"
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
app:indicatorColor="?attr/progressIndicatorColor"/>
app:indicatorColor="?attr/progressIndicatorColor" />
<TextView
android:id="@+id/noData"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:layout_margin="@dimen/dimen16dp"
android:gravity="center"
android:text="@string/noDataFound"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp"
android:visibility="gone"/>
android:textSize="@dimen/dimen18sp"
android:visibility="gone" />
</RelativeLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/createLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/dimen16dp"
android:text="@string/createLabel"
android:contentDescription="@string/createLabel"
android:textColor="?attr/primaryBackgroundColor"
android:backgroundTint="?attr/fabColor"
app:iconTint="?attr/primaryBackgroundColor"
app:icon="@drawable/ic_add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -20,7 +21,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="@dimen/dimen72dp" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@@ -32,17 +35,30 @@
android:layout_height="wrap_content"
android:indeterminate="true"
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
app:indicatorColor="?attr/progressIndicatorColor"/>
app:indicatorColor="?attr/progressIndicatorColor" />
<TextView
android:id="@+id/noDataTeams"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:layout_margin="@dimen/dimen16dp"
android:gravity="center"
android:text="@string/noDataFound"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp"
android:visibility="gone"/>
android:textSize="@dimen/dimen18sp"
android:visibility="gone" />
</RelativeLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/createTeam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/dimen16dp"
android:text="@string/pageTitleCreateTeam"
android:contentDescription="@string/pageTitleCreateTeam"
android:textColor="?attr/primaryBackgroundColor"
android:backgroundTint="?attr/fabColor"
app:iconTint="?attr/primaryBackgroundColor"
app:icon="@drawable/ic_add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -21,7 +21,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="@dimen/dimen72dp" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@@ -33,30 +35,30 @@
android:layout_height="wrap_content"
android:indeterminate="true"
style="@style/Widget.Material3.LinearProgressIndicator"
app:indicatorColor="?attr/progressIndicatorColor"/>
app:indicatorColor="?attr/progressIndicatorColor" />
<TextView
android:id="@+id/noData"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:layout_margin="@dimen/dimen16dp"
android:gravity="center"
android:text="@string/noDataFound"
android:textColor="?attr/primaryTextColor"
android:textSize="18sp"
android:visibility="gone"/>
android:textSize="@dimen/dimen18sp"
android:visibility="gone" />
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/addNewRepo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:layout_margin="@dimen/dimen16dp"
android:text="@string/pageTitleNewRepo"
android:contentDescription="@string/pageTitleNewRepo"
android:textColor="?attr/primaryBackgroundColor"
android:backgroundTint="?attr/fabColor"
app:iconTint="?attr/primaryBackgroundColor"
app:icon="@drawable/ic_add"/>
app:icon="@drawable/ic_add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -31,6 +31,7 @@
<dimen name="dimen100dp">100dp</dimen>
<dimen name="dimen104dp">104dp</dimen>
<dimen name="dimen120dp">120dp</dimen>
<dimen name="dimen132dp">132dp</dimen>
<dimen name="dimen140dp">140dp</dimen>
<dimen name="dimen150dp">150dp</dimen>
<dimen name="dimen180dp">180dp</dimen>