UI enhancements (#1259)

Potentially closes #1226
closes #1234

- Fix UI issues
- Use FAB where needed instead of bottom sheet entries
- Other fixes

Update: added screen shots
Co-authored-by: M M Arif <mmarif@swatian.com>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1259
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
M M Arif 2023-03-26 06:11:59 +00:00
parent e5babcc8b0
commit 15a8340e5e
157 changed files with 1788 additions and 1786 deletions

View File

@ -54,16 +54,16 @@ configurations {
} }
dependencies { dependencies {
def lifecycle_version = '2.6.0-rc01' def lifecycle_version = '2.6.0'
def markwon_version = '4.6.2' def markwon_version = '4.6.2'
def work_version = '2.8.0' def work_version = '2.8.0'
def acra = '5.9.7' def acra = '5.9.7'
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0-alpha02' implementation 'com.google.android.material:material:1.9.0-beta01'
implementation 'androidx.compose.material3:material3:1.1.0-alpha07' implementation 'androidx.compose.material3:material3:1.1.0-alpha08'
implementation 'androidx.compose.material3:material3-window-size-class:1.1.0-alpha07' implementation 'androidx.compose.material3:material3-window-size-class:1.1.0-alpha08'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01' implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.legacy:legacy-support-v4:1.0.0" implementation "androidx.legacy:legacy-support-v4:1.0.0"

View File

@ -6,6 +6,7 @@ import org.mian.gitnex.R;
import org.mian.gitnex.activities.AddNewTeamMemberActivity; import org.mian.gitnex.activities.AddNewTeamMemberActivity;
import org.mian.gitnex.activities.AddNewTeamRepoActivity; import org.mian.gitnex.activities.AddNewTeamRepoActivity;
import org.mian.gitnex.clients.RetrofitClient; import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.fragments.OrganizationTeamInfoMembersFragment;
import org.mian.gitnex.fragments.OrganizationTeamInfoReposFragment; import org.mian.gitnex.fragments.OrganizationTeamInfoReposFragment;
import org.mian.gitnex.helpers.AlertDialogs; import org.mian.gitnex.helpers.AlertDialogs;
import org.mian.gitnex.helpers.Toasty; import org.mian.gitnex.helpers.Toasty;
@ -34,6 +35,7 @@ public class TeamActions {
if (response.code() == 204) { if (response.code() == 204) {
OrganizationTeamInfoMembersFragment.refreshMembers = true;
Toasty.success( Toasty.success(
context, context.getString(R.string.memberRemovedMessage)); context, context.getString(R.string.memberRemovedMessage));
((AddNewTeamMemberActivity) context).finish(); ((AddNewTeamMemberActivity) context).finish();
@ -81,6 +83,7 @@ public class TeamActions {
if (response.code() == 204) { if (response.code() == 204) {
OrganizationTeamInfoMembersFragment.refreshMembers = true;
Toasty.success( Toasty.success(
context, context.getString(R.string.memberAddedMessage)); context, context.getString(R.string.memberAddedMessage));
((AddNewTeamMemberActivity) context).finish(); ((AddNewTeamMemberActivity) context).finish();

View File

@ -16,16 +16,14 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.adapters.AdminGetUsersAdapter; import org.mian.gitnex.adapters.AdminGetUsersAdapter;
import org.mian.gitnex.databinding.ActivityAdminGetUsersBinding; import org.mian.gitnex.databinding.ActivityAdminGetUsersBinding;
import org.mian.gitnex.fragments.BottomSheetAdminUsersFragment;
import org.mian.gitnex.helpers.AppUtil; import org.mian.gitnex.helpers.AppUtil;
import org.mian.gitnex.helpers.Constants; import org.mian.gitnex.helpers.Constants;
import org.mian.gitnex.structs.BottomSheetListener;
import org.mian.gitnex.viewmodels.AdminGetUsersViewModel; import org.mian.gitnex.viewmodels.AdminGetUsersViewModel;
/** /**
* @author M M Arif * @author M M Arif
*/ */
public class AdminGetUsersActivity extends BaseActivity implements BottomSheetListener { public class AdminGetUsersActivity extends BaseActivity {
private AdminGetUsersViewModel adminGetUsersViewModel; private AdminGetUsersViewModel adminGetUsersViewModel;
private View.OnClickListener onClickListener; private View.OnClickListener onClickListener;
@ -68,9 +66,14 @@ public class AdminGetUsersActivity extends BaseActivity implements BottomSheetLi
}, },
50)); 50));
activityAdminGetUsersBinding.createNewUser.setOnClickListener(
v1 -> {
startActivity(
new Intent(AdminGetUsersActivity.this, CreateNewUserActivity.class));
});
fetchDataAsync(); fetchDataAsync();
} }
;
private void fetchDataAsync() { private void fetchDataAsync() {
@ -123,7 +126,6 @@ public class AdminGetUsersActivity extends BaseActivity implements BottomSheetLi
public boolean onCreateOptionsMenu(final Menu menu) { public boolean onCreateOptionsMenu(final Menu menu) {
final MenuInflater inflater = getMenuInflater(); final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.generic_nav_dotted_menu, menu);
new Handler(Looper.getMainLooper()) new Handler(Looper.getMainLooper())
.postDelayed( .postDelayed(
@ -165,34 +167,6 @@ public class AdminGetUsersActivity extends BaseActivity implements BottomSheetLi
return true; 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() { private void initCloseListener() {
onClickListener = view -> finish(); onClickListener = view -> finish();
} }

View File

@ -270,6 +270,7 @@ public class CreateFileActivity extends BaseActivity {
result.putExtra("fileModified", true); result.putExtra("fileModified", true);
result.putExtra("fileAction", fileAction); result.putExtra("fileAction", fileAction);
setResult(200, result); setResult(200, result);
RepoDetailActivity.updateFABActions = true;
finish(); finish();
break; break;

View File

@ -3,7 +3,6 @@ package org.mian.gitnex.activities;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.DatePickerDialog; import android.app.DatePickerDialog;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.Menu; import android.view.Menu;
@ -196,9 +195,7 @@ public class CreateMilestoneActivity extends BaseActivity implements View.OnClic
if (response.code() == 201) { if (response.code() == 201) {
Intent result = new Intent(); RepoDetailActivity.updateFABActions = true;
result.putExtra("milestoneCreated", true);
setResult(201, result);
Toasty.success(ctx, getString(R.string.milestoneCreated)); Toasty.success(ctx, getString(R.string.milestoneCreated));
enableProcessButton(); enableProcessButton();
finish(); finish();

View File

@ -2,7 +2,6 @@ package org.mian.gitnex.activities;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.Menu; import android.view.Menu;
@ -182,9 +181,7 @@ public class CreateReleaseActivity extends BaseActivity {
if (response.code() == 201) { if (response.code() == 201) {
Intent result = new Intent(); RepoDetailActivity.updateFABActions = true;
result.putExtra("updateReleases", true);
setResult(201, result);
Toasty.success(ctx, getString(R.string.tagCreated)); Toasty.success(ctx, getString(R.string.tagCreated));
finish(); finish();
} else if (response.code() == 401) { } else if (response.code() == 401) {
@ -291,9 +288,7 @@ public class CreateReleaseActivity extends BaseActivity {
if (response.code() == 201) { if (response.code() == 201) {
Intent result = new Intent(); RepoDetailActivity.updateFABActions = true;
result.putExtra("updateReleases", true);
setResult(201, result);
Toasty.success(ctx, getString(R.string.releaseCreatedText)); Toasty.success(ctx, getString(R.string.releaseCreatedText));
finish(); finish();
} else if (response.code() == 401) { } else if (response.code() == 401) {

View File

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

View File

@ -638,10 +638,6 @@ public class MainActivity extends BaseActivity
.beginTransaction() .beginTransaction()
.replace(R.id.fragment_container, new SettingsFragment()) .replace(R.id.fragment_container, new SettingsFragment())
.commit(); .commit();
} else if (id == R.id.nav_logout) {
AppUtil.logout(ctx);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
} else if (id == R.id.nav_starred_repos) { } else if (id == R.id.nav_starred_repos) {
toolbarTitle.setText(getResources().getString(R.string.pageTitleStarredRepos)); toolbarTitle.setText(getResources().getString(R.string.pageTitleStarredRepos));

View File

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

View File

@ -1,31 +1,24 @@
package org.mian.gitnex.activities; package org.mian.gitnex.activities;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.viewpager2.adapter.FragmentStateAdapter; import androidx.viewpager2.adapter.FragmentStateAdapter;
import com.google.android.material.tabs.TabLayoutMediator; import com.google.android.material.tabs.TabLayoutMediator;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.gitnex.tea4j.v2.models.Team; import org.gitnex.tea4j.v2.models.Team;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.databinding.ActivityOrgTeamInfoBinding; import org.mian.gitnex.databinding.ActivityOrgTeamInfoBinding;
import org.mian.gitnex.fragments.BottomSheetOrganizationTeamsFragment;
import org.mian.gitnex.fragments.OrganizationTeamInfoMembersFragment; import org.mian.gitnex.fragments.OrganizationTeamInfoMembersFragment;
import org.mian.gitnex.fragments.OrganizationTeamInfoPermissionsFragment; import org.mian.gitnex.fragments.OrganizationTeamInfoPermissionsFragment;
import org.mian.gitnex.fragments.OrganizationTeamInfoReposFragment; import org.mian.gitnex.fragments.OrganizationTeamInfoReposFragment;
import org.mian.gitnex.structs.BottomSheetListener;
/** /**
* @author M M Arif * @author M M Arif
*/ */
public class OrganizationTeamInfoActivity extends BaseActivity implements BottomSheetListener { public class OrganizationTeamInfoActivity extends BaseActivity {
private Team team; private Team team;
@ -101,52 +94,4 @@ public class OrganizationTeamInfoActivity extends BaseActivity implements Bottom
}) })
.attach(); .attach();
} }
@Override
public boolean onCreateOptionsMenu(Menu menu) {
OrganizationPermissions permissions =
(OrganizationPermissions) getIntent().getSerializableExtra("permissions");
if (permissions == null || permissions.isIsOwner()) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.generic_nav_dotted_menu, menu);
}
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) {
BottomSheetOrganizationTeamsFragment bottomSheet =
new BottomSheetOrganizationTeamsFragment();
Bundle args = new Bundle();
args.putBoolean("showRepo", !team.isIncludesAllRepositories());
bottomSheet.setArguments(args);
bottomSheet.show(getSupportFragmentManager(), "orgTeamsBottomSheet");
return true;
} else {
return super.onOptionsItemSelected(item);
}
}
@Override
public void onButtonClicked(String text) {
if ("newMember".equals(text)) {
Intent intent =
new Intent(OrganizationTeamInfoActivity.this, AddNewTeamMemberActivity.class);
intent.putExtra("teamId", team.getId());
startActivity(intent);
} else if ("newRepo".equals(text)) {
Intent intent =
new Intent(OrganizationTeamInfoActivity.this, AddNewTeamRepoActivity.class);
intent.putExtra("teamId", team.getId());
intent.putExtra("teamName", team.getName());
intent.putExtra("orgName", getIntent().getStringExtra("orgName"));
startActivity(intent);
}
}
} }

View File

@ -64,6 +64,7 @@ import retrofit2.Response;
*/ */
public class RepoDetailActivity extends BaseActivity implements BottomSheetListener { public class RepoDetailActivity extends BaseActivity implements BottomSheetListener {
public static boolean updateFABActions = false;
public static boolean updateRepo = false; public static boolean updateRepo = false;
private final ActivityResultLauncher<Intent> settingsLauncher = private final ActivityResultLauncher<Intent> settingsLauncher =
registerForActivityResult( registerForActivityResult(
@ -85,55 +86,12 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
private FragmentRefreshListener fragmentRefreshListener; private FragmentRefreshListener fragmentRefreshListener;
private FragmentRefreshListener fragmentRefreshListenerPr; private FragmentRefreshListener fragmentRefreshListenerPr;
private FragmentRefreshListener fragmentRefreshListenerMilestone; private FragmentRefreshListener fragmentRefreshListenerMilestone;
private final ActivityResultLauncher<Intent> createMilestoneLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == 201) {
assert result.getData() != null;
if (result.getData().getBooleanExtra("milestoneCreated", false)) {
if (fragmentRefreshListenerMilestone != null) {
fragmentRefreshListenerMilestone.onRefresh(
repository.getMilestoneState().toString());
}
}
}
});
private FragmentRefreshListener fragmentRefreshListenerFiles; private FragmentRefreshListener fragmentRefreshListenerFiles;
private final ActivityResultLauncher<Intent> editFileLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == 200) {
assert result.getData() != null;
if (result.getData().getBooleanExtra("fileModified", false)) {
if (fragmentRefreshListenerFiles != null) {
fragmentRefreshListenerFiles.onRefresh(
repository.getBranchRef());
}
}
}
});
private FragmentRefreshListener fragmentRefreshListenerFilterIssuesByMilestone; private FragmentRefreshListener fragmentRefreshListenerFilterIssuesByMilestone;
private FragmentRefreshListener fragmentRefreshListenerReleases; private FragmentRefreshListener fragmentRefreshListenerReleases;
private Dialog progressDialog; private Dialog progressDialog;
private MaterialAlertDialogBuilder materialAlertDialogBuilder; private MaterialAlertDialogBuilder materialAlertDialogBuilder;
private Intent intentWiki; private Intent intentWiki;
private final ActivityResultLauncher<Intent> createReleaseLauncher =
registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
result -> {
if (result.getResultCode() == 201) {
assert result.getData() != null;
if (result.getData().getBooleanExtra("updateReleases", false)) {
if (fragmentRefreshListenerReleases != null) {
fragmentRefreshListenerReleases.onRefresh(null);
}
repository.removeRepository();
getRepoInfo(repository.getOwner(), repository.getName());
}
}
});
public ActivityResultLauncher<Intent> createIssueLauncher = public ActivityResultLauncher<Intent> createIssueLauncher =
registerForActivityResult( registerForActivityResult(
@ -287,26 +245,9 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
public void onButtonClicked(String text) { public void onButtonClicked(String text) {
switch (text) { switch (text) {
case "label":
startActivity(repository.getIntent(ctx, CreateLabelActivity.class));
break;
case "newIssue":
startActivity(repository.getIntent(ctx, CreateIssueActivity.class));
break;
case "newMilestone":
createMilestoneLauncher.launch(
repository.getIntent(ctx, CreateMilestoneActivity.class));
break;
case "addCollaborator":
startActivity(repository.getIntent(ctx, AddCollaboratorToRepositoryActivity.class));
break;
case "chooseBranch": case "chooseBranch":
chooseBranch(); chooseBranch();
break; break;
case "createRelease":
createReleaseLauncher.launch(
repository.getIntent(ctx, CreateReleaseActivity.class));
break;
case "openWebRepo": case "openWebRepo":
AppUtil.openUrlInBrowser(this, repository.getRepository().getHtmlUrl()); AppUtil.openUrlInBrowser(this, repository.getRepository().getHtmlUrl());
break; break;
@ -319,9 +260,6 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
repository.getRepository().getHtmlUrl(), repository.getRepository().getHtmlUrl(),
ctx.getString(R.string.copyIssueUrlToastMsg)); ctx.getString(R.string.copyIssueUrlToastMsg));
break; break;
case "newFile":
editFileLauncher.launch(repository.getIntent(ctx, CreateFileActivity.class));
break;
case "filterByMilestone": case "filterByMilestone":
filterIssuesByMilestone(); filterIssuesByMilestone();
break; break;
@ -395,13 +333,6 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
case "star": case "star":
repository.setStarred(true); repository.setStarred(true);
break; break;
case "createWiki":
Intent intent = new Intent(ctx, WikiActivity.class);
intent.putExtra("action", "add");
intent.putExtra(
RepositoryContext.INTENT_EXTRA, ((RepoDetailActivity) ctx).repository);
ctx.startActivity(intent);
break;
} }
} }
@ -790,8 +721,7 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
break; break;
case "newRelease": case "newRelease":
viewPager.setCurrentItem(4); viewPager.setCurrentItem(4);
createReleaseLauncher.launch( startActivity(repository.getIntent(ctx, CreateReleaseActivity.class));
repository.getIntent(ctx, CreateReleaseActivity.class));
break; break;
case "wiki": case "wiki":
viewPager.setCurrentItem(5); viewPager.setCurrentItem(5);
@ -808,8 +738,7 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetListe
break; break;
case "milestonesNew": case "milestonesNew":
viewPager.setCurrentItem(6); viewPager.setCurrentItem(6);
createMilestoneLauncher.launch( startActivity(repository.getIntent(ctx, CreateMilestoneActivity.class));
repository.getIntent(ctx, CreateMilestoneActivity.class));
break; break;
case "labels": case "labels":
viewPager.setCurrentItem(7); viewPager.setCurrentItem(7);

View File

@ -5,7 +5,6 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -45,10 +44,8 @@ public class AdminCronTasksAdapter
ImageView runTask = itemView.findViewById(R.id.runTask); ImageView runTask = itemView.findViewById(R.id.runTask);
taskName = itemView.findViewById(R.id.taskName); 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 -> { taskInfo -> {
String nextRun = ""; String nextRun = "";
String lastRun = ""; String lastRun = "";
@ -85,10 +82,7 @@ public class AdminCronTasksAdapter
materialAlertDialogBuilder.create().show(); materialAlertDialogBuilder.create().show();
}); });
cronTasksRun.setOnClickListener( runTask.setOnClickListener(taskInfo -> runCronTask(ctx, cronTasks.getName()));
taskInfo -> {
runCronTask(ctx, cronTasks.getName());
});
} }
} }

View File

@ -552,9 +552,12 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
text.indexOf('|'), text.indexOf('|'),
text.indexOf('|') + 1, text.indexOf('|') + 1,
Spannable.SPAN_INCLUSIVE_EXCLUSIVE); Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
if (!isNightModeThemeDynamic(context)) {
textView.setTextColor( if (tinyDB.getInt("themeId") == 8) {
AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
textView.setTextColor(
AppUtil.dynamicColorResource(context));
}
} }
textView.setText(spannableString); textView.setText(spannableString);
timelineData.addView(textView); timelineData.addView(textView);
@ -589,8 +592,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
issueComment.getUser().getLogin(), issueComment.getUser().getLogin(),
commitText, commitText,
info); info);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
start.setText(HtmlCompat.fromHtml(commitString, HtmlCompat.FROM_HTML_MODE_LEGACY)); start.setText(HtmlCompat.fromHtml(commitString, HtmlCompat.FROM_HTML_MODE_LEGACY));
start.setTextSize(fontSize); start.setTextSize(fontSize);
@ -650,8 +655,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.isRemovedAssignee()) { if (issueComment.isRemovedAssignee()) {
@ -705,8 +712,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.getMilestone() != null) { if (issueComment.getMilestone() != null) {
@ -747,8 +756,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issue.getIssueType().equalsIgnoreCase("Issue")) { if (issue.getIssueType().equalsIgnoreCase("Issue")) {
@ -869,8 +880,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.getType().equalsIgnoreCase("review")) { if (issueComment.getType().equalsIgnoreCase("review")) {
@ -898,8 +911,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
start.setText( start.setText(
@ -921,8 +936,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.getType().equalsIgnoreCase("lock")) { if (issueComment.getType().equalsIgnoreCase("lock")) {
@ -953,8 +970,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.getType().equalsIgnoreCase("add_dependency")) { if (issueComment.getType().equalsIgnoreCase("add_dependency")) {
@ -986,8 +1005,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.getProjectId() > 0) { if (issueComment.getProjectId() > 0) {
@ -1018,8 +1039,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
// TODO pretty-print // TODO pretty-print
@ -1060,8 +1083,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.getType().equalsIgnoreCase("change_target_branch")) { if (issueComment.getType().equalsIgnoreCase("change_target_branch")) {
@ -1097,8 +1122,10 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<RecyclerView.View
TextView start = new TextView(context); TextView start = new TextView(context);
if (!isNightModeThemeDynamic(context)) { if (tinyDB.getInt("themeId") == 8) {
start.setTextColor(AppUtil.dynamicColorResource(context)); if (!isNightModeThemeDynamic(context)) {
start.setTextColor(AppUtil.dynamicColorResource(context));
}
} }
if (issueComment.getType().equalsIgnoreCase("start_tracking")) { if (issueComment.getType().equalsIgnoreCase("start_tracking")) {

View File

@ -79,6 +79,10 @@ public class MainGrammarLocator {
case "sc": case "sc":
return "scala"; return "scala";
case "el":
case "lisp":
return "lisp";
case "yaml": case "yaml":
case "yml": case "yml":
case "properties": // This extension doesn't correspond to YAML, but it's the next best case "properties": // This extension doesn't correspond to YAML, but it's the next best

View File

@ -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");
}
}
}

View File

@ -1,36 +0,0 @@
package org.mian.gitnex.fragments;
import android.content.Intent;
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.activities.MyProfileEmailActivity;
import org.mian.gitnex.databinding.BottomSheetProfileBinding;
/**
* @author M M Arif
*/
public class BottomSheetMyProfileFragment extends BottomSheetDialogFragment {
@Nullable @Override
public View onCreateView(
@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
BottomSheetProfileBinding bottomSheetProfileBinding =
BottomSheetProfileBinding.inflate(inflater, container, false);
bottomSheetProfileBinding.addNewEmailAddress.setOnClickListener(
v1 -> {
startActivity(new Intent(getContext(), MyProfileEmailActivity.class));
dismiss();
});
return bottomSheetProfileBinding.getRoot();
}
}

View File

@ -8,7 +8,6 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment; import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.databinding.BottomSheetOrganizationBinding; import org.mian.gitnex.databinding.BottomSheetOrganizationBinding;
import org.mian.gitnex.structs.BottomSheetListener; import org.mian.gitnex.structs.BottomSheetListener;
@ -17,13 +16,8 @@ import org.mian.gitnex.structs.BottomSheetListener;
*/ */
public class BottomSheetOrganizationFragment extends BottomSheetDialogFragment { public class BottomSheetOrganizationFragment extends BottomSheetDialogFragment {
private final OrganizationPermissions permissions;
private BottomSheetListener bmListener; private BottomSheetListener bmListener;
public BottomSheetOrganizationFragment(OrganizationPermissions org) {
permissions = org;
}
@Nullable @Override @Nullable @Override
public View onCreateView( public View onCreateView(
@NonNull LayoutInflater inflater, @NonNull LayoutInflater inflater,
@ -33,39 +27,6 @@ public class BottomSheetOrganizationFragment extends BottomSheetDialogFragment {
BottomSheetOrganizationBinding bottomSheetOrganizationBinding = BottomSheetOrganizationBinding bottomSheetOrganizationBinding =
BottomSheetOrganizationBinding.inflate(inflater, container, false); 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( bottomSheetOrganizationBinding.copyOrgUrl.setOnClickListener(
v1 -> { v1 -> {
bmListener.onButtonClicked("copyOrgUrl"); bmListener.onButtonClicked("copyOrgUrl");

View File

@ -1,59 +0,0 @@
package org.mian.gitnex.fragments;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
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.BottomSheetOrganizationTeamsBinding;
import org.mian.gitnex.structs.BottomSheetListener;
/**
* @author M M Arif
*/
public class BottomSheetOrganizationTeamsFragment extends BottomSheetDialogFragment {
private BottomSheetListener bmListener;
@Nullable @Override
public View onCreateView(
@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
BottomSheetOrganizationTeamsBinding bottomSheetOrganizationTeamsBinding =
BottomSheetOrganizationTeamsBinding.inflate(inflater, container, false);
bottomSheetOrganizationTeamsBinding.addNewMember.setOnClickListener(
v1 -> {
bmListener.onButtonClicked("newMember");
dismiss();
});
if (!requireArguments().getBoolean("showRepo")) {
bottomSheetOrganizationTeamsBinding.addRepo.setVisibility(View.GONE);
}
bottomSheetOrganizationTeamsBinding.addRepo.setOnClickListener(
v1 -> {
bmListener.onButtonClicked("newRepo");
dismiss();
});
return bottomSheetOrganizationTeamsBinding.getRoot();
}
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
try {
bmListener = (BottomSheetListener) context;
} catch (ClassCastException e) {
Log.e("BsOrganizationTeams", e.toString());
}
}
}

View File

@ -10,12 +10,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment; import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import org.mian.gitnex.actions.RepositoryActions; import org.mian.gitnex.actions.RepositoryActions;
import org.mian.gitnex.activities.BaseActivity;
import org.mian.gitnex.activities.CreateIssueActivity;
import org.mian.gitnex.activities.CreatePullRequestActivity;
import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.databinding.BottomSheetRepoBinding; import org.mian.gitnex.databinding.BottomSheetRepoBinding;
import org.mian.gitnex.helpers.contexts.AccountContext;
import org.mian.gitnex.helpers.contexts.RepositoryContext; import org.mian.gitnex.helpers.contexts.RepositoryContext;
import org.mian.gitnex.structs.BottomSheetListener; import org.mian.gitnex.structs.BottomSheetListener;
@ -40,17 +35,7 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
BottomSheetRepoBinding bottomSheetRepoBinding = BottomSheetRepoBinding bottomSheetRepoBinding =
BottomSheetRepoBinding.inflate(inflater, container, false); BottomSheetRepoBinding.inflate(inflater, container, false);
final Context ctx = getContext();
AccountContext account = ((BaseActivity) requireActivity()).getAccount();
TextView createLabel = bottomSheetRepoBinding.createLabel;
TextView createIssue = bottomSheetRepoBinding.createNewIssue;
TextView createMilestone = bottomSheetRepoBinding.createNewMilestone;
TextView addCollaborator = bottomSheetRepoBinding.addCollaborator;
TextView createRelease = bottomSheetRepoBinding.createRelease;
TextView openWebRepo = bottomSheetRepoBinding.openWebRepo; TextView openWebRepo = bottomSheetRepoBinding.openWebRepo;
TextView newFile = bottomSheetRepoBinding.newFile;
TextView starRepository = bottomSheetRepoBinding.starRepository; TextView starRepository = bottomSheetRepoBinding.starRepository;
TextView unStarRepository = bottomSheetRepoBinding.unStarRepository; TextView unStarRepository = bottomSheetRepoBinding.unStarRepository;
TextView watchRepository = bottomSheetRepoBinding.watchRepository; TextView watchRepository = bottomSheetRepoBinding.watchRepository;
@ -58,73 +43,6 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
TextView shareRepository = bottomSheetRepoBinding.shareRepository; TextView shareRepository = bottomSheetRepoBinding.shareRepository;
TextView copyRepoUrl = bottomSheetRepoBinding.copyRepoUrl; TextView copyRepoUrl = bottomSheetRepoBinding.copyRepoUrl;
TextView repoSettings = bottomSheetRepoBinding.repoSettings; TextView repoSettings = bottomSheetRepoBinding.repoSettings;
TextView createPullRequest = bottomSheetRepoBinding.createPullRequest;
TextView createWiki = bottomSheetRepoBinding.createWiki;
boolean canPush = repository.getPermissions().isPush();
if (!canPush) {
createMilestone.setVisibility(View.GONE);
createLabel.setVisibility(View.GONE);
createRelease.setVisibility(View.GONE);
newFile.setVisibility(View.GONE);
}
if (!account.requiresVersion("1.16")) {
createWiki.setVisibility(View.GONE);
}
boolean archived = repository.getRepository().isArchived();
if (archived) {
createIssue.setVisibility(View.GONE);
createPullRequest.setVisibility(View.GONE);
createMilestone.setVisibility(View.GONE);
createLabel.setVisibility(View.GONE);
createRelease.setVisibility(View.GONE);
newFile.setVisibility(View.GONE);
createWiki.setVisibility(View.GONE);
}
createLabel.setOnClickListener(
v112 -> {
bmListener.onButtonClicked("label");
dismiss();
});
if (repository.getRepository().isHasIssues() && !archived) {
createIssue.setVisibility(View.VISIBLE);
createIssue.setOnClickListener(
v12 -> {
((RepoDetailActivity) requireActivity())
.createIssueLauncher.launch(
repository.getIntent(ctx, CreateIssueActivity.class));
dismiss();
});
} else {
createIssue.setVisibility(View.GONE);
}
if (repository.getRepository().isHasPullRequests() && !archived) {
createPullRequest.setVisibility(View.VISIBLE);
createPullRequest.setOnClickListener(
v12 -> {
((RepoDetailActivity) requireActivity())
.createPrLauncher.launch(
repository.getIntent(ctx, CreatePullRequestActivity.class));
dismiss();
});
} else {
createPullRequest.setVisibility(View.GONE);
}
createMilestone.setOnClickListener(
v13 -> {
bmListener.onButtonClicked("newMilestone");
dismiss();
});
if (repository.getPermissions().isAdmin()) { if (repository.getPermissions().isAdmin()) {
@ -133,31 +51,11 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
bmListener.onButtonClicked("repoSettings"); bmListener.onButtonClicked("repoSettings");
dismiss(); dismiss();
}); });
addCollaborator.setOnClickListener(
v1 -> {
bmListener.onButtonClicked("addCollaborator");
dismiss();
});
createWiki.setOnClickListener(
v1 -> {
bmListener.onButtonClicked("createWiki");
dismiss();
});
} else { } else {
addCollaborator.setVisibility(View.GONE);
repoSettings.setVisibility(View.GONE); repoSettings.setVisibility(View.GONE);
createWiki.setVisibility(View.GONE);
} }
createRelease.setOnClickListener(
v14 -> {
bmListener.onButtonClicked("createRelease");
dismiss();
});
shareRepository.setOnClickListener( shareRepository.setOnClickListener(
v15 -> { v15 -> {
bmListener.onButtonClicked("shareRepo"); bmListener.onButtonClicked("shareRepo");
@ -176,12 +74,6 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
dismiss(); dismiss();
}); });
newFile.setOnClickListener(
v17 -> {
bmListener.onButtonClicked("newFile");
dismiss();
});
if (repository.isStarred()) { if (repository.isStarred()) {
starRepository.setVisibility(View.GONE); starRepository.setVisibility(View.GONE);
@ -191,7 +83,6 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
bmListener.onButtonClicked("unstar"); bmListener.onButtonClicked("unstar");
dismiss(); dismiss();
}); });
} else { } else {
unStarRepository.setVisibility(View.GONE); unStarRepository.setVisibility(View.GONE);
@ -212,7 +103,6 @@ public class BottomSheetRepoFragment extends BottomSheetDialogFragment {
bmListener.onButtonClicked("unwatch"); bmListener.onButtonClicked("unwatch");
dismiss(); dismiss();
}); });
} else { } else {
unWatchRepository.setVisibility(View.GONE); unWatchRepository.setVisibility(View.GONE);

View File

@ -273,7 +273,6 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
binding.closeIssue.setVisibility(View.GONE); binding.closeIssue.setVisibility(View.GONE);
binding.addRemoveAssignees.setVisibility(View.GONE); binding.addRemoveAssignees.setVisibility(View.GONE);
binding.commentReactionButtons.setVisibility(View.GONE); binding.commentReactionButtons.setVisibility(View.GONE);
binding.reactionDivider.setVisibility(View.GONE);
binding.bottomSheetHeaderFrame.setVisibility(View.GONE); binding.bottomSheetHeaderFrame.setVisibility(View.GONE);
binding.mergePullRequest.setVisibility(View.GONE); binding.mergePullRequest.setVisibility(View.GONE);
binding.updatePullRequest.setVisibility(View.GONE); binding.updatePullRequest.setVisibility(View.GONE);

View File

@ -7,6 +7,7 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import org.mian.gitnex.activities.AddCollaboratorToRepositoryActivity;
import org.mian.gitnex.adapters.CollaboratorsAdapter; import org.mian.gitnex.adapters.CollaboratorsAdapter;
import org.mian.gitnex.databinding.FragmentCollaboratorsBinding; import org.mian.gitnex.databinding.FragmentCollaboratorsBinding;
import org.mian.gitnex.helpers.contexts.RepositoryContext; import org.mian.gitnex.helpers.contexts.RepositoryContext;
@ -43,6 +44,19 @@ public class CollaboratorsFragment extends Fragment {
fragmentCollaboratorsBinding = fragmentCollaboratorsBinding =
FragmentCollaboratorsBinding.inflate(inflater, container, false); FragmentCollaboratorsBinding.inflate(inflater, container, false);
if (repository.getPermissions().isAdmin()) {
fragmentCollaboratorsBinding.addCollaborator.setOnClickListener(
v1 -> {
startActivity(
repository.getIntent(
getContext(), AddCollaboratorToRepositoryActivity.class));
});
} else {
fragmentCollaboratorsBinding.addCollaborator.setVisibility(View.GONE);
}
fetchDataAsync(repository.getOwner(), repository.getName()); fetchDataAsync(repository.getOwner(), repository.getName());
return fragmentCollaboratorsBinding.getRoot(); return fragmentCollaboratorsBinding.getRoot();
} }

View File

@ -24,6 +24,7 @@ import moe.feng.common.view.breadcrumbs.DefaultBreadcrumbsCallback;
import moe.feng.common.view.breadcrumbs.model.BreadcrumbItem; import moe.feng.common.view.breadcrumbs.model.BreadcrumbItem;
import org.gitnex.tea4j.v2.models.ContentsResponse; import org.gitnex.tea4j.v2.models.ContentsResponse;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.CreateFileActivity;
import org.mian.gitnex.activities.FileViewActivity; import org.mian.gitnex.activities.FileViewActivity;
import org.mian.gitnex.activities.RepoDetailActivity; import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.adapters.FilesAdapter; import org.mian.gitnex.adapters.FilesAdapter;
@ -69,6 +70,9 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
binding = FragmentFilesBinding.inflate(inflater, container, false); binding = FragmentFilesBinding.inflate(inflater, container, false);
setHasOptionsMenu(true); setHasOptionsMenu(true);
boolean canPush = repository.getPermissions().isPush();
boolean archived = repository.getRepository().isArchived();
filesAdapter = new FilesAdapter(getContext(), this); filesAdapter = new FilesAdapter(getContext(), this);
binding.recyclerView.setHasFixedSize(true); binding.recyclerView.setHasFixedSize(true);
@ -78,10 +82,7 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
binding.breadcrumbsView.setItems( binding.breadcrumbsView.setItems(
new ArrayList<>( new ArrayList<>(
Collections.singletonList( Collections.singletonList(
BreadcrumbItem.createSimpleItem( BreadcrumbItem.createSimpleItem(repository.getBranchRef()))));
getResources().getString(R.string.filesBreadcrumbRoot)
+ getResources().getString(R.string.colonDivider)
+ repository.getBranchRef()))));
// noinspection unchecked // noinspection unchecked
binding.breadcrumbsView.setCallback( binding.breadcrumbsView.setCallback(
new DefaultBreadcrumbsCallback<BreadcrumbItem>() { new DefaultBreadcrumbsCallback<BreadcrumbItem>() {
@ -150,15 +151,7 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
new ArrayList<>( new ArrayList<>(
Collections.singletonList( Collections.singletonList(
BreadcrumbItem.createSimpleItem( BreadcrumbItem.createSimpleItem(
getResources() repository.getBranchRef()))));
.getString(
R.string
.filesBreadcrumbRoot)
+ getResources()
.getString(
R.string
.colonDivider)
+ repository.getBranchRef()))));
refresh(); refresh();
}); });
@ -172,9 +165,26 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
} }
refresh(); refresh();
if (!canPush || archived) {
binding.newFile.setVisibility(View.GONE);
}
binding.newFile.setOnClickListener(
v17 -> startActivity(repository.getIntent(getContext(), CreateFileActivity.class)));
return binding.getRoot(); return binding.getRoot();
} }
@Override
public void onResume() {
super.onResume();
if (RepoDetailActivity.updateFABActions) {
refresh();
RepoDetailActivity.updateFABActions = false;
}
}
@Override @Override
public void onClickFile(ContentsResponse file) { public void onClickFile(ContentsResponse file) {

View File

@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.gitnex.tea4j.v2.models.Issue; import org.gitnex.tea4j.v2.models.Issue;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.CreateIssueActivity;
import org.mian.gitnex.activities.RepoDetailActivity; import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.adapters.IssuesAdapter; import org.mian.gitnex.adapters.IssuesAdapter;
import org.mian.gitnex.clients.RetrofitClient; import org.mian.gitnex.clients.RetrofitClient;
@ -65,6 +66,8 @@ public class IssuesFragment extends Fragment {
repository = RepositoryContext.fromBundle(requireArguments()); repository = RepositoryContext.fromBundle(requireArguments());
boolean archived = repository.getRepository().isArchived();
resultLimit = Constants.getCurrentResultLimit(context); resultLimit = Constants.getCurrentResultLimit(context);
issuesList = new ArrayList<>(); issuesList = new ArrayList<>();
@ -214,6 +217,25 @@ public class IssuesFragment extends Fragment {
repository.getIssueMilestoneFilterName(), repository.getIssueMilestoneFilterName(),
null); null);
if (archived) {
fragmentIssuesBinding.createNewIssue.setVisibility(View.GONE);
}
if (repository.getRepository().isHasIssues() && !archived) {
fragmentIssuesBinding.createNewIssue.setVisibility(View.VISIBLE);
fragmentIssuesBinding.createNewIssue.setOnClickListener(
v12 -> {
((RepoDetailActivity) requireActivity())
.createIssueLauncher.launch(
repository.getIntent(
getContext(), CreateIssueActivity.class));
});
} else {
fragmentIssuesBinding.createNewIssue.setVisibility(View.GONE);
}
return fragmentIssuesBinding.getRoot(); return fragmentIssuesBinding.getRoot();
} }

View File

@ -55,6 +55,9 @@ public class LabelsFragment extends Fragment {
FragmentLabelsBinding.inflate(inflater, container, false); FragmentLabelsBinding.inflate(inflater, container, false);
setHasOptionsMenu(true); setHasOptionsMenu(true);
boolean canPush = repository.getPermissions().isPush();
boolean archived = repository.getRepository().isArchived();
final SwipeRefreshLayout swipeRefresh = fragmentLabelsBinding.pullToRefresh; final SwipeRefreshLayout swipeRefresh = fragmentLabelsBinding.pullToRefresh;
noData = fragmentLabelsBinding.noData; noData = fragmentLabelsBinding.noData;
@ -79,6 +82,15 @@ public class LabelsFragment extends Fragment {
fetchDataAsync(repository.getOwner(), repository.getName()); fetchDataAsync(repository.getOwner(), repository.getName());
if (!canPush || archived) {
fragmentLabelsBinding.createLabel.setVisibility(View.GONE);
}
fragmentLabelsBinding.createLabel.setOnClickListener(
v112 -> {
startActivity(repository.getIntent(getContext(), CreateLabelActivity.class));
});
return fragmentLabelsBinding.getRoot(); return fragmentLabelsBinding.getRoot();
} }

View File

@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.gitnex.tea4j.v2.models.Milestone; import org.gitnex.tea4j.v2.models.Milestone;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.CreateMilestoneActivity;
import org.mian.gitnex.activities.RepoDetailActivity; import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.adapters.MilestonesAdapter; import org.mian.gitnex.adapters.MilestonesAdapter;
import org.mian.gitnex.databinding.FragmentMilestonesBinding; import org.mian.gitnex.databinding.FragmentMilestonesBinding;
@ -62,6 +63,9 @@ public class MilestonesFragment extends Fragment {
Context ctx = getContext(); Context ctx = getContext();
milestonesViewModel = new ViewModelProvider(this).get(MilestonesViewModel.class); milestonesViewModel = new ViewModelProvider(this).get(MilestonesViewModel.class);
boolean canPush = repository.getPermissions().isPush();
boolean archived = repository.getRepository().isArchived();
milestoneId = requireActivity().getIntent().getStringExtra("milestoneId"); milestoneId = requireActivity().getIntent().getStringExtra("milestoneId");
requireActivity().getIntent().removeExtra("milestoneId"); requireActivity().getIntent().removeExtra("milestoneId");
@ -107,10 +111,27 @@ public class MilestonesFragment extends Fragment {
repository.getOwner(), repository.getName(), milestoneState); repository.getOwner(), repository.getName(), milestoneState);
}); });
if (!canPush || archived) {
viewBinding.createNewMilestone.setVisibility(View.GONE);
}
viewBinding.createNewMilestone.setOnClickListener(
v13 -> startActivity(repository.getIntent(ctx, CreateMilestoneActivity.class)));
fetchDataAsync(repository.getOwner(), repository.getName(), state); fetchDataAsync(repository.getOwner(), repository.getName(), state);
return viewBinding.getRoot(); return viewBinding.getRoot();
} }
@Override
public void onResume() {
super.onResume();
if (RepoDetailActivity.updateFABActions) {
fetchDataAsync(repository.getOwner(), repository.getName(), state);
RepoDetailActivity.updateFABActions = false;
}
}
private void fetchDataAsync(String repoOwner, String repoName, String state) { private void fetchDataAsync(String repoOwner, String repoName, String state) {
milestonesViewModel milestonesViewModel

View File

@ -44,6 +44,8 @@ public class MyIssuesFragment extends Fragment {
fragmentIssuesBinding.recyclerView.setHasFixedSize(true); fragmentIssuesBinding.recyclerView.setHasFixedSize(true);
fragmentIssuesBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); fragmentIssuesBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
fragmentIssuesBinding.createNewIssue.setVisibility(View.GONE);
((MainActivity) requireActivity()) ((MainActivity) requireActivity())
.setFragmentRefreshListenerMyIssues( .setFragmentRefreshListenerMyIssues(
myIssues -> { myIssues -> {

View File

@ -1,5 +1,6 @@
package org.mian.gitnex.fragments; package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@ -14,6 +15,7 @@ import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.mian.gitnex.activities.MyProfileEmailActivity;
import org.mian.gitnex.adapters.MyProfileEmailsAdapter; import org.mian.gitnex.adapters.MyProfileEmailsAdapter;
import org.mian.gitnex.databinding.FragmentProfileEmailsBinding; import org.mian.gitnex.databinding.FragmentProfileEmailsBinding;
import org.mian.gitnex.viewmodels.ProfileEmailsViewModel; import org.mian.gitnex.viewmodels.ProfileEmailsViewModel;
@ -62,6 +64,9 @@ public class MyProfileEmailsFragment extends Fragment {
fetchDataAsync(); fetchDataAsync();
fragmentProfileEmailsBinding.addNewEmailAddress.setOnClickListener(
v1 -> startActivity(new Intent(getContext(), MyProfileEmailActivity.class)));
return fragmentProfileEmailsBinding.getRoot(); return fragmentProfileEmailsBinding.getRoot();
} }

View File

@ -5,9 +5,6 @@ import android.graphics.Typeface;
import android.os.Bundle; import android.os.Bundle;
import android.text.Html; import android.text.Html;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
@ -45,7 +42,7 @@ public class MyProfileFragment extends Fragment {
ctx = getContext(); ctx = getContext();
View v = inflater.inflate(R.layout.fragment_profile, container, false); View v = inflater.inflate(R.layout.fragment_profile, container, false);
setHasOptionsMenu(true); setHasOptionsMenu(false);
((MainActivity) requireActivity()) ((MainActivity) requireActivity())
.setActionBarTitle(getResources().getString(R.string.navProfile)); .setActionBarTitle(getResources().getString(R.string.navProfile));
@ -68,31 +65,6 @@ public class MyProfileFragment extends Fragment {
return v; return v;
} }
@Override
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
menu.clear();
requireActivity().getMenuInflater().inflate(R.menu.profile_dotted_menu, menu);
super.onCreateOptionsMenu(menu, inflater);
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
int id = item.getItemId();
if (id == android.R.id.home) {
((MainActivity) ctx).finish();
return true;
} else if (id == R.id.profileMenu) {
BottomSheetMyProfileFragment bottomSheet = new BottomSheetMyProfileFragment();
bottomSheet.show(getChildFragmentManager(), "profileBottomSheet");
return true;
} else {
return super.onOptionsItemSelected(item);
}
}
public void viewData(View v, AccountContext account) { public void viewData(View v, AccountContext account) {
TextView userFullName = v.findViewById(R.id.userFullName); TextView userFullName = v.findViewById(R.id.userFullName);

View File

@ -86,7 +86,14 @@ public class MyRepositoriesFragment extends Fragment {
private void fetchDataAsync(String userLogin) { private void fetchDataAsync(String userLogin) {
repositoriesViewModel repositoriesViewModel
.getRepositories(page, resultLimit, userLogin, "myRepos", null, getContext()) .getRepositories(
page,
resultLimit,
userLogin,
"myRepos",
null,
getContext(),
fragmentRepositoriesBinding)
.observe( .observe(
getViewLifecycleOwner(), getViewLifecycleOwner(),
reposListMain -> { reposListMain -> {

View File

@ -1,5 +1,6 @@
package org.mian.gitnex.fragments; package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@ -14,6 +15,7 @@ import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.activities.CreateLabelActivity; import org.mian.gitnex.activities.CreateLabelActivity;
import org.mian.gitnex.adapters.LabelsAdapter; import org.mian.gitnex.adapters.LabelsAdapter;
import org.mian.gitnex.databinding.FragmentLabelsBinding; import org.mian.gitnex.databinding.FragmentLabelsBinding;
@ -24,21 +26,23 @@ import org.mian.gitnex.viewmodels.OrganizationLabelsViewModel;
*/ */
public class OrganizationLabelsFragment extends Fragment { public class OrganizationLabelsFragment extends Fragment {
private OrganizationPermissions permissions;
private OrganizationLabelsViewModel organizationLabelsViewModel; private OrganizationLabelsViewModel organizationLabelsViewModel;
private ProgressBar mProgressBar; private ProgressBar mProgressBar;
private RecyclerView mRecyclerView; private RecyclerView mRecyclerView;
private LabelsAdapter adapter; private LabelsAdapter adapter;
private TextView noData; private TextView noData;
private static final String repoOwnerF = "param1"; private static final String getOrgName = null;
private String repoOwner;
private final String type = "org"; private final String type = "org";
private String repoOwner; public static OrganizationLabelsFragment newInstance(
String repoOwner, OrganizationPermissions permissions) {
public static OrganizationLabelsFragment newInstance(String param1) {
OrganizationLabelsFragment fragment = new OrganizationLabelsFragment(); OrganizationLabelsFragment fragment = new OrganizationLabelsFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putString(repoOwnerF, param1); args.putString(getOrgName, repoOwner);
args.putSerializable("permissions", permissions);
fragment.setArguments(args); fragment.setArguments(args);
return fragment; return fragment;
} }
@ -50,7 +54,8 @@ public class OrganizationLabelsFragment extends Fragment {
if (getArguments() != null) { if (getArguments() != null) {
repoOwner = getArguments().getString(repoOwnerF); repoOwner = getArguments().getString(getOrgName);
permissions = (OrganizationPermissions) getArguments().getSerializable("permissions");
} }
} }
@ -86,6 +91,18 @@ public class OrganizationLabelsFragment extends Fragment {
fetchDataAsync(repoOwner); 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(); return fragmentLabelsBinding.getRoot();
} }

View File

@ -1,5 +1,6 @@
package org.mian.gitnex.fragments; package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@ -14,8 +15,10 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.R; 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.adapters.ReposListAdapter;
import org.mian.gitnex.databinding.FragmentRepositoriesBinding; import org.mian.gitnex.databinding.FragmentRepositoriesBinding;
import org.mian.gitnex.helpers.Constants; import org.mian.gitnex.helpers.Constants;
@ -26,6 +29,7 @@ import org.mian.gitnex.viewmodels.RepositoriesViewModel;
*/ */
public class OrganizationRepositoriesFragment extends Fragment { public class OrganizationRepositoriesFragment extends Fragment {
private OrganizationPermissions permissions;
private RepositoriesViewModel repositoriesViewModel; private RepositoriesViewModel repositoriesViewModel;
private FragmentRepositoriesBinding fragmentRepositoriesBinding; private FragmentRepositoriesBinding fragmentRepositoriesBinding;
private ReposListAdapter adapter; private ReposListAdapter adapter;
@ -36,10 +40,12 @@ public class OrganizationRepositoriesFragment extends Fragment {
public OrganizationRepositoriesFragment() {} public OrganizationRepositoriesFragment() {}
public static OrganizationRepositoriesFragment newInstance(String orgName) { public static OrganizationRepositoriesFragment newInstance(
String orgName, OrganizationPermissions permissions) {
OrganizationRepositoriesFragment fragment = new OrganizationRepositoriesFragment(); OrganizationRepositoriesFragment fragment = new OrganizationRepositoriesFragment();
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putString(getOrgName, orgName); args.putString(getOrgName, orgName);
args.putSerializable("permissions", permissions);
fragment.setArguments(args); fragment.setArguments(args);
return fragment; return fragment;
} }
@ -49,6 +55,7 @@ public class OrganizationRepositoriesFragment extends Fragment {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
if (getArguments() != null) { if (getArguments() != null) {
orgName = getArguments().getString(getOrgName); orgName = getArguments().getString(getOrgName);
permissions = (OrganizationPermissions) getArguments().getSerializable("permissions");
} }
} }
@ -63,8 +70,6 @@ public class OrganizationRepositoriesFragment extends Fragment {
resultLimit = Constants.getCurrentResultLimit(getContext()); resultLimit = Constants.getCurrentResultLimit(getContext());
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
fragmentRepositoriesBinding.recyclerView.setHasFixedSize(true); fragmentRepositoriesBinding.recyclerView.setHasFixedSize(true);
fragmentRepositoriesBinding.recyclerView.setLayoutManager( fragmentRepositoriesBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext())); new LinearLayoutManager(getContext()));
@ -86,14 +91,35 @@ public class OrganizationRepositoriesFragment extends Fragment {
page = 1; page = 1;
fetchDataAsync(); 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(); return fragmentRepositoriesBinding.getRoot();
} }
;
private void fetchDataAsync() { private void fetchDataAsync() {
repositoriesViewModel repositoriesViewModel
.getRepositories(page, resultLimit, "", "org", orgName, getContext()) .getRepositories(
page,
resultLimit,
"",
"org",
orgName,
getContext(),
fragmentRepositoriesBinding)
.observe( .observe(
getViewLifecycleOwner(), getViewLifecycleOwner(),
reposListMain -> { reposListMain -> {
@ -144,10 +170,10 @@ public class OrganizationRepositoriesFragment extends Fragment {
super.onResume(); super.onResume();
if (MainActivity.reloadRepos) { if (OrganizationDetailActivity.updateOrgFABActions) {
repositoriesViewModel.loadReposList( page = 1;
page, resultLimit, null, "org", orgName, getContext()); fetchDataAsync();
MainActivity.reloadRepos = false; OrganizationDetailActivity.updateOrgFABActions = false;
} }
} }

View File

@ -1,6 +1,7 @@
package org.mian.gitnex.fragments; package org.mian.gitnex.fragments;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -9,9 +10,11 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.gitnex.tea4j.v2.models.Team; import org.gitnex.tea4j.v2.models.Team;
import org.gitnex.tea4j.v2.models.User; import org.gitnex.tea4j.v2.models.User;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.AddNewTeamMemberActivity;
import org.mian.gitnex.adapters.UserGridAdapter; import org.mian.gitnex.adapters.UserGridAdapter;
import org.mian.gitnex.clients.RetrofitClient; import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.databinding.FragmentOrganizationTeamInfoMembersBinding; import org.mian.gitnex.databinding.FragmentOrganizationTeamInfoMembersBinding;
@ -30,6 +33,7 @@ public class OrganizationTeamInfoMembersFragment extends Fragment {
private FragmentOrganizationTeamInfoMembersBinding binding; private FragmentOrganizationTeamInfoMembersBinding binding;
private Team team; private Team team;
private UserGridAdapter adapter; private UserGridAdapter adapter;
public static boolean refreshMembers = false;
public OrganizationTeamInfoMembersFragment() {} public OrganizationTeamInfoMembersFragment() {}
@ -55,9 +59,33 @@ public class OrganizationTeamInfoMembersFragment extends Fragment {
binding.members.setAdapter(adapter); binding.members.setAdapter(adapter);
fetchMembersAsync(); fetchMembersAsync();
OrganizationPermissions 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);
});
return binding.getRoot(); return binding.getRoot();
} }
@Override
public void onResume() {
super.onResume();
if (refreshMembers) {
fetchMembersAsync();
refreshMembers = false;
}
}
private void fetchMembersAsync() { private void fetchMembersAsync() {
Call<List<User>> call = Call<List<User>> call =

View File

@ -1,5 +1,6 @@
package org.mian.gitnex.fragments; package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@ -14,8 +15,10 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.gitnex.tea4j.v2.models.Team; import org.gitnex.tea4j.v2.models.Team;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.AddNewTeamRepoActivity;
import org.mian.gitnex.activities.MainActivity; import org.mian.gitnex.activities.MainActivity;
import org.mian.gitnex.adapters.ReposListAdapter; import org.mian.gitnex.adapters.ReposListAdapter;
import org.mian.gitnex.databinding.FragmentRepositoriesBinding; import org.mian.gitnex.databinding.FragmentRepositoriesBinding;
@ -41,6 +44,7 @@ public class OrganizationTeamInfoReposFragment extends Fragment {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putSerializable("team", team); bundle.putSerializable("team", team);
bundle.putBoolean("showRepo", !team.isIncludesAllRepositories());
fragment.setArguments(bundle); fragment.setArguments(bundle);
return fragment; return fragment;
@ -59,7 +63,7 @@ public class OrganizationTeamInfoReposFragment extends Fragment {
repositoriesViewModel = new ViewModelProvider(this).get(RepositoriesViewModel.class); repositoriesViewModel = new ViewModelProvider(this).get(RepositoriesViewModel.class);
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE); fragmentRepositoriesBinding.addNewRepo.setText(R.string.pageTitleAddRepository);
fragmentRepositoriesBinding.recyclerView.setHasFixedSize(true); fragmentRepositoriesBinding.recyclerView.setHasFixedSize(true);
fragmentRepositoriesBinding.recyclerView.setLayoutManager( fragmentRepositoriesBinding.recyclerView.setLayoutManager(
@ -81,6 +85,23 @@ public class OrganizationTeamInfoReposFragment extends Fragment {
fetchDataAsync(); fetchDataAsync();
OrganizationPermissions 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);
});
return fragmentRepositoriesBinding.getRoot(); return fragmentRepositoriesBinding.getRoot();
} }
@ -88,7 +109,13 @@ public class OrganizationTeamInfoReposFragment extends Fragment {
repositoriesViewModel repositoriesViewModel
.getRepositories( .getRepositories(
page, resultLimit, String.valueOf(team.getId()), "team", null, getContext()) page,
resultLimit,
String.valueOf(team.getId()),
"team",
null,
getContext(),
fragmentRepositoriesBinding)
.observe( .observe(
getViewLifecycleOwner(), getViewLifecycleOwner(),
reposListMain -> { reposListMain -> {

View File

@ -1,5 +1,6 @@
package org.mian.gitnex.fragments; package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@ -20,6 +21,7 @@ import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.gitnex.tea4j.v2.models.OrganizationPermissions; import org.gitnex.tea4j.v2.models.OrganizationPermissions;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.CreateTeamByOrgActivity;
import org.mian.gitnex.adapters.OrganizationTeamsAdapter; import org.mian.gitnex.adapters.OrganizationTeamsAdapter;
import org.mian.gitnex.databinding.FragmentOrganizationTeamsBinding; import org.mian.gitnex.databinding.FragmentOrganizationTeamsBinding;
import org.mian.gitnex.viewmodels.TeamsByOrgViewModel; import org.mian.gitnex.viewmodels.TeamsByOrgViewModel;
@ -96,6 +98,17 @@ public class OrganizationTeamsFragment extends Fragment {
fetchDataAsync(orgName); 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(); return fragmentTeamsByOrgBinding.getRoot();
} }

View File

@ -21,6 +21,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.gitnex.tea4j.v2.models.PullRequest; import org.gitnex.tea4j.v2.models.PullRequest;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.CreatePullRequestActivity;
import org.mian.gitnex.activities.RepoDetailActivity; import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.adapters.PullRequestsAdapter; import org.mian.gitnex.adapters.PullRequestsAdapter;
import org.mian.gitnex.clients.RetrofitClient; import org.mian.gitnex.clients.RetrofitClient;
@ -71,6 +72,7 @@ public class PullRequestsFragment extends Fragment {
resultLimit = Constants.getCurrentResultLimit(context); resultLimit = Constants.getCurrentResultLimit(context);
prList = new ArrayList<>(); prList = new ArrayList<>();
repository = RepositoryContext.fromBundle(requireArguments()); repository = RepositoryContext.fromBundle(requireArguments());
boolean archived = repository.getRepository().isArchived();
swipeRefresh.setOnRefreshListener( swipeRefresh.setOnRefreshListener(
() -> () ->
@ -159,6 +161,25 @@ public class PullRequestsFragment extends Fragment {
repository.getPrState().toString(), repository.getPrState().toString(),
resultLimit); resultLimit);
if (archived) {
fragmentPullRequestsBinding.createPullRequest.setVisibility(View.GONE);
}
if (repository.getRepository().isHasPullRequests() && !archived) {
fragmentPullRequestsBinding.createPullRequest.setVisibility(View.VISIBLE);
fragmentPullRequestsBinding.createPullRequest.setOnClickListener(
v12 -> {
((RepoDetailActivity) requireActivity())
.createPrLauncher.launch(
repository.getIntent(
getContext(), CreatePullRequestActivity.class));
});
} else {
fragmentPullRequestsBinding.createPullRequest.setVisibility(View.GONE);
}
return fragmentPullRequestsBinding.getRoot(); return fragmentPullRequestsBinding.getRoot();
} }

View File

@ -39,6 +39,7 @@ import org.gitnex.tea4j.v2.auth.ApiKeyAuth;
import org.gitnex.tea4j.v2.models.Release; import org.gitnex.tea4j.v2.models.Release;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.activities.BaseActivity; import org.mian.gitnex.activities.BaseActivity;
import org.mian.gitnex.activities.CreateReleaseActivity;
import org.mian.gitnex.activities.RepoDetailActivity; import org.mian.gitnex.activities.RepoDetailActivity;
import org.mian.gitnex.adapters.ReleasesAdapter; import org.mian.gitnex.adapters.ReleasesAdapter;
import org.mian.gitnex.adapters.TagsAdapter; import org.mian.gitnex.adapters.TagsAdapter;
@ -92,6 +93,9 @@ public class ReleasesFragment extends Fragment {
fragmentReleasesBinding.recyclerView.setLayoutManager( fragmentReleasesBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext())); new LinearLayoutManager(getContext()));
boolean canPush = repository.getPermissions().isPush();
boolean archived = repository.getRepository().isArchived();
fragmentReleasesBinding.pullToRefresh.setOnRefreshListener( fragmentReleasesBinding.pullToRefresh.setOnRefreshListener(
() -> () ->
new Handler(Looper.getMainLooper()) new Handler(Looper.getMainLooper())
@ -136,9 +140,28 @@ public class ReleasesFragment extends Fragment {
fragmentReleasesBinding.progressBar.setVisibility(View.VISIBLE); fragmentReleasesBinding.progressBar.setVisibility(View.VISIBLE);
}); });
if (!canPush || archived) {
fragmentReleasesBinding.createRelease.setVisibility(View.GONE);
}
fragmentReleasesBinding.createRelease.setOnClickListener(
v14 ->
startActivity(
repository.getIntent(getContext(), CreateReleaseActivity.class)));
return fragmentReleasesBinding.getRoot(); return fragmentReleasesBinding.getRoot();
} }
@Override
public void onResume() {
super.onResume();
if (RepoDetailActivity.updateFABActions) {
fetchDataAsync(repository.getOwner(), repository.getName());
RepoDetailActivity.updateFABActions = false;
}
}
private void fetchDataAsync(String owner, String repo) { private void fetchDataAsync(String owner, String repo) {
ReleasesViewModel releasesModel = new ViewModelProvider(this).get(ReleasesViewModel.class); ReleasesViewModel releasesModel = new ViewModelProvider(this).get(ReleasesViewModel.class);

View File

@ -57,9 +57,6 @@ public class RepositoriesFragment extends Fragment {
fragmentRepositoriesBinding.recyclerView.setLayoutManager( fragmentRepositoriesBinding.recyclerView.setLayoutManager(
new LinearLayoutManager(getContext())); new LinearLayoutManager(getContext()));
fragmentRepositoriesBinding.recyclerView.setPadding(0, 0, 0, 220);
fragmentRepositoriesBinding.recyclerView.setClipToPadding(false);
fragmentRepositoriesBinding.pullToRefresh.setOnRefreshListener( fragmentRepositoriesBinding.pullToRefresh.setOnRefreshListener(
() -> () ->
new Handler(Looper.getMainLooper()) new Handler(Looper.getMainLooper())
@ -82,7 +79,14 @@ public class RepositoriesFragment extends Fragment {
private void fetchDataAsync() { private void fetchDataAsync() {
repositoriesViewModel repositoriesViewModel
.getRepositories(page, resultLimit, null, "repos", null, getContext()) .getRepositories(
page,
resultLimit,
null,
"repos",
null,
getContext(),
fragmentRepositoriesBinding)
.observe( .observe(
getViewLifecycleOwner(), getViewLifecycleOwner(),
reposListMain -> { reposListMain -> {

View File

@ -82,6 +82,14 @@ public class SettingsFragment extends Fragment {
fragmentSettingsBinding.aboutAppFrame.setOnClickListener(aboutApp -> showAboutAppDialog()); fragmentSettingsBinding.aboutAppFrame.setOnClickListener(aboutApp -> showAboutAppDialog());
fragmentSettingsBinding.navLogout.setOnClickListener(
logout -> {
AppUtil.logout(ctx);
requireActivity()
.overridePendingTransition(
android.R.anim.fade_in, android.R.anim.fade_out);
});
return fragmentSettingsBinding.getRoot(); return fragmentSettingsBinding.getRoot();
} }

View File

@ -82,7 +82,14 @@ public class StarredRepositoriesFragment extends Fragment {
private void fetchDataAsync() { private void fetchDataAsync() {
repositoriesViewModel repositoriesViewModel
.getRepositories(page, resultLimit, "", "starredRepos", null, getContext()) .getRepositories(
page,
resultLimit,
"",
"starredRepos",
null,
getContext(),
fragmentRepositoriesBinding)
.observe( .observe(
getViewLifecycleOwner(), getViewLifecycleOwner(),
reposListMain -> { reposListMain -> {

View File

@ -1,5 +1,6 @@
package org.mian.gitnex.fragments; package org.mian.gitnex.fragments;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@ -10,9 +11,12 @@ import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import org.mian.gitnex.activities.BaseActivity;
import org.mian.gitnex.activities.WikiActivity;
import org.mian.gitnex.adapters.WikiListAdapter; import org.mian.gitnex.adapters.WikiListAdapter;
import org.mian.gitnex.databinding.FragmentWikiBinding; import org.mian.gitnex.databinding.FragmentWikiBinding;
import org.mian.gitnex.helpers.Constants; import org.mian.gitnex.helpers.Constants;
import org.mian.gitnex.helpers.contexts.AccountContext;
import org.mian.gitnex.helpers.contexts.RepositoryContext; import org.mian.gitnex.helpers.contexts.RepositoryContext;
import org.mian.gitnex.viewmodels.WikiViewModel; import org.mian.gitnex.viewmodels.WikiViewModel;
@ -49,6 +53,9 @@ public class WikiFragment extends Fragment {
fragmentWikiBinding = FragmentWikiBinding.inflate(inflater, container, false); fragmentWikiBinding = FragmentWikiBinding.inflate(inflater, container, false);
setHasOptionsMenu(true); setHasOptionsMenu(true);
AccountContext account = ((BaseActivity) requireActivity()).getAccount();
boolean archived = repository.getRepository().isArchived();
wikiViewModel = new ViewModelProvider(this).get(WikiViewModel.class); wikiViewModel = new ViewModelProvider(this).get(WikiViewModel.class);
resultLimit = Constants.getCurrentResultLimit(getContext()); resultLimit = Constants.getCurrentResultLimit(getContext());
@ -72,6 +79,28 @@ public class WikiFragment extends Fragment {
fetchDataAsync(repository.getOwner(), repository.getName()); fetchDataAsync(repository.getOwner(), repository.getName());
if (!account.requiresVersion("1.16")) {
fragmentWikiBinding.createWiki.setVisibility(View.GONE);
}
if (archived) {
fragmentWikiBinding.createWiki.setVisibility(View.GONE);
}
if (repository.getPermissions().isAdmin()) {
fragmentWikiBinding.createWiki.setOnClickListener(
v1 -> {
Intent intent = new Intent(getContext(), WikiActivity.class);
intent.putExtra("action", "add");
intent.putExtra(RepositoryContext.INTENT_EXTRA, (repository));
startActivity(intent);
});
} else {
fragmentWikiBinding.createWiki.setVisibility(View.GONE);
}
return fragmentWikiBinding.getRoot(); return fragmentWikiBinding.getRoot();
} }

View File

@ -665,16 +665,10 @@ public class AppUtil {
} }
public static boolean isNightModeThemeDynamic(Context context) { public static boolean isNightModeThemeDynamic(Context context) {
TinyDB tinyDB = TinyDB.getInstance(context);
int nightModeFlags = int nightModeFlags =
context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; context.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
if (tinyDB.getInt("themeId") == 8) { return nightModeFlags == Configuration.UI_MODE_NIGHT_YES;
return nightModeFlags == Configuration.UI_MODE_NIGHT_YES;
} else {
return nightModeFlags == Configuration.UI_MODE_NIGHT_NO;
}
} }
public static int dynamicColorResource(Context context) { public static int dynamicColorResource(Context context) {

View File

@ -168,6 +168,7 @@ public class Markdown {
private Context context; private Context context;
private String markdown; private String markdown;
private TextView textView; private TextView textView;
TinyDB tinyDB = TinyDB.getInstance(null);
public Renderer(Slot slot) { public Renderer(Slot slot) {
@ -208,6 +209,12 @@ public class Markdown {
if (tf == null) { if (tf == null) {
tf = AppUtil.getTypeface(textView.getContext()); tf = AppUtil.getTypeface(textView.getContext());
} }
if (tinyDB.getInt("themeId") == 8) {
if (!isNightModeThemeDynamic(context)) {
textView.setTextColor(
AppUtil.dynamicColorResource(context));
}
}
textView.setTypeface(tf); textView.setTypeface(tf);
super.beforeSetText(textView, markdown); super.beforeSetText(textView, markdown);
} }
@ -308,6 +315,7 @@ public class Markdown {
private RecyclerView recyclerView; private RecyclerView recyclerView;
private MarkwonAdapter adapter; private MarkwonAdapter adapter;
private RepositoryContext repository; private RepositoryContext repository;
TinyDB tinyDB = TinyDB.getInstance(null);
private LinkPostProcessor linkPostProcessor; private LinkPostProcessor linkPostProcessor;
@ -367,11 +375,13 @@ public class Markdown {
if (tf == null) { if (tf == null) {
tf = AppUtil.getTypeface(context); tf = AppUtil.getTypeface(context);
} }
textView.setTypeface(tf); if (tinyDB.getInt("themeId") == 8) {
if (!isNightModeThemeDynamic(context)) { if (!isNightModeThemeDynamic(context)) {
textView.setTextColor( textView.setTextColor(
AppUtil.dynamicColorResource(context)); AppUtil.dynamicColorResource(context));
}
} }
textView.setTypeface(tf);
super.beforeSetText(textView, markdown); super.beforeSetText(textView, markdown);
} }

View File

@ -34,7 +34,8 @@ public abstract class Language {
new TypeScriptLanguage(), new TypeScriptLanguage(),
new JsonLanguage(), new JsonLanguage(),
new CppLanguage(), new CppLanguage(),
new CLanguage() new CLanguage(),
new LispLanguage()
}; };
for (Language l : languagesArray) { for (Language l : languagesArray) {
languages.put(l.getName().toUpperCase(), l); languages.put(l.getName().toUpperCase(), l);

View File

@ -0,0 +1,118 @@
package org.mian.gitnex.helpers.codeeditor.languages;
import com.amrdeveloper.codeview.Code;
import com.amrdeveloper.codeview.Keyword;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
/**
* @author M M Arif
*/
public class LispLanguage extends Language {
// Brackets and Colons
private static final Pattern PATTERN_BUILTINS = Pattern.compile("[,:;[->]{}()]");
// Data
private static final Pattern PATTERN_NUMBERS = Pattern.compile("\\b(\\d*[.]?\\d+)\\b");
private static final Pattern PATTERN_CHAR = Pattern.compile("['](.*?)[']");
private static final Pattern PATTERN_STRING = Pattern.compile("[\"](.*?)[\"]");
private static final Pattern PATTERN_HEX = Pattern.compile("0x[0-9a-fA-F]+");
private static final Pattern PATTERN_SINGLE_LINE_COMMENT = Pattern.compile("(//|#)[^\\n]*");
private static final Pattern PATTERN_MULTI_LINE_COMMENT =
Pattern.compile("/\\*[^*]*\\*+(?:[^/*][^*]*\\*+)*/");
private static final Pattern PATTERN_TODO_COMMENT =
Pattern.compile("(//|#)\\s?(TODO|todo)\\s[^\\n]*");
private static final Pattern PATTERN_ATTRIBUTE = Pattern.compile("(?<=->)[a-zA-Z0-9_]+");
private static final Pattern PATTERN_OPERATION =
Pattern.compile(
":|==|>|<|!=|>=|<=|->|=|>|<|%|-|-=|%=|\\+|\\-|\\-=|\\+=|\\^|\\&|\\|::|\\?|\\*");
public static String getCommentStart() {
return ";;;";
}
public static String getCommentEnd() {
return "";
}
@Override
public Pattern getPattern(LanguageElement element) {
switch (element) {
case KEYWORD:
return Pattern.compile("\\b(" + String.join("|", getKeywords()) + ")\\b");
case BUILTIN:
return PATTERN_BUILTINS;
case NUMBER:
return PATTERN_NUMBERS;
case CHAR:
return PATTERN_CHAR;
case STRING:
return PATTERN_STRING;
case HEX:
return PATTERN_HEX;
case SINGLE_LINE_COMMENT:
return PATTERN_SINGLE_LINE_COMMENT;
case MULTI_LINE_COMMENT:
return PATTERN_MULTI_LINE_COMMENT;
case ATTRIBUTE:
return PATTERN_ATTRIBUTE;
case OPERATION:
return PATTERN_OPERATION;
case TODO_COMMENT:
return PATTERN_TODO_COMMENT;
case GENERIC:
default:
return null;
}
}
@Override
public String[] getKeywords() {
return new String[] {
"integer",
"float",
"cons",
"symbol",
"string",
"vector",
"hash-table",
"subr",
"byte-code",
"record",
"buffer"
};
}
@Override
public List<Code> getCodeList() {
List<Code> codeList = new ArrayList<>();
String[] keywords = getKeywords();
for (String keyword : keywords) {
codeList.add(new Keyword(keyword));
}
return codeList;
}
@Override
public String getName() {
return "Lisp";
}
@Override
public Set<Character> getIndentationStarts() {
Set<Character> characterSet = new HashSet<>();
characterSet.add('{');
return characterSet;
}
@Override
public Set<Character> getIndentationEnds() {
Set<Character> characterSet = new HashSet<>();
characterSet.add('}');
return characterSet;
}
}

View File

@ -1,6 +1,7 @@
package org.mian.gitnex.viewmodels; package org.mian.gitnex.viewmodels;
import android.content.Context; import android.content.Context;
import android.view.View;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData; import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;
@ -10,6 +11,7 @@ import org.gitnex.tea4j.v2.models.Repository;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.adapters.ReposListAdapter; import org.mian.gitnex.adapters.ReposListAdapter;
import org.mian.gitnex.clients.RetrofitClient; import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.databinding.FragmentRepositoriesBinding;
import org.mian.gitnex.helpers.Toasty; import org.mian.gitnex.helpers.Toasty;
import retrofit2.Call; import retrofit2.Call;
import retrofit2.Callback; import retrofit2.Callback;
@ -23,16 +25,29 @@ public class RepositoriesViewModel extends ViewModel {
private MutableLiveData<List<Repository>> reposList; private MutableLiveData<List<Repository>> reposList;
public LiveData<List<Repository>> getRepositories( public LiveData<List<Repository>> getRepositories(
int page, int resultLimit, String userLogin, String type, String orgName, Context ctx) { int page,
int resultLimit,
String userLogin,
String type,
String orgName,
Context ctx,
FragmentRepositoriesBinding fragmentRepositoriesBinding) {
reposList = new MutableLiveData<>(); reposList = new MutableLiveData<>();
loadReposList(page, resultLimit, userLogin, type, orgName, ctx); loadReposList(
page, resultLimit, userLogin, type, orgName, ctx, fragmentRepositoriesBinding);
return reposList; return reposList;
} }
public void loadReposList( public void loadReposList(
int page, int resultLimit, String userLogin, String type, String orgName, Context ctx) { int page,
int resultLimit,
String userLogin,
String type,
String orgName,
Context ctx,
FragmentRepositoriesBinding fragmentRepositoriesBinding) {
Call<List<Repository>> call; Call<List<Repository>> call;
@ -72,6 +87,9 @@ public class RepositoriesViewModel extends ViewModel {
if (response.code() == 200) { if (response.code() == 200) {
reposList.postValue(response.body()); reposList.postValue(response.body());
} }
} 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)); Toasty.error(ctx, ctx.getString(R.string.genericError));
} }

View File

@ -10,7 +10,7 @@
android:top="2dp"> android:top="2dp">
<shape> <shape>
<corners android:radius="10dp"/> <corners android:radius="10dp"/>
<solid android:color="?attr/inputBackgroundColor"/> <solid android:color="?attr/primaryBackgroundColor"/>
</shape> </shape>
</item> </item>

View File

@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<corners android:radius="@dimen/dimen8dp"/> <corners android:radius="@dimen/dimen12dp"/>
<solid android:color="@color/releasePre"/> <solid android:color="?attr/materialCardBackgroundColor"/>
</shape> </shape>

View File

@ -4,7 +4,7 @@
<corners android:radius="8dp"/> <corners android:radius="8dp"/>
<solid <solid
android:color="?attr/iconsColor"/> android:color="?attr/primaryTextColor"/>
<padding <padding
android:bottom="2dp" android:bottom="2dp"
android:left="5dp" android:left="5dp"

View File

@ -145,7 +145,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/addNewAccountText" android:text="@string/addNewAccountText"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>

View File

@ -30,7 +30,7 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:focusable="true" android:focusable="true"
android:clickable="true" android:clickable="true"
android:src="@drawable/ic_close"/> android:src="@drawable/ic_close" />
<TextView <TextView
android:id="@+id/toolbarTitle" android:id="@+id/toolbarTitle"
@ -40,7 +40,7 @@
android:text="@string/adminCron" android:text="@string/adminCron"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:maxLines="1" android:maxLines="1"
android:textSize="@dimen/dimen20sp"/> android:textSize="@dimen/dimen20sp" />
</com.google.android.material.appbar.MaterialToolbar> </com.google.android.material.appbar.MaterialToolbar>
@ -61,7 +61,7 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView" android:id="@+id/recyclerView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@ -74,7 +74,7 @@
android:layout_marginTop="@dimen/dimen56dp" android:layout_marginTop="@dimen/dimen56dp"
android:indeterminate="true" android:indeterminate="true"
style="@style/Widget.Material3.LinearProgressIndicator" style="@style/Widget.Material3.LinearProgressIndicator"
app:indicatorColor="?attr/progressIndicatorColor"/> app:indicatorColor="?attr/progressIndicatorColor" />
<TextView <TextView
android:id="@+id/noData" android:id="@+id/noData"
@ -85,6 +85,6 @@
android:text="@string/noDataFound" android:text="@string/noDataFound"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen20sp" android:textSize="@dimen/dimen20sp"
android:visibility="gone"/> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
@ -21,7 +22,9 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" 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> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@ -51,7 +54,7 @@
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:focusable="true" android:focusable="true"
android:clickable="true" android:clickable="true"
android:src="@drawable/ic_close"/> android:src="@drawable/ic_close" />
<TextView <TextView
android:id="@+id/toolbar_title" android:id="@+id/toolbar_title"
@ -64,7 +67,7 @@
android:scrollbars="horizontal" android:scrollbars="horizontal"
android:singleLine="true" android:singleLine="true"
android:layout_marginEnd="@dimen/dimen20dp" android:layout_marginEnd="@dimen/dimen20dp"
android:textSize="@dimen/dimen20sp"/> android:textSize="@dimen/dimen20sp" />
</com.google.android.material.appbar.MaterialToolbar> </com.google.android.material.appbar.MaterialToolbar>
@ -77,7 +80,7 @@
android:layout_marginTop="@dimen/dimen56dp" android:layout_marginTop="@dimen/dimen56dp"
android:indeterminate="true" android:indeterminate="true"
style="@style/Widget.Material3.LinearProgressIndicator" style="@style/Widget.Material3.LinearProgressIndicator"
app:indicatorColor="?attr/progressIndicatorColor"/> app:indicatorColor="?attr/progressIndicatorColor" />
<TextView <TextView
android:id="@+id/no_data_users" android:id="@+id/no_data_users"
@ -88,6 +91,19 @@
android:text="@string/noDataFound" android:text="@string/noDataFound"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen20sp" 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/materialCardBackgroundColor"
app:iconTint="?attr/materialCardBackgroundColor"
android:backgroundTint="?attr/fabColor"
app:icon="@drawable/ic_add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -192,7 +192,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newFileButtonCopy" android:text="@string/newFileButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -240,7 +240,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>

View File

@ -95,7 +95,7 @@
android:textSize="@dimen/dimen16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle" style="?attr/materialCardViewElevatedStyle"
android:layout_width="@dimen/dimen28dp" android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen28dp" android:layout_height="@dimen/dimen28dp"
app:cardCornerRadius="@dimen/dimen16dp" app:cardCornerRadius="@dimen/dimen16dp"
@ -117,7 +117,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -161,7 +161,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -171,7 +171,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -76,7 +76,7 @@
android:id="@+id/markdown_preview" android:id="@+id/markdown_preview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textIsSelectable="true" android:textIsSelectable="true"
android:textSize="@dimen/dimen16sp" /> android:textSize="@dimen/dimen16sp" />

View File

@ -122,7 +122,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -265,7 +265,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -203,7 +203,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
@ -212,7 +212,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/create_tag" android:text="@string/create_tag"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -153,7 +153,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -186,7 +186,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy" android:text="@string/newCreateButtonCopy"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -49,7 +49,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen24dp" android:layout_marginTop="@dimen/dimen24dp"
android:text="@string/addNewAccountText" android:text="@string/addNewAccountText"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>
@ -59,7 +59,7 @@
android:layout_height="@dimen/dimen60dp" android:layout_height="@dimen/dimen60dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/openWebRepo" android:text="@string/openWebRepo"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
@ -68,7 +68,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/launchApp" android:text="@string/launchApp"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>
@ -99,7 +99,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen24dp" android:layout_marginTop="@dimen/dimen24dp"
android:text="@string/navRepos" android:text="@string/navRepos"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>
@ -109,7 +109,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/navOrg" android:text="@string/navOrg"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>
@ -119,7 +119,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/pageTitleNotifications" android:text="@string/pageTitleNotifications"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>
@ -129,7 +129,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/pageTitleExplore" android:text="@string/pageTitleExplore"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>
@ -139,7 +139,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/launchApp" android:text="@string/launchApp"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold"/> android:textStyle="bold"/>

View File

@ -182,7 +182,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/saveButton" android:text="@string/saveButton"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -61,9 +61,9 @@
android:backgroundTint="?attr/fabColor" android:backgroundTint="?attr/fabColor"
android:contentDescription="@string/commentButtonText" android:contentDescription="@string/commentButtonText"
android:text="@string/commentButtonText" android:text="@string/commentButtonText"
android:textColor="@color/colorWhite" android:textColor="?attr/materialCardBackgroundColor"
app:icon="@drawable/ic_reply" app:iconTint="?attr/materialCardBackgroundColor"
app:iconTint="@color/colorWhite" /> app:icon="@drawable/ic_reply" />
<RelativeLayout <RelativeLayout
android:id="@+id/relativeMainLayoutFrame" android:id="@+id/relativeMainLayoutFrame"
@ -93,7 +93,7 @@
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/titleCard" android:id="@+id/titleCard"
style="?attr/materialCardViewFilledStyle" style="?attr/materialCardViewElevatedStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen12dp" android:layout_marginBottom="@dimen/dimen12dp"
@ -122,7 +122,7 @@
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/mainThreadCard" android:id="@+id/mainThreadCard"
style="?attr/materialCardViewFilledStyle" style="?attr/materialCardViewElevatedStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/titleCard" android:layout_below="@+id/titleCard"
@ -144,7 +144,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle" style="?attr/materialCardViewElevatedStyle"
android:layout_width="@dimen/dimen24dp" android:layout_width="@dimen/dimen24dp"
android:layout_height="@dimen/dimen24dp" android:layout_height="@dimen/dimen24dp"
app:cardCornerRadius="@dimen/dimen12dp" app:cardCornerRadius="@dimen/dimen12dp"

View File

@ -235,7 +235,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/btnLogin" android:text="@string/btnLogin"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
<TextView <TextView

View File

@ -48,7 +48,7 @@
android:id="@+id/nav_view" android:id="@+id/nav_view"
app:headerLayout="@layout/nav_header" app:headerLayout="@layout/nav_header"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
app:itemIconTint="?attr/primaryTextColor" app:itemIconTint="?attr/iconsColor"
app:itemTextColor="?attr/primaryTextColor" app:itemTextColor="?attr/primaryTextColor"
app:menu="@menu/drawer_menu"/> app:menu="@menu/drawer_menu"/>

View File

@ -187,7 +187,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/mergePullRequestButtonText" android:text="@string/mergePullRequestButtonText"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
<TextView <TextView

View File

@ -85,7 +85,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp" android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/saveButton" android:text="@string/saveButton"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/> android:textStyle="bold"/>
</LinearLayout> </LinearLayout>

View File

@ -36,7 +36,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/addButton" android:text="@string/pageTitleAddRepository"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:maxLines="1" android:maxLines="1"
android:textSize="@dimen/dimen20sp"/> android:textSize="@dimen/dimen20sp"/>

View File

@ -12,7 +12,7 @@
android:text="@string/pageTitleIssues" android:text="@string/pageTitleIssues"
android:textColor="@color/lightGray" android:textColor="@color/lightGray"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
app:textAllCaps="true"/> app:textAllCaps="true" />
<TextView <TextView
android:id="@+id/counterBadgeIssue" android:id="@+id/counterBadgeIssue"
@ -24,7 +24,7 @@
android:background="@drawable/shape_badge_background" android:background="@drawable/shape_badge_background"
android:gravity="center" android:gravity="center"
android:text="@string/infoTabRepoZero" android:text="@string/infoTabRepoZero"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryBackgroundColor"
android:textSize="@dimen/dimen12sp"/> android:textSize="@dimen/dimen12sp" />
</RelativeLayout> </RelativeLayout>

View File

@ -15,7 +15,7 @@
android:paddingStart="@dimen/dimen4dp" android:paddingStart="@dimen/dimen4dp"
android:paddingEnd="@dimen/dimen4dp" android:paddingEnd="@dimen/dimen4dp"
android:singleLine="true" android:singleLine="true"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryBackgroundColor"
android:textSize="@dimen/dimen12sp" android:textSize="@dimen/dimen12sp"
android:visibility="gone" /> android:visibility="gone" />

View File

@ -23,7 +23,7 @@
android:layout_marginStart="@dimen/dimen8dp" android:layout_marginStart="@dimen/dimen8dp"
android:background="@drawable/shape_badge_background" android:background="@drawable/shape_badge_background"
android:text="@string/infoTabRepoZero" android:text="@string/infoTabRepoZero"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryBackgroundColor"
android:textSize="@dimen/dimen12sp"/> android:textSize="@dimen/dimen12sp"/>
</LinearLayout> </LinearLayout>

View File

@ -23,7 +23,7 @@
android:layout_marginStart="@dimen/dimen8dp" android:layout_marginStart="@dimen/dimen8dp"
android:background="@drawable/shape_badge_background" android:background="@drawable/shape_badge_background"
android:text="@string/infoTabRepoZero" android:text="@string/infoTabRepoZero"
android:textColor="@color/colorWhite" android:textColor="?attr/primaryBackgroundColor"
android:textSize="@dimen/dimen12sp"/> android:textSize="@dimen/dimen12sp"/>
</LinearLayout> </LinearLayout>

View File

@ -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>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/draftsHeader" android:text="@string/draftsHeader"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/draftsSection" android:id="@+id/draftsSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,14 +65,14 @@
<TextView <TextView
android:id="@+id/deleteAllDrafts" android:id="@+id/deleteAllDrafts"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuDeleteText" android:text="@string/menuDeleteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_delete" app:drawableTopCompat="@drawable/ic_delete"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -5,8 +5,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -22,7 +22,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -31,7 +31,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/file" android:text="@string/file"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" /> android:textSize="@dimen/dimen16sp" />
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -39,7 +56,7 @@
android:id="@+id/filesSection" android:id="@+id/filesSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -47,97 +64,79 @@
<TextView <TextView
android:id="@+id/editFile" android:id="@+id/editFile"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuEditText" android:text="@string/menuEditText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_edit" app:drawableTopCompat="@drawable/ic_edit"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/deleteFile" android:id="@+id/deleteFile"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuDeleteText" android:text="@string/menuDeleteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_delete" app:drawableTopCompat="@drawable/ic_delete"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/downloadFile" android:id="@+id/downloadFile"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/download" android:text="@string/download"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_download" app:drawableTopCompat="@drawable/ic_download"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
</com.google.android.flexbox.FlexboxLayout>
<View
android:id="@+id/file_viewer_divider"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_marginBottom="16dp"
android:background="?attr/dividerColor" />
<com.google.android.flexbox.FlexboxLayout
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 <TextView
android:id="@+id/copy_url" android:id="@+id/copy_url"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="8dp" android:padding="@dimen/dimen4dp"
android:text="@string/genericCopyUrl" android:text="@string/genericCopyUrl"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_copy" app:drawableTopCompat="@drawable/ic_copy"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/share" android:id="@+id/share"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="8dp" android:padding="@dimen/dimen4dp"
android:text="@string/share" android:text="@string/share"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_share" app:drawableTopCompat="@drawable/ic_share"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/open" android:id="@+id/open"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="8dp" android:padding="@dimen/dimen4dp"
android:text="@string/openInBrowser" android:text="@string/openInBrowser"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_browser" app:drawableTopCompat="@drawable/ic_browser"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -22,23 +22,15 @@
android:id="@+id/commentReactionButtons" android:id="@+id/commentReactionButtons"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="5dp" android:layout_marginBottom="@dimen/dimen8dp"
android:orientation="horizontal"/> android:orientation="horizontal"/>
<View
android:id="@+id/reactionDivider"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="16dp"
android:background="?attr/dividerColor"/>
<LinearLayout <LinearLayout
android:id="@+id/issueComments" android:id="@+id/issueComments"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -47,7 +39,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/commentButtonText" android:text="@string/commentButtonText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -55,7 +64,7 @@
android:id="@+id/issueCommentsSection" android:id="@+id/issueCommentsSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -63,53 +72,53 @@
<TextView <TextView
android:id="@+id/commentMenuEdit" android:id="@+id/commentMenuEdit"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuEditText" android:text="@string/menuEditText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_edit" app:drawableTopCompat="@drawable/ic_edit"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/commentMenuDelete" android:id="@+id/commentMenuDelete"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuDeleteText" android:text="@string/menuDeleteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_delete" app:drawableTopCompat="@drawable/ic_delete"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/commentMenuQuote" android:id="@+id/commentMenuQuote"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuQuoteText" android:text="@string/menuQuoteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_comment" app:drawableTopCompat="@drawable/ic_comment"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/commentMenuCopy" android:id="@+id/commentMenuCopy"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuCopyText" android:text="@string/menuCopyText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_copy" app:drawableTopCompat="@drawable/ic_copy"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
@ -118,15 +127,15 @@
<View <View
android:id="@+id/commentDivider" android:id="@+id/commentDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="4dp" android:layout_height="@dimen/dimen4dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="@dimen/dimen16dp"
android:background="?attr/dividerColor"/> android:background="?attr/dividerColor"/>
<com.google.android.flexbox.FlexboxLayout <com.google.android.flexbox.FlexboxLayout
android:id="@+id/issueOtherSection" android:id="@+id/issueOtherSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -134,40 +143,40 @@
<TextView <TextView
android:id="@+id/issueCommentCopyUrl" android:id="@+id/issueCommentCopyUrl"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/genericCopyUrl" android:text="@string/genericCopyUrl"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_link" app:drawableTopCompat="@drawable/ic_link"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/issueCommentShare" android:id="@+id/issueCommentShare"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/share" android:text="@string/share"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_share" app:drawableTopCompat="@drawable/ic_share"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/open" android:id="@+id/open"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/openInBrowser" android:text="@string/openInBrowser"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_browser" app:drawableTopCompat="@drawable/ic_browser"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/strFilter" android:text="@string/strFilter"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/issuesFilterSection" android:id="@+id/issuesFilterSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,40 +65,40 @@
<TextView <TextView
android:id="@+id/filterByMilestone" android:id="@+id/filterByMilestone"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/newIssueMilestoneTitle" android:text="@string/newIssueMilestoneTitle"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_milestone" app:drawableTopCompat="@drawable/ic_milestone"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/openIssues" android:id="@+id/openIssues"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isOpen" android:text="@string/isOpen"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_issue" app:drawableTopCompat="@drawable/ic_issue"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/closedIssues" android:id="@+id/closedIssues"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isClosed" android:text="@string/isClosed"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_issue_closed" app:drawableTopCompat="@drawable/ic_issue_closed"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/labelName" android:text="@string/labelName"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp" />
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/labelsListSection" android:id="@+id/labelsListSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,29 +65,29 @@
<TextView <TextView
android:id="@+id/labelMenuEdit" android:id="@+id/labelMenuEdit"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuEditText" android:text="@string/menuEditText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_edit" app:drawableTopCompat="@drawable/ic_edit"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/labelMenuDelete" android:id="@+id/labelMenuDelete"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuDeleteText" android:text="@string/menuDeleteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_delete" app:drawableTopCompat="@drawable/ic_delete"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
</com.google.android.flexbox.FlexboxLayout> </com.google.android.flexbox.FlexboxLayout>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/strFilter" android:text="@string/strFilter"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/milestonesFilterSection" android:id="@+id/milestonesFilterSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,27 +65,27 @@
<TextView <TextView
android:id="@+id/openMilestone" android:id="@+id/openMilestone"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isOpen" android:text="@string/isOpen"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_milestone" app:drawableTopCompat="@drawable/ic_milestone"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/closedMilestone" android:id="@+id/closedMilestone"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isClosed" android:text="@string/isClosed"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_done" app:drawableTopCompat="@drawable/ic_done"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/newIssueMilestoneTitle" android:text="@string/newIssueMilestoneTitle"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/milestonesListSection" android:id="@+id/milestonesListSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,27 +65,27 @@
<TextView <TextView
android:id="@+id/closeMilestone" android:id="@+id/closeMilestone"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/close" android:text="@string/close"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_close" app:drawableTopCompat="@drawable/ic_close"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/openMilestone" android:id="@+id/openMilestone"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isOpen" android:text="@string/isOpen"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_check" app:drawableTopCompat="@drawable/ic_check"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/strFilter" android:text="@string/strFilter"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/myIssuesSection" android:id="@+id/myIssuesSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,40 +65,40 @@
<TextView <TextView
android:id="@+id/openMyIssues" android:id="@+id/openMyIssues"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isOpen" android:text="@string/isOpen"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_issue" app:drawableTopCompat="@drawable/ic_issue"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/closedMyIssues" android:id="@+id/closedMyIssues"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isClosed" android:text="@string/isClosed"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_issue_closed" app:drawableTopCompat="@drawable/ic_issue_closed"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/assignedToMe" android:id="@+id/assignedToMe"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/assignedToMe" android:text="@string/assignedToMe"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_person" app:drawableTopCompat="@drawable/ic_person"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -5,8 +5,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -22,7 +22,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -31,7 +31,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/pageTitleNotifications" android:text="@string/pageTitleNotifications"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -39,7 +56,7 @@
android:id="@+id/notificationsListSection" android:id="@+id/notificationsListSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -47,40 +64,40 @@
<TextView <TextView
android:id="@+id/markPinned" android:id="@+id/markPinned"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/pinNotification" android:text="@string/pinNotification"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_pin" app:drawableTopCompat="@drawable/ic_pin"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/markRead" android:id="@+id/markRead"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/markAsRead" android:text="@string/markAsRead"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_unwatch" app:drawableTopCompat="@drawable/ic_unwatch"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/markUnread" android:id="@+id/markUnread"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/markAsUnread" android:text="@string/markAsUnread"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_watchers" app:drawableTopCompat="@drawable/ic_watchers"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/strFilter" android:text="@string/strFilter"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/notificationsFilterSection" android:id="@+id/notificationsFilterSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,27 +65,27 @@
<TextView <TextView
android:id="@+id/unreadNotifications" android:id="@+id/unreadNotifications"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isUnread" android:text="@string/isUnread"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_watchers" app:drawableTopCompat="@drawable/ic_watchers"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/readNotifications" android:id="@+id/readNotifications"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isRead" android:text="@string/isRead"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_unwatch" app:drawableTopCompat="@drawable/ic_unwatch"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -18,88 +18,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> 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 <LinearLayout
android:id="@+id/organizationShareHeadFrame" android:id="@+id/organizationShareHeadFrame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeaderOrg" android:id="@+id/bottomSheetHeaderOrg"
@ -108,14 +32,31 @@
android:gravity="center" android:gravity="center"
android:text="@string/organization" android:text="@string/organization"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen18sp" />
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
<com.google.android.flexbox.FlexboxLayout <com.google.android.flexbox.FlexboxLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -123,42 +64,42 @@
<TextView <TextView
android:id="@+id/copyOrgUrl" android:id="@+id/copyOrgUrl"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="8dp" android:padding="@dimen/dimen4dp"
android:text="@string/genericCopyUrl" android:text="@string/genericCopyUrl"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_copy" app:drawableTopCompat="@drawable/ic_copy"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/share" android:id="@+id/share"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="8dp" android:padding="@dimen/dimen4dp"
android:text="@string/share" android:text="@string/share"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_share" app:drawableTopCompat="@drawable/ic_share"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/open" android:id="@+id/open"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="8dp" android:padding="@dimen/dimen4dp"
android:text="@string/openInBrowser" android:text="@string/openInBrowser"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_browser" app:drawableTopCompat="@drawable/ic_browser"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
</com.google.android.flexbox.FlexboxLayout> </com.google.android.flexbox.FlexboxLayout>

View File

@ -1,81 +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/orgTeamHeadFrame"
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/team"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/>
</LinearLayout>
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/orgTeamSection"
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/addRepo"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/addButton"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_repo"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/addNewMember"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/addRemove"
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>

View File

@ -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/myProfileHeadFrame"
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/navProfile"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/>
</LinearLayout>
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/myProfileSection"
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/addNewEmailAddress"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/addButton"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_email"
app:layout_alignSelf="flex_start"/>
</com.google.android.flexbox.FlexboxLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/strFilter" android:text="@string/strFilter"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/prFilterSection" android:id="@+id/prFilterSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,27 +65,27 @@
<TextView <TextView
android:id="@+id/openPr" android:id="@+id/openPr"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isOpen" android:text="@string/isOpen"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_pull_request" app:drawableTopCompat="@drawable/ic_pull_request"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/closedPr" android:id="@+id/closedPr"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/isClosed" android:text="@string/isClosed"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_issue_closed" app:drawableTopCompat="@drawable/ic_issue_closed"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/release" android:text="@string/release"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/releasesListSection" android:id="@+id/releasesListSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,14 +65,14 @@
<TextView <TextView
android:id="@+id/deleteRelease" android:id="@+id/deleteRelease"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuDeleteText" android:text="@string/menuDeleteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_delete" app:drawableTopCompat="@drawable/ic_delete"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/strFilter" android:text="@string/strFilter"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/releasesTagsFilterSection" android:id="@+id/releasesTagsFilterSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,27 +65,27 @@
<TextView <TextView
android:id="@+id/releases" android:id="@+id/releases"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/tabTextReleases" android:text="@string/tabTextReleases"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_release" app:drawableTopCompat="@drawable/ic_release"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/tags" android:id="@+id/tags"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/tags" android:text="@string/tags"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_tag" app:drawableTopCompat="@drawable/ic_tag"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -18,153 +18,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout
android:id="@+id/repoCreateHeadFrame"
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/repoCreateSection"
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/newFile"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/file"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_file"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/createNewIssue"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/issue"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_issue"
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"/>
<TextView
android:id="@+id/createNewMilestone"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/newIssueMilestoneTitle"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_milestone"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/createRelease"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/release"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_release"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/createPullRequest"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/pr"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_pull_request"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/addCollaborator"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/collaborator"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_person_add"
app:layout_alignSelf="flex_start"/>
<TextView
android:id="@+id/create_wiki"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:padding="4dp"
android:text="@string/wiki"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp"
app:drawableTopCompat="@drawable/ic_wiki"
app:layout_alignSelf="flex_start"/>
</com.google.android.flexbox.FlexboxLayout>
<View
android:id="@+id/repoDivider"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_marginBottom="16dp"
android:background="?attr/dividerColor"/>
<LinearLayout <LinearLayout
android:id="@+id/repoOthersHeadFrame" android:id="@+id/repoOthersHeadFrame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeaderRepo" android:id="@+id/bottomSheetHeaderRepo"
@ -173,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/repository" android:text="@string/repository"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen18sp" />
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -181,7 +57,7 @@
android:id="@+id/repoOthersSection" android:id="@+id/repoOthersSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -189,107 +65,107 @@
<TextView <TextView
android:id="@+id/starRepository" android:id="@+id/starRepository"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/starMember" android:text="@string/starMember"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_star" app:drawableTopCompat="@drawable/ic_star"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/unStarRepository" android:id="@+id/unStarRepository"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/unstar" android:text="@string/unstar"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_star_unfilled" app:drawableTopCompat="@drawable/ic_star_unfilled"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/watchRepository" android:id="@+id/watchRepository"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/watch" android:text="@string/watch"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_watchers" app:drawableTopCompat="@drawable/ic_watchers"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/unWatchRepository" android:id="@+id/unWatchRepository"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/unwatch" android:text="@string/unwatch"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_unwatch" app:drawableTopCompat="@drawable/ic_unwatch"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/copyRepoUrl" android:id="@+id/copyRepoUrl"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/genericCopyUrl" android:text="@string/genericCopyUrl"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_copy" app:drawableTopCompat="@drawable/ic_copy"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/shareRepository" android:id="@+id/shareRepository"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/share" android:text="@string/share"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_share" app:drawableTopCompat="@drawable/ic_share"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/openWebRepo" android:id="@+id/openWebRepo"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/openInBrowser" android:text="@string/openInBrowser"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_browser" app:drawableTopCompat="@drawable/ic_browser"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/repoSettings" android:id="@+id/repoSettings"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/navSettings" android:text="@string/navSettings"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_settings" app:drawableTopCompat="@drawable/ic_settings"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start" />
</com.google.android.flexbox.FlexboxLayout> </com.google.android.flexbox.FlexboxLayout>

View File

@ -5,8 +5,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -21,23 +21,15 @@
android:id="@+id/commentReactionButtons" android:id="@+id/commentReactionButtons"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="5dp" android:layout_marginBottom="@dimen/dimen8dp"
android:orientation="horizontal" /> android:orientation="horizontal" />
<View
android:id="@+id/reactionDivider"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="16dp"
android:background="?attr/dividerColor" />
<LinearLayout <LinearLayout
android:id="@+id/bottomSheetHeaderFrame" android:id="@+id/bottomSheetHeaderFrame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -46,7 +38,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/issue" android:text="@string/issue"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" /> android:textSize="@dimen/dimen16sp" />
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -54,7 +63,7 @@
android:id="@+id/issuePrtSection" android:id="@+id/issuePrtSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -62,135 +71,135 @@
<TextView <TextView
android:id="@+id/openFilesDiff" android:id="@+id/openFilesDiff"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/tabTextFiles" android:text="@string/tabTextFiles"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
android:visibility="gone" android:visibility="gone"
app:drawableTopCompat="@drawable/ic_file" app:drawableTopCompat="@drawable/ic_file"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/mergePullRequest" android:id="@+id/mergePullRequest"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/mergePullRequestButtonText" android:text="@string/mergePullRequestButtonText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
android:visibility="gone" android:visibility="gone"
app:drawableTopCompat="@drawable/ic_pull_request" app:drawableTopCompat="@drawable/ic_pull_request"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/updatePullRequest" android:id="@+id/updatePullRequest"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/newUpdateButtonCopy" android:text="@string/newUpdateButtonCopy"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
android:visibility="gone" android:visibility="gone"
app:drawableTopCompat="@drawable/ic_refresh" app:drawableTopCompat="@drawable/ic_refresh"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/deletePrHeadBranch" android:id="@+id/deletePrHeadBranch"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/deleteBranch" android:text="@string/deleteBranch"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_branch" app:drawableTopCompat="@drawable/ic_branch"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/editIssue" android:id="@+id/editIssue"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuEditText" android:text="@string/menuEditText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_edit" app:drawableTopCompat="@drawable/ic_edit"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/addRemoveAssignees" android:id="@+id/addRemoveAssignees"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/newIssueAssigneesListTitle" android:text="@string/newIssueAssigneesListTitle"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_person_add" app:drawableTopCompat="@drawable/ic_person_add"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/editLabels" android:id="@+id/editLabels"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/newIssueLabelsTitle" android:text="@string/newIssueLabelsTitle"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_tag" app:drawableTopCompat="@drawable/ic_tag"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/subscribeIssue" android:id="@+id/subscribeIssue"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/singleIssueSubscribe" android:text="@string/singleIssueSubscribe"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_unwatch" app:drawableTopCompat="@drawable/ic_unwatch"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/unsubscribeIssue" android:id="@+id/unsubscribeIssue"
android:layout_width="104dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/singleIssueUnSubscribe" android:text="@string/singleIssueUnSubscribe"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
android:visibility="gone" android:visibility="gone"
app:drawableTopCompat="@drawable/ic_watchers" app:drawableTopCompat="@drawable/ic_watchers"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/closeIssue" android:id="@+id/closeIssue"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/close" android:text="@string/close"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_issue_closed" app:drawableTopCompat="@drawable/ic_issue_closed"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
@ -199,15 +208,15 @@
<View <View
android:id="@+id/issuePrDivider" android:id="@+id/issuePrDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="4dp" android:layout_height="@dimen/dimen4dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="@dimen/dimen16dp"
android:background="?attr/dividerColor" /> android:background="?attr/dividerColor" />
<com.google.android.flexbox.FlexboxLayout <com.google.android.flexbox.FlexboxLayout
android:id="@+id/issuePrShareSection" android:id="@+id/issuePrShareSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -215,40 +224,40 @@
<TextView <TextView
android:id="@+id/copyIssueUrl" android:id="@+id/copyIssueUrl"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/genericCopyUrl" android:text="@string/genericCopyUrl"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_copy" app:drawableTopCompat="@drawable/ic_copy"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/shareIssue" android:id="@+id/shareIssue"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/share" android:text="@string/share"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_share" app:drawableTopCompat="@drawable/ic_share"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />
<TextView <TextView
android:id="@+id/open" android:id="@+id/open"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/openInBrowser" android:text="@string/openInBrowser"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_browser" app:drawableTopCompat="@drawable/ic_browser"
app:layout_alignSelf="flex_start" /> app:layout_alignSelf="flex_start" />

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/tags" android:text="@string/tags"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/tagsListSection" android:id="@+id/tagsListSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,14 +65,14 @@
<TextView <TextView
android:id="@+id/tagMenuDelete" android:id="@+id/tagMenuDelete"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuDeleteText" android:text="@string/menuDeleteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_delete" app:drawableTopCompat="@drawable/ic_delete"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottomSheetHeader" android:id="@+id/bottomSheetHeader"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/pageTitleUsers" android:text="@string/pageTitleUsers"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/usersProfileSection" android:id="@+id/usersProfileSection"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,27 +65,27 @@
<TextView <TextView
android:id="@+id/followUser" android:id="@+id/followUser"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/userFollow" android:text="@string/userFollow"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_person_add" app:drawableTopCompat="@drawable/ic_person_add"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/unfollowUser" android:id="@+id/unfollowUser"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/unfollowUser" android:text="@string/unfollowUser"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
android:visibility="gone" android:visibility="gone"
app:drawableTopCompat="@drawable/ic_person_remove" app:drawableTopCompat="@drawable/ic_person_remove"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -6,8 +6,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor" android:background="?attr/primaryBackgroundColor"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="6dp" android:paddingTop="@dimen/dimen6dp"
android:paddingBottom="12dp"> android:paddingBottom="@dimen/dimen12dp">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -23,7 +23,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp"> android:padding="@dimen/dimen8dp">
<TextView <TextView
android:id="@+id/bottom_sheet_header" android:id="@+id/bottom_sheet_header"
@ -32,7 +32,24 @@
android:gravity="center" android:gravity="center"
android:text="@string/wiki" android:text="@string/wiki"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp"/> android:textSize="@dimen/dimen16sp"/>
<com.google.android.material.card.MaterialCardView
style="?attr/materialCardViewFilledStyle"
android:layout_width="@dimen/dimen28dp"
android:layout_height="@dimen/dimen4dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dimen8dp"
android:layout_marginBottom="@dimen/dimen16dp"
app:cardCornerRadius="@dimen/dimen24dp"
app:cardElevation="@dimen/dimen0dp">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/fabColor" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
@ -40,7 +57,7 @@
android:id="@+id/wiki_list_section" android:id="@+id/wiki_list_section"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dp" android:padding="@dimen/dimen4dp"
app:alignContent="center" app:alignContent="center"
app:alignItems="flex_start" app:alignItems="flex_start"
app:flexWrap="wrap" app:flexWrap="wrap"
@ -48,27 +65,27 @@
<TextView <TextView
android:id="@+id/edit_wiki" android:id="@+id/edit_wiki"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuEditText" android:text="@string/menuEditText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_edit" app:drawableTopCompat="@drawable/ic_edit"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>
<TextView <TextView
android:id="@+id/delete_wiki" android:id="@+id/delete_wiki"
android:layout_width="100dp" android:layout_width="@dimen/dimen132dp"
android:layout_height="100dp" android:layout_height="@dimen/dimen100dp"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:gravity="center" android:gravity="center"
android:padding="4dp" android:padding="@dimen/dimen4dp"
android:text="@string/menuDeleteText" android:text="@string/menuDeleteText"
android:textColor="?attr/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="16sp" android:textSize="@dimen/dimen14sp"
app:drawableTopCompat="@drawable/ic_delete" app:drawableTopCompat="@drawable/ic_delete"
app:layout_alignSelf="flex_start"/> app:layout_alignSelf="flex_start"/>

View File

@ -70,7 +70,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:text="@string/appVersionBuild" android:text="@string/appVersionBuild"
android:textColor="@color/iconPrMergedColor" android:textColor="@color/retroThemeColorSecondary"
android:textIsSelectable="true" android:textIsSelectable="true"
android:paddingTop="@dimen/dimen8dp" android:paddingTop="@dimen/dimen8dp"
android:paddingBottom="@dimen/dimen8dp" android:paddingBottom="@dimen/dimen8dp"
@ -187,7 +187,7 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/dimen24dp" android:layout_margin="@dimen/dimen24dp"
android:text="@string/websiteText" android:text="@string/websiteText"
android:textColor="@color/btnTextColor" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="@dimen/dimen16sp" android:textSize="@dimen/dimen16sp"
android:textStyle="bold" /> android:textStyle="bold" />

View File

@ -196,7 +196,7 @@
android:layout_height="@dimen/dimen54dp" android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen16dp" android:layout_marginTop="@dimen/dimen16dp"
android:text="@string/saveButton" android:text="@string/saveButton"
android:textColor="@color/colorWhite" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"/> android:textStyle="bold"/>

View File

@ -105,7 +105,7 @@
android:layout_marginTop="@dimen/dimen16dp" android:layout_marginTop="@dimen/dimen16dp"
android:backgroundTint="@color/darkRed" android:backgroundTint="@color/darkRed"
android:text="@string/repoTransferText" android:text="@string/repoTransferText"
android:textColor="@color/colorWhite" android:textColor="?attr/materialCardBackgroundColor"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"/> android:textStyle="bold"/>

View File

@ -13,6 +13,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:textColor="@color/colorWhite"/> android:textColor="@color/colorWhite" />
</LinearLayout> </LinearLayout>

Some files were not shown because too many files have changed in this diff Show More