mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2023-12-13 20:50:18 +01:00
Use FAB for creating user as admin, format code
This commit is contained in:
parent
22126f1db5
commit
984bfe1bd8
|
@ -16,16 +16,14 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.adapters.AdminGetUsersAdapter;
|
||||
import org.mian.gitnex.databinding.ActivityAdminGetUsersBinding;
|
||||
import org.mian.gitnex.fragments.BottomSheetAdminUsersFragment;
|
||||
import org.mian.gitnex.helpers.AppUtil;
|
||||
import org.mian.gitnex.helpers.Constants;
|
||||
import org.mian.gitnex.structs.BottomSheetListener;
|
||||
import org.mian.gitnex.viewmodels.AdminGetUsersViewModel;
|
||||
|
||||
/**
|
||||
* @author M M Arif
|
||||
*/
|
||||
public class AdminGetUsersActivity extends BaseActivity implements BottomSheetListener {
|
||||
public class AdminGetUsersActivity extends BaseActivity {
|
||||
|
||||
private AdminGetUsersViewModel adminGetUsersViewModel;
|
||||
private View.OnClickListener onClickListener;
|
||||
|
@ -68,9 +66,14 @@ public class AdminGetUsersActivity extends BaseActivity implements BottomSheetLi
|
|||
},
|
||||
50));
|
||||
|
||||
activityAdminGetUsersBinding.createNewUser.setOnClickListener(
|
||||
v1 -> {
|
||||
startActivity(
|
||||
new Intent(AdminGetUsersActivity.this, CreateNewUserActivity.class));
|
||||
});
|
||||
|
||||
fetchDataAsync();
|
||||
}
|
||||
;
|
||||
|
||||
private void fetchDataAsync() {
|
||||
|
||||
|
@ -123,7 +126,6 @@ public class AdminGetUsersActivity extends BaseActivity implements BottomSheetLi
|
|||
public boolean onCreateOptionsMenu(final Menu menu) {
|
||||
|
||||
final MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.generic_nav_dotted_menu, menu);
|
||||
|
||||
new Handler(Looper.getMainLooper())
|
||||
.postDelayed(
|
||||
|
@ -165,34 +167,6 @@ public class AdminGetUsersActivity extends BaseActivity implements BottomSheetLi
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
|
||||
finish();
|
||||
return true;
|
||||
} else if (id == R.id.genericMenu) {
|
||||
|
||||
BottomSheetAdminUsersFragment bottomSheet = new BottomSheetAdminUsersFragment();
|
||||
bottomSheet.show(getSupportFragmentManager(), "usersBottomSheet");
|
||||
return true;
|
||||
} else {
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onButtonClicked(String text) {
|
||||
|
||||
if ("newUser".equals(text)) {
|
||||
startActivity(new Intent(AdminGetUsersActivity.this, CreateNewUserActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
private void initCloseListener() {
|
||||
onClickListener = view -> finish();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -45,10 +44,8 @@ public class AdminCronTasksAdapter
|
|||
|
||||
ImageView runTask = itemView.findViewById(R.id.runTask);
|
||||
taskName = itemView.findViewById(R.id.taskName);
|
||||
LinearLayout cronTasksInfo = itemView.findViewById(R.id.cronTasksInfo);
|
||||
LinearLayout cronTasksRun = itemView.findViewById(R.id.cronTasksRun);
|
||||
|
||||
cronTasksInfo.setOnClickListener(
|
||||
taskName.setOnClickListener(
|
||||
taskInfo -> {
|
||||
String nextRun = "";
|
||||
String lastRun = "";
|
||||
|
@ -85,10 +82,7 @@ public class AdminCronTasksAdapter
|
|||
materialAlertDialogBuilder.create().show();
|
||||
});
|
||||
|
||||
cronTasksRun.setOnClickListener(
|
||||
taskInfo -> {
|
||||
runCronTask(ctx, cronTasks.getName());
|
||||
});
|
||||
runTask.setOnClickListener(taskInfo -> runCronTask(ctx, cronTasks.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
package org.mian.gitnex.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
import org.mian.gitnex.databinding.BottomSheetAdminUsersBinding;
|
||||
import org.mian.gitnex.structs.BottomSheetListener;
|
||||
|
||||
/**
|
||||
* @author M M Arif
|
||||
*/
|
||||
public class BottomSheetAdminUsersFragment extends BottomSheetDialogFragment {
|
||||
|
||||
private BottomSheetListener bmListener;
|
||||
|
||||
@Nullable @Override
|
||||
public View onCreateView(
|
||||
@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
|
||||
BottomSheetAdminUsersBinding bottomSheetAdminUsersBinding =
|
||||
BottomSheetAdminUsersBinding.inflate(inflater, container, false);
|
||||
|
||||
bottomSheetAdminUsersBinding.createNewUser.setOnClickListener(
|
||||
v1 -> {
|
||||
bmListener.onButtonClicked("newUser");
|
||||
dismiss();
|
||||
});
|
||||
|
||||
return bottomSheetAdminUsersBinding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
try {
|
||||
bmListener = (BottomSheetListener) context;
|
||||
} catch (ClassCastException e) {
|
||||
throw new ClassCastException(context + " must implement BottomSheetListener");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -86,7 +86,14 @@ public class MyRepositoriesFragment extends Fragment {
|
|||
private void fetchDataAsync(String userLogin) {
|
||||
|
||||
repositoriesViewModel
|
||||
.getRepositories(page, resultLimit, userLogin, "myRepos", null, getContext(), fragmentRepositoriesBinding)
|
||||
.getRepositories(
|
||||
page,
|
||||
resultLimit,
|
||||
userLogin,
|
||||
"myRepos",
|
||||
null,
|
||||
getContext(),
|
||||
fragmentRepositoriesBinding)
|
||||
.observe(
|
||||
getViewLifecycleOwner(),
|
||||
reposListMain -> {
|
||||
|
|
|
@ -36,8 +36,7 @@ public class OrganizationLabelsFragment extends Fragment {
|
|||
private String repoOwner;
|
||||
private final String type = "org";
|
||||
|
||||
public OrganizationLabelsFragment() {
|
||||
}
|
||||
public OrganizationLabelsFragment() {}
|
||||
|
||||
public static OrganizationLabelsFragment newInstance(
|
||||
String repoOwner, OrganizationPermissions permissions) {
|
||||
|
|
|
@ -42,8 +42,7 @@ public class OrganizationRepositoriesFragment extends Fragment {
|
|||
|
||||
public static OrganizationRepositoriesFragment newInstance(
|
||||
String orgName, OrganizationPermissions permissions) {
|
||||
OrganizationRepositoriesFragment fragment =
|
||||
new OrganizationRepositoriesFragment();
|
||||
OrganizationRepositoriesFragment fragment = new OrganizationRepositoriesFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(getOrgName, orgName);
|
||||
args.putSerializable("permissions", permissions);
|
||||
|
@ -113,7 +112,14 @@ public class OrganizationRepositoriesFragment extends Fragment {
|
|||
private void fetchDataAsync() {
|
||||
|
||||
repositoriesViewModel
|
||||
.getRepositories(page, resultLimit, "", "org", orgName, getContext(), fragmentRepositoriesBinding)
|
||||
.getRepositories(
|
||||
page,
|
||||
resultLimit,
|
||||
"",
|
||||
"org",
|
||||
orgName,
|
||||
getContext(),
|
||||
fragmentRepositoriesBinding)
|
||||
.observe(
|
||||
getViewLifecycleOwner(),
|
||||
reposListMain -> {
|
||||
|
|
|
@ -60,18 +60,18 @@ public class OrganizationTeamInfoMembersFragment extends Fragment {
|
|||
fetchMembersAsync();
|
||||
|
||||
OrganizationPermissions permissions =
|
||||
(OrganizationPermissions) requireActivity().getIntent().getSerializableExtra("permissions");
|
||||
(OrganizationPermissions)
|
||||
requireActivity().getIntent().getSerializableExtra("permissions");
|
||||
|
||||
if (!permissions.isIsOwner()) {
|
||||
binding.addNewMember.setVisibility(View.GONE);
|
||||
}
|
||||
binding.addNewMember.setOnClickListener(
|
||||
v1 -> {
|
||||
Intent intent =
|
||||
new Intent(getContext(), AddNewTeamMemberActivity.class);
|
||||
intent.putExtra("teamId", team.getId());
|
||||
startActivity(intent);
|
||||
});
|
||||
v1 -> {
|
||||
Intent intent = new Intent(getContext(), AddNewTeamMemberActivity.class);
|
||||
intent.putExtra("teamId", team.getId());
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
|
|
@ -86,20 +86,21 @@ public class OrganizationTeamInfoReposFragment extends Fragment {
|
|||
fetchDataAsync();
|
||||
|
||||
OrganizationPermissions permissions =
|
||||
(OrganizationPermissions) requireActivity().getIntent().getSerializableExtra("permissions");
|
||||
(OrganizationPermissions)
|
||||
requireActivity().getIntent().getSerializableExtra("permissions");
|
||||
|
||||
if (!requireArguments().getBoolean("showRepo") || !permissions.isIsOwner()) {
|
||||
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
|
||||
}
|
||||
fragmentRepositoriesBinding.addNewRepo.setOnClickListener(
|
||||
v1 -> {
|
||||
Intent intent =
|
||||
new Intent(getContext(), AddNewTeamRepoActivity.class);
|
||||
intent.putExtra("teamId", team.getId());
|
||||
intent.putExtra("teamName", team.getName());
|
||||
intent.putExtra("orgName", requireActivity().getIntent().getStringExtra("orgName"));
|
||||
startActivity(intent);
|
||||
});
|
||||
v1 -> {
|
||||
Intent intent = new Intent(getContext(), AddNewTeamRepoActivity.class);
|
||||
intent.putExtra("teamId", team.getId());
|
||||
intent.putExtra("teamName", team.getName());
|
||||
intent.putExtra(
|
||||
"orgName", requireActivity().getIntent().getStringExtra("orgName"));
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
return fragmentRepositoriesBinding.getRoot();
|
||||
}
|
||||
|
@ -108,7 +109,13 @@ public class OrganizationTeamInfoReposFragment extends Fragment {
|
|||
|
||||
repositoriesViewModel
|
||||
.getRepositories(
|
||||
page, resultLimit, String.valueOf(team.getId()), "team", null, getContext(), fragmentRepositoriesBinding)
|
||||
page,
|
||||
resultLimit,
|
||||
String.valueOf(team.getId()),
|
||||
"team",
|
||||
null,
|
||||
getContext(),
|
||||
fragmentRepositoriesBinding)
|
||||
.observe(
|
||||
getViewLifecycleOwner(),
|
||||
reposListMain -> {
|
||||
|
|
|
@ -79,7 +79,14 @@ public class RepositoriesFragment extends Fragment {
|
|||
private void fetchDataAsync() {
|
||||
|
||||
repositoriesViewModel
|
||||
.getRepositories(page, resultLimit, null, "repos", null, getContext(), fragmentRepositoriesBinding)
|
||||
.getRepositories(
|
||||
page,
|
||||
resultLimit,
|
||||
null,
|
||||
"repos",
|
||||
null,
|
||||
getContext(),
|
||||
fragmentRepositoriesBinding)
|
||||
.observe(
|
||||
getViewLifecycleOwner(),
|
||||
reposListMain -> {
|
||||
|
|
|
@ -82,7 +82,14 @@ public class StarredRepositoriesFragment extends Fragment {
|
|||
private void fetchDataAsync() {
|
||||
|
||||
repositoriesViewModel
|
||||
.getRepositories(page, resultLimit, "", "starredRepos", null, getContext(), fragmentRepositoriesBinding)
|
||||
.getRepositories(
|
||||
page,
|
||||
resultLimit,
|
||||
"",
|
||||
"starredRepos",
|
||||
null,
|
||||
getContext(),
|
||||
fragmentRepositoriesBinding)
|
||||
.observe(
|
||||
getViewLifecycleOwner(),
|
||||
reposListMain -> {
|
||||
|
|
|
@ -25,16 +25,29 @@ public class RepositoriesViewModel extends ViewModel {
|
|||
private MutableLiveData<List<Repository>> reposList;
|
||||
|
||||
public LiveData<List<Repository>> getRepositories(
|
||||
int page, int resultLimit, String userLogin, String type, String orgName, Context ctx, FragmentRepositoriesBinding fragmentRepositoriesBinding) {
|
||||
int page,
|
||||
int resultLimit,
|
||||
String userLogin,
|
||||
String type,
|
||||
String orgName,
|
||||
Context ctx,
|
||||
FragmentRepositoriesBinding fragmentRepositoriesBinding) {
|
||||
|
||||
reposList = new MutableLiveData<>();
|
||||
loadReposList(page, resultLimit, userLogin, type, orgName, ctx, fragmentRepositoriesBinding);
|
||||
loadReposList(
|
||||
page, resultLimit, userLogin, type, orgName, ctx, fragmentRepositoriesBinding);
|
||||
|
||||
return reposList;
|
||||
}
|
||||
|
||||
public void loadReposList(
|
||||
int page, int resultLimit, String userLogin, String type, String orgName, Context ctx, FragmentRepositoriesBinding fragmentRepositoriesBinding) {
|
||||
int page,
|
||||
int resultLimit,
|
||||
String userLogin,
|
||||
String type,
|
||||
String orgName,
|
||||
Context ctx,
|
||||
FragmentRepositoriesBinding fragmentRepositoriesBinding) {
|
||||
|
||||
Call<List<Repository>> call;
|
||||
|
||||
|
@ -74,12 +87,10 @@ public class RepositoriesViewModel extends ViewModel {
|
|||
if (response.code() == 200) {
|
||||
reposList.postValue(response.body());
|
||||
}
|
||||
}
|
||||
else if (response.code() == 403) {
|
||||
} else if (response.code() == 403) {
|
||||
fragmentRepositoriesBinding.progressBar.setVisibility(View.GONE);
|
||||
fragmentRepositoriesBinding.noData.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericError));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_close"/>
|
||||
android:src="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbarTitle"
|
||||
|
@ -40,7 +40,7 @@
|
|||
android:text="@string/adminCron"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/dimen20sp"/>
|
||||
android:textSize="@dimen/dimen20sp" />
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
|||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
|||
android:layout_marginTop="@dimen/dimen56dp"
|
||||
android:indeterminate="true"
|
||||
style="@style/Widget.Material3.LinearProgressIndicator"
|
||||
app:indicatorColor="?attr/progressIndicatorColor"/>
|
||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noData"
|
||||
|
@ -85,6 +85,6 @@
|
|||
android:text="@string/noDataFound"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen20sp"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
@ -21,7 +22,9 @@
|
|||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
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>
|
||||
|
||||
|
@ -51,7 +54,7 @@
|
|||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_close"/>
|
||||
android:src="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
|
@ -64,7 +67,7 @@
|
|||
android:scrollbars="horizontal"
|
||||
android:singleLine="true"
|
||||
android:layout_marginEnd="@dimen/dimen20dp"
|
||||
android:textSize="@dimen/dimen20sp"/>
|
||||
android:textSize="@dimen/dimen20sp" />
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
|
@ -77,7 +80,7 @@
|
|||
android:layout_marginTop="@dimen/dimen56dp"
|
||||
android:indeterminate="true"
|
||||
style="@style/Widget.Material3.LinearProgressIndicator"
|
||||
app:indicatorColor="?attr/progressIndicatorColor"/>
|
||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_data_users"
|
||||
|
@ -88,6 +91,19 @@
|
|||
android:text="@string/noDataFound"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen20sp"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/createNewUser"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/dimen16dp"
|
||||
android:text="@string/adminCreateNewUser"
|
||||
android:contentDescription="@string/adminCreateNewUser"
|
||||
android:textColor="?attr/primaryBackgroundColor"
|
||||
android:backgroundTint="?attr/fabColor"
|
||||
app:iconTint="?attr/primaryBackgroundColor"
|
||||
app:icon="@drawable/ic_add" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/adminUsersHeadFrame"
|
||||
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/navAdministration"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/giteaUsersAdminSection"
|
||||
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/createNewUser"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
android:padding="4dp"
|
||||
android:text="@string/adminCreateNewUser"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="16sp"
|
||||
app:drawableTopCompat="@drawable/ic_person_add"
|
||||
app:layout_alignSelf="flex_start"/>
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
|
@ -12,50 +12,34 @@
|
|||
style="?attr/materialCardViewElevatedStyle"
|
||||
app:cardElevation="@dimen/dimen0dp">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:background="?attr/materialCardBackgroundColor"
|
||||
android:padding="@dimen/dimen12dp"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cronTasksRun"
|
||||
<TextView
|
||||
android:id="@+id/taskName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:text="@string/adminCron"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/runTask"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginEnd="@dimen/dimen16dp">
|
||||
android:layout_gravity="end"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/adminCron"
|
||||
android:src="@drawable/ic_play" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/runTask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/adminCron"
|
||||
android:src="@drawable/ic_play"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cronTasksInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/taskName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:text="@string/userName"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/generalImgContentText"
|
||||
android:src="@drawable/ic_android"/>
|
||||
android:src="@drawable/ic_android" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
|||
android:layout_gravity="center_horizontal"
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="@string/userRoleAdmin"
|
||||
android:src="@drawable/ic_android"/>
|
||||
android:src="@drawable/ic_android" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -70,7 +70,7 @@
|
|||
android:text="@string/userName"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen14sp"
|
||||
android:textStyle="bold"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userName"
|
||||
|
@ -79,7 +79,7 @@
|
|||
android:layout_marginBottom="@dimen/dimen4dp"
|
||||
android:text="@string/userName"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen12sp"/>
|
||||
android:textSize="@dimen/dimen12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userEmail"
|
||||
|
@ -87,7 +87,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/userEmail"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen12sp"/>
|
||||
android:textSize="@dimen/dimen12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
Loading…
Reference in a new issue