mirror of https://codeberg.org/gitnex/GitNex.git
Refactors and UI refinements
This commit is contained in:
parent
bc060a21b0
commit
460d07d225
|
@ -84,7 +84,7 @@ Thanks to all the open source libraries, contributors, and donors.
|
|||
- [ocpsoft/prettytime](https://github.com/ocpsoft/prettytime)
|
||||
- [ramseth001/TextDrawable](https://github.com/ramseth001/TextDrawable)
|
||||
- [vdurmont/emoji-java](https://github.com/vdurmont/emoji-java)
|
||||
- [Pes8/android-material-color-picker-dialog](https://github.com/Pes8/android-material-color-picker-dialog)
|
||||
- [skydoves/ColorPickerView](https://github.com/skydoves/ColorPickerView)
|
||||
- [HamidrezaAmz/BreadcrumbsView](https://github.com/HamidrezaAmz/BreadcrumbsView)
|
||||
- [Baseflow/PhotoView](https://github.com/Baseflow/PhotoView)
|
||||
- [apache/commons](https://github.com/apache/commons-io)
|
||||
|
|
|
@ -4,7 +4,6 @@ plugins {
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 34
|
||||
defaultConfig {
|
||||
applicationId "org.mian.gitnex"
|
||||
minSdkVersion 23
|
||||
|
@ -13,8 +12,9 @@ android {
|
|||
versionName "5.3.0-dev"
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
compileSdk 34
|
||||
}
|
||||
flavorDimensions "default"
|
||||
flavorDimensions = ["default"]
|
||||
productFlavors {
|
||||
free {
|
||||
applicationId "org.mian.gitnex"
|
||||
|
@ -76,7 +76,7 @@ dependencies {
|
|||
implementation 'com.squareup.retrofit2:converter-scalars:2.9.0'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2'
|
||||
implementation 'org.ocpsoft.prettytime:prettytime:5.0.7.Final'
|
||||
implementation 'com.github.Pes8:android-material-color-picker-dialog:master'
|
||||
implementation "com.github.skydoves:colorpickerview:2.3.0"
|
||||
implementation "io.noties.markwon:core:4.6.2"
|
||||
implementation "io.noties.markwon:ext-latex:4.6.2"
|
||||
implementation "io.noties.markwon:ext-strikethrough:4.6.2"
|
||||
|
|
|
@ -71,14 +71,16 @@
|
|||
android:theme="@style/AppTheme.NoActionBar"/>
|
||||
<activity
|
||||
android:name=".activities.CreateLabelActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
<activity
|
||||
android:name=".activities.CreateIssueActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
<activity
|
||||
android:name=".activities.CreateMilestoneActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"/>
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
<activity
|
||||
android:name=".activities.IssueDetailActivity"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|keyboard|keyboardHidden|navigation"
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package org.mian.gitnex.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.TextView;
|
||||
import android.os.Handler;
|
||||
import android.view.MenuItem;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import com.pes.androidmaterialcolorpickerdialog.ColorPicker;
|
||||
import com.skydoves.colorpickerview.ColorPickerDialog;
|
||||
import com.skydoves.colorpickerview.flag.BubbleFlag;
|
||||
import com.skydoves.colorpickerview.listeners.ColorEnvelopeListener;
|
||||
import com.skydoves.colorpickerview.preference.ColorPickerPreferenceManager;
|
||||
import java.util.Objects;
|
||||
import org.gitnex.tea4j.v2.models.CreateLabelOption;
|
||||
import org.gitnex.tea4j.v2.models.EditLabelOption;
|
||||
|
@ -19,7 +19,7 @@ import org.mian.gitnex.clients.RetrofitClient;
|
|||
import org.mian.gitnex.databinding.ActivityCreateLabelBinding;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppUtil;
|
||||
import org.mian.gitnex.helpers.Toasty;
|
||||
import org.mian.gitnex.helpers.SnackBar;
|
||||
import org.mian.gitnex.helpers.contexts.RepositoryContext;
|
||||
import org.mian.gitnex.viewmodels.LabelsViewModel;
|
||||
import org.mian.gitnex.viewmodels.OrganizationLabelsViewModel;
|
||||
|
@ -32,15 +32,11 @@ import retrofit2.Callback;
|
|||
public class CreateLabelActivity extends BaseActivity {
|
||||
|
||||
public static boolean refreshLabels = false;
|
||||
|
||||
private ActivityCreateLabelBinding activityCreateLabelBinding;
|
||||
private View.OnClickListener onClickListener;
|
||||
|
||||
private RepositoryContext repository;
|
||||
private String labelColor = "";
|
||||
private final View.OnClickListener createLabelListener = v -> processCreateLabel();
|
||||
private String labelColorDefault = "";
|
||||
private final View.OnClickListener updateLabelListener = v -> processUpdateLabel();
|
||||
private ColorPickerPreferenceManager colorManager;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -50,9 +46,6 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
activityCreateLabelBinding = ActivityCreateLabelBinding.inflate(getLayoutInflater());
|
||||
setContentView(activityCreateLabelBinding.getRoot());
|
||||
|
||||
InputMethodManager imm =
|
||||
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
|
||||
repository = RepositoryContext.fromIntent(getIntent());
|
||||
|
||||
if (getIntent().getStringExtra("labelAction") != null
|
||||
|
@ -66,26 +59,18 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
return;
|
||||
}
|
||||
|
||||
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
||||
activityCreateLabelBinding.topAppBar.setNavigationOnClickListener(v -> finish());
|
||||
|
||||
activityCreateLabelBinding.labelName.requestFocus();
|
||||
assert imm != null;
|
||||
imm.showSoftInput(activityCreateLabelBinding.labelName, InputMethodManager.SHOW_IMPLICIT);
|
||||
colorManager = ColorPickerPreferenceManager.getInstance(this);
|
||||
colorManager.clearSavedAllData();
|
||||
activityCreateLabelBinding.colorPicker.setBackgroundColor(
|
||||
colorManager.getColor("colorPickerDialogLabels", Color.RED));
|
||||
|
||||
final ColorPicker cp = new ColorPicker(CreateLabelActivity.this, 235, 113, 33);
|
||||
MenuItem create = activityCreateLabelBinding.topAppBar.getMenu().getItem(0);
|
||||
MenuItem update = activityCreateLabelBinding.topAppBar.getMenu().getItem(1);
|
||||
update.setVisible(false);
|
||||
|
||||
initCloseListener();
|
||||
activityCreateLabelBinding.close.setOnClickListener(onClickListener);
|
||||
activityCreateLabelBinding.colorPicker.setOnClickListener(v -> cp.show());
|
||||
|
||||
cp.setCallback(
|
||||
color -> {
|
||||
|
||||
// Log.i("#Hex no alpha", String.format("#%06X", (0xFFFFFF & color)));
|
||||
activityCreateLabelBinding.colorPicker.setBackgroundColor(color);
|
||||
labelColor = String.format("#%06X", (0xFFFFFF & color));
|
||||
cp.dismiss();
|
||||
});
|
||||
activityCreateLabelBinding.colorPicker.setOnClickListener(v -> newColorPicker());
|
||||
|
||||
if (getIntent().getStringExtra("labelAction") != null
|
||||
&& Objects.requireNonNull(getIntent().getStringExtra("labelAction"))
|
||||
|
@ -96,28 +81,74 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
activityCreateLabelBinding.colorPicker.setBackgroundColor(labelColor_);
|
||||
labelColorDefault = "#" + getIntent().getStringExtra("labelColor");
|
||||
|
||||
TextView toolbar_title = activityCreateLabelBinding.toolbarTitle;
|
||||
toolbar_title.setText(getResources().getString(R.string.pageTitleLabelUpdate));
|
||||
activityCreateLabelBinding.createLabelButton.setText(
|
||||
getResources().getString(R.string.newUpdateButtonCopy));
|
||||
activityCreateLabelBinding.topAppBar.setTitle(getString(R.string.pageTitleLabelUpdate));
|
||||
|
||||
update.setVisible(true);
|
||||
create.setVisible(false);
|
||||
|
||||
activityCreateLabelBinding.topAppBar.setOnMenuItemClickListener(
|
||||
menuItem -> {
|
||||
int id = menuItem.getItemId();
|
||||
|
||||
if (id == R.id.update) {
|
||||
processUpdateLabel();
|
||||
return true;
|
||||
} else {
|
||||
return super.onOptionsItemSelected(menuItem);
|
||||
}
|
||||
});
|
||||
|
||||
activityCreateLabelBinding.createLabelButton.setOnClickListener(updateLabelListener);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!connToInternet) {
|
||||
activityCreateLabelBinding.topAppBar.setOnMenuItemClickListener(
|
||||
menuItem -> {
|
||||
int id = menuItem.getItemId();
|
||||
|
||||
activityCreateLabelBinding.createLabelButton.setEnabled(false);
|
||||
if (id == R.id.create) {
|
||||
processCreateLabel();
|
||||
return true;
|
||||
} else {
|
||||
return super.onOptionsItemSelected(menuItem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void newColorPicker() {
|
||||
|
||||
ColorPickerDialog.Builder builder =
|
||||
new ColorPickerDialog.Builder(this)
|
||||
.setPreferenceName("colorPickerDialogLabels")
|
||||
.setPositiveButton(
|
||||
getString(R.string.okButton),
|
||||
(ColorEnvelopeListener)
|
||||
(envelope, clicked) -> {
|
||||
activityCreateLabelBinding.colorPicker
|
||||
.setBackgroundColor(envelope.getColor());
|
||||
labelColor =
|
||||
String.format(
|
||||
"#%06X",
|
||||
(0xFFFFFF & envelope.getColor()));
|
||||
})
|
||||
.attachAlphaSlideBar(true)
|
||||
.attachBrightnessSlideBar(true)
|
||||
.setBottomSpace(16);
|
||||
|
||||
builder.getColorPickerView().setFlagView(new BubbleFlag(this));
|
||||
|
||||
if (!labelColorDefault.equalsIgnoreCase("")) {
|
||||
int labelColorCurrent = Color.parseColor(labelColorDefault);
|
||||
builder.getColorPickerView().setInitialColor(labelColorCurrent);
|
||||
} else {
|
||||
|
||||
activityCreateLabelBinding.createLabelButton.setOnClickListener(createLabelListener);
|
||||
colorManager.setColor("colorPickerDialogLabels", Color.RED);
|
||||
}
|
||||
|
||||
builder.getColorPickerView().setLifecycleOwner(this);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private void processUpdateLabel() {
|
||||
|
||||
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
||||
|
||||
String updateLabelName =
|
||||
Objects.requireNonNull(activityCreateLabelBinding.labelName.getText()).toString();
|
||||
|
||||
|
@ -130,25 +161,20 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
updateLabelColor = labelColor;
|
||||
}
|
||||
|
||||
if (!connToInternet) {
|
||||
|
||||
Toasty.error(ctx, getResources().getString(R.string.checkNetConnection));
|
||||
return;
|
||||
}
|
||||
|
||||
if (updateLabelName.equals("")) {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.labelEmptyError));
|
||||
SnackBar.error(
|
||||
ctx, findViewById(android.R.id.content), getString(R.string.labelEmptyError));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!AppUtil.checkStrings(updateLabelName)) {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.labelNameError));
|
||||
SnackBar.error(
|
||||
ctx, findViewById(android.R.id.content), getString(R.string.labelNameError));
|
||||
return;
|
||||
}
|
||||
|
||||
disableProcessButton();
|
||||
patchLabel(
|
||||
repository,
|
||||
updateLabelName,
|
||||
|
@ -158,8 +184,6 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
|
||||
private void processCreateLabel() {
|
||||
|
||||
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
||||
|
||||
String newLabelName =
|
||||
Objects.requireNonNull(activityCreateLabelBinding.labelName.getText()).toString();
|
||||
String newLabelColor;
|
||||
|
@ -174,25 +198,20 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
newLabelColor = labelColor;
|
||||
}
|
||||
|
||||
if (!connToInternet) {
|
||||
|
||||
Toasty.error(ctx, getResources().getString(R.string.checkNetConnection));
|
||||
return;
|
||||
}
|
||||
|
||||
if (newLabelName.equals("")) {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.labelEmptyError));
|
||||
SnackBar.error(
|
||||
ctx, findViewById(android.R.id.content), getString(R.string.labelEmptyError));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!AppUtil.checkStrings(newLabelName)) {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.labelNameError));
|
||||
SnackBar.error(
|
||||
ctx, findViewById(android.R.id.content), getString(R.string.labelNameError));
|
||||
return;
|
||||
}
|
||||
|
||||
disableProcessButton();
|
||||
createNewLabel(newLabelName, newLabelColor);
|
||||
}
|
||||
|
||||
|
@ -230,17 +249,21 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
|
||||
if (response.code() == 201) {
|
||||
|
||||
Toasty.success(ctx, getString(R.string.labelCreated));
|
||||
SnackBar.success(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.labelCreated));
|
||||
refreshLabels = true;
|
||||
finish();
|
||||
new Handler().postDelayed(() -> finish(), 3000);
|
||||
} else if (response.code() == 401) {
|
||||
|
||||
enableProcessButton();
|
||||
AlertDialogs.authorizationTokenRevokedDialog(ctx);
|
||||
} else {
|
||||
|
||||
enableProcessButton();
|
||||
Toasty.error(ctx, getString(R.string.genericError));
|
||||
SnackBar.error(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.genericError));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,8 +271,6 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
public void onFailure(@NonNull Call<Label> call, @NonNull Throwable t) {
|
||||
|
||||
labelColor = "";
|
||||
Log.e("onFailure", t.toString());
|
||||
enableProcessButton();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -298,18 +319,22 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
|
||||
if (response.code() == 200) {
|
||||
|
||||
Toasty.success(ctx, getString(R.string.labelUpdated));
|
||||
SnackBar.success(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.labelUpdated));
|
||||
refreshLabels = true;
|
||||
finish();
|
||||
new Handler().postDelayed(() -> finish(), 3000);
|
||||
}
|
||||
} else if (response.code() == 401) {
|
||||
|
||||
enableProcessButton();
|
||||
AlertDialogs.authorizationTokenRevokedDialog(ctx);
|
||||
} else {
|
||||
|
||||
enableProcessButton();
|
||||
Toasty.error(ctx, getString(R.string.genericError));
|
||||
SnackBar.error(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.genericError));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -318,17 +343,10 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
|
||||
labelColor = "";
|
||||
labelColorDefault = "";
|
||||
Log.e("onFailure", t.toString());
|
||||
enableProcessButton();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initCloseListener() {
|
||||
|
||||
onClickListener = view -> finish();
|
||||
}
|
||||
|
||||
private void deleteLabel(int labelId) {
|
||||
|
||||
Call<Void> call;
|
||||
|
@ -358,7 +376,11 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
|
||||
if (response.code() == 204) {
|
||||
|
||||
Toasty.success(ctx, getString(R.string.labelDeleteText));
|
||||
SnackBar.success(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.labelDeleteText));
|
||||
|
||||
if (getIntent().getStringExtra("type") != null
|
||||
&& Objects.requireNonNull(
|
||||
getIntent().getStringExtra("type"))
|
||||
|
@ -377,27 +399,18 @@ public class CreateLabelActivity extends BaseActivity {
|
|||
AlertDialogs.authorizationTokenRevokedDialog(ctx);
|
||||
} else {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.genericError));
|
||||
SnackBar.error(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.genericError));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
||||
Log.e("onFailure", t.toString());
|
||||
}
|
||||
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {}
|
||||
});
|
||||
}
|
||||
|
||||
private void disableProcessButton() {
|
||||
|
||||
activityCreateLabelBinding.createLabelButton.setEnabled(false);
|
||||
}
|
||||
|
||||
private void enableProcessButton() {
|
||||
|
||||
activityCreateLabelBinding.createLabelButton.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
|
|
@ -1,30 +1,28 @@
|
|||
package org.mian.gitnex.activities;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.os.Handler;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.google.android.material.datepicker.MaterialDatePicker;
|
||||
import com.vdurmont.emoji.EmojiParser;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.TimeZone;
|
||||
import org.gitnex.tea4j.v2.models.CreateMilestoneOption;
|
||||
import org.gitnex.tea4j.v2.models.Milestone;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.clients.RetrofitClient;
|
||||
import org.mian.gitnex.databinding.ActivityCreateMilestoneBinding;
|
||||
import org.mian.gitnex.helpers.AlertDialogs;
|
||||
import org.mian.gitnex.helpers.AppUtil;
|
||||
import org.mian.gitnex.helpers.Markdown;
|
||||
import org.mian.gitnex.helpers.Toasty;
|
||||
import org.mian.gitnex.helpers.SnackBar;
|
||||
import org.mian.gitnex.helpers.contexts.RepositoryContext;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
|
@ -32,13 +30,10 @@ import retrofit2.Callback;
|
|||
/**
|
||||
* @author M M Arif
|
||||
*/
|
||||
public class CreateMilestoneActivity extends BaseActivity implements View.OnClickListener {
|
||||
public class CreateMilestoneActivity extends BaseActivity {
|
||||
|
||||
private ActivityCreateMilestoneBinding binding;
|
||||
private View.OnClickListener onClickListener;
|
||||
private RepositoryContext repository;
|
||||
private Date currentDate = null;
|
||||
private final View.OnClickListener createMilestoneListener = v -> processNewMilestone();
|
||||
private boolean renderMd = false;
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
|
@ -49,18 +44,15 @@ public class CreateMilestoneActivity extends BaseActivity implements View.OnClic
|
|||
|
||||
binding = ActivityCreateMilestoneBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
setSupportActionBar(binding.toolbar);
|
||||
|
||||
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
||||
|
||||
InputMethodManager imm =
|
||||
(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
|
||||
repository = RepositoryContext.fromIntent(getIntent());
|
||||
|
||||
binding.milestoneTitle.requestFocus();
|
||||
assert imm != null;
|
||||
imm.showSoftInput(binding.milestoneTitle, InputMethodManager.SHOW_IMPLICIT);
|
||||
binding.topAppBar.setNavigationOnClickListener(v -> finish());
|
||||
|
||||
MenuItem attachment = binding.topAppBar.getMenu().getItem(0);
|
||||
attachment.setVisible(false);
|
||||
|
||||
showDatePickerDialog();
|
||||
|
||||
binding.milestoneDescription.setOnTouchListener(
|
||||
(touchView, motionEvent) -> {
|
||||
|
@ -74,78 +66,79 @@ public class CreateMilestoneActivity extends BaseActivity implements View.OnClic
|
|||
return false;
|
||||
});
|
||||
|
||||
initCloseListener();
|
||||
binding.close.setOnClickListener(onClickListener);
|
||||
binding.milestoneDueDate.setOnClickListener(this);
|
||||
binding.topAppBar.setOnMenuItemClickListener(
|
||||
menuItem -> {
|
||||
int id = menuItem.getItemId();
|
||||
|
||||
if (!connToInternet) {
|
||||
if (id == R.id.markdown) {
|
||||
|
||||
binding.createNewMilestoneButton.setEnabled(false);
|
||||
} else {
|
||||
if (!renderMd) {
|
||||
Markdown.render(
|
||||
ctx,
|
||||
EmojiParser.parseToUnicode(
|
||||
Objects.requireNonNull(
|
||||
Objects.requireNonNull(
|
||||
binding.milestoneDescription
|
||||
.getText())
|
||||
.toString())),
|
||||
binding.markdownPreview);
|
||||
|
||||
binding.createNewMilestoneButton.setOnClickListener(createMilestoneListener);
|
||||
}
|
||||
binding.markdownPreview.setVisibility(View.VISIBLE);
|
||||
binding.milestoneDescriptionLayout.setVisibility(View.GONE);
|
||||
renderMd = true;
|
||||
} else {
|
||||
binding.markdownPreview.setVisibility(View.GONE);
|
||||
binding.milestoneDescriptionLayout.setVisibility(View.VISIBLE);
|
||||
renderMd = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if (id == R.id.create) {
|
||||
processNewMilestone();
|
||||
return true;
|
||||
} else {
|
||||
return super.onOptionsItemSelected(menuItem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
|
||||
private void showDatePickerDialog() {
|
||||
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.markdown_switcher, menu);
|
||||
MaterialDatePicker.Builder<Long> builder = MaterialDatePicker.Builder.datePicker();
|
||||
builder.setSelection(Calendar.getInstance().getTimeInMillis());
|
||||
builder.setTitleText(R.string.newIssueDueDateTitle);
|
||||
MaterialDatePicker<Long> materialDatePicker = builder.build();
|
||||
|
||||
return true;
|
||||
}
|
||||
binding.milestoneDueDate.setOnClickListener(
|
||||
v -> materialDatePicker.show(getSupportFragmentManager(), "DATE_PICKER"));
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == R.id.markdown) {
|
||||
|
||||
if (!renderMd) {
|
||||
Markdown.render(
|
||||
ctx,
|
||||
EmojiParser.parseToUnicode(
|
||||
Objects.requireNonNull(
|
||||
Objects.requireNonNull(
|
||||
binding.milestoneDescription.getText())
|
||||
.toString())),
|
||||
binding.markdownPreview);
|
||||
|
||||
binding.markdownPreview.setVisibility(View.VISIBLE);
|
||||
binding.milestoneDescriptionLayout.setVisibility(View.GONE);
|
||||
renderMd = true;
|
||||
} else {
|
||||
binding.markdownPreview.setVisibility(View.GONE);
|
||||
binding.milestoneDescriptionLayout.setVisibility(View.VISIBLE);
|
||||
renderMd = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
materialDatePicker.addOnPositiveButtonClickListener(
|
||||
selection -> {
|
||||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
calendar.setTimeInMillis(selection);
|
||||
SimpleDateFormat format =
|
||||
new SimpleDateFormat(
|
||||
"yyyy-MM-dd", new Locale(tinyDB.getString("locale")));
|
||||
String formattedDate = format.format(calendar.getTime());
|
||||
binding.milestoneDueDate.setText(formattedDate);
|
||||
});
|
||||
}
|
||||
|
||||
private void processNewMilestone() {
|
||||
|
||||
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
||||
|
||||
String newMilestoneTitle =
|
||||
Objects.requireNonNull(binding.milestoneTitle.getText()).toString();
|
||||
String newMilestoneDescription =
|
||||
Objects.requireNonNull(binding.milestoneDescription.getText()).toString();
|
||||
|
||||
if (!connToInternet) {
|
||||
|
||||
Toasty.error(ctx, getResources().getString(R.string.checkNetConnection));
|
||||
return;
|
||||
}
|
||||
String milestoneDueDate =
|
||||
Objects.requireNonNull(binding.milestoneDueDate.getText()).toString();
|
||||
|
||||
if (newMilestoneTitle.equals("")) {
|
||||
|
||||
Toasty.error(ctx, getString(R.string.milestoneNameErrorEmpty));
|
||||
SnackBar.error(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.milestoneNameErrorEmpty));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -153,29 +146,41 @@ public class CreateMilestoneActivity extends BaseActivity implements View.OnClic
|
|||
|
||||
if (newMilestoneDescription.length() > 255) {
|
||||
|
||||
Toasty.warning(ctx, getString(R.string.milestoneDescError));
|
||||
SnackBar.error(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.milestoneDescError));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
disableProcessButton();
|
||||
createNewMilestone(
|
||||
repository.getOwner(),
|
||||
repository.getName(),
|
||||
newMilestoneTitle,
|
||||
newMilestoneDescription);
|
||||
newMilestoneDescription,
|
||||
milestoneDueDate);
|
||||
}
|
||||
|
||||
private void createNewMilestone(
|
||||
String repoOwner,
|
||||
String repoName,
|
||||
String newMilestoneTitle,
|
||||
String newMilestoneDescription) {
|
||||
String newMilestoneDescription,
|
||||
String milestoneDueDate) {
|
||||
|
||||
CreateMilestoneOption createMilestone = new CreateMilestoneOption();
|
||||
createMilestone.setDescription(newMilestoneDescription);
|
||||
createMilestone.setTitle(newMilestoneTitle);
|
||||
createMilestone.setDueOn(currentDate);
|
||||
String[] date = milestoneDueDate.split("-");
|
||||
if (!milestoneDueDate.equalsIgnoreCase("")) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.YEAR, Integer.parseInt(date[0]));
|
||||
calendar.set(Calendar.MONTH, Integer.parseInt(date[1]));
|
||||
calendar.set(Calendar.DATE, Integer.parseInt(date[2]));
|
||||
Date dueDate = calendar.getTime();
|
||||
createMilestone.setDueOn(dueDate);
|
||||
}
|
||||
|
||||
Call<Milestone> call;
|
||||
|
||||
|
@ -184,7 +189,7 @@ public class CreateMilestoneActivity extends BaseActivity implements View.OnClic
|
|||
.issueCreateMilestone(repoOwner, repoName, createMilestone);
|
||||
|
||||
call.enqueue(
|
||||
new Callback<Milestone>() {
|
||||
new Callback<>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(
|
||||
|
@ -196,74 +201,30 @@ public class CreateMilestoneActivity extends BaseActivity implements View.OnClic
|
|||
if (response.code() == 201) {
|
||||
|
||||
RepoDetailActivity.updateFABActions = true;
|
||||
Toasty.success(ctx, getString(R.string.milestoneCreated));
|
||||
enableProcessButton();
|
||||
finish();
|
||||
SnackBar.success(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.milestoneCreated));
|
||||
|
||||
new Handler().postDelayed(() -> finish(), 3000);
|
||||
}
|
||||
} else if (response.code() == 401) {
|
||||
|
||||
enableProcessButton();
|
||||
AlertDialogs.authorizationTokenRevokedDialog(ctx);
|
||||
} else {
|
||||
|
||||
enableProcessButton();
|
||||
Toasty.error(ctx, getString(R.string.genericError));
|
||||
SnackBar.error(
|
||||
ctx,
|
||||
findViewById(android.R.id.content),
|
||||
getString(R.string.genericError));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<Milestone> call, @NonNull Throwable t) {
|
||||
|
||||
Log.e("onFailure", t.toString());
|
||||
enableProcessButton();
|
||||
}
|
||||
public void onFailure(@NonNull Call<Milestone> call, @NonNull Throwable t) {}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
if (v == binding.milestoneDueDate) {
|
||||
|
||||
final Calendar c = Calendar.getInstance();
|
||||
int mYear = c.get(Calendar.YEAR);
|
||||
final int mMonth = c.get(Calendar.MONTH);
|
||||
final int mDay = c.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
DatePickerDialog datePickerDialog =
|
||||
new DatePickerDialog(
|
||||
this,
|
||||
(view, year, monthOfYear, dayOfMonth) -> {
|
||||
binding.milestoneDueDate.setText(
|
||||
getString(
|
||||
R.string.setDueDate,
|
||||
year,
|
||||
(monthOfYear + 1),
|
||||
dayOfMonth));
|
||||
currentDate = new Date(year - 1900, monthOfYear, dayOfMonth);
|
||||
},
|
||||
mYear,
|
||||
mMonth,
|
||||
mDay);
|
||||
datePickerDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void initCloseListener() {
|
||||
|
||||
onClickListener = view -> finish();
|
||||
}
|
||||
|
||||
private void disableProcessButton() {
|
||||
|
||||
binding.createNewMilestoneButton.setEnabled(false);
|
||||
}
|
||||
|
||||
private void enableProcessButton() {
|
||||
|
||||
binding.createNewMilestoneButton.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
|
|
@ -5,7 +5,9 @@ import android.os.Bundle;
|
|||
import android.view.View;
|
||||
import android.widget.NumberPicker;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.pes.androidmaterialcolorpickerdialog.ColorPicker;
|
||||
import com.skydoves.colorpickerview.ColorPickerDialog;
|
||||
import com.skydoves.colorpickerview.flag.BubbleFlag;
|
||||
import com.skydoves.colorpickerview.listeners.ColorEnvelopeListener;
|
||||
import org.mian.gitnex.R;
|
||||
import org.mian.gitnex.databinding.ActivitySettingsNotificationsBinding;
|
||||
import org.mian.gitnex.helpers.AppUtil;
|
||||
|
@ -29,9 +31,7 @@ public class SettingsNotificationsActivity extends BaseActivity {
|
|||
viewBinding = ActivitySettingsNotificationsBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
|
||||
View.OnClickListener onClickListener = viewClose -> finish();
|
||||
|
||||
viewBinding.close.setOnClickListener(onClickListener);
|
||||
viewBinding.topAppBar.setNavigationOnClickListener(v -> finish());
|
||||
|
||||
viewBinding.pollingDelaySelected.setText(
|
||||
String.format(
|
||||
|
@ -43,9 +43,9 @@ public class SettingsNotificationsActivity extends BaseActivity {
|
|||
viewBinding.enableNotificationsMode.setChecked(
|
||||
tinyDB.getBoolean("notificationsEnabled", true));
|
||||
viewBinding.enableLightsMode.setChecked(
|
||||
tinyDB.getBoolean("notificationsEnableLights", true));
|
||||
tinyDB.getBoolean("notificationsEnableLights", false));
|
||||
viewBinding.enableVibrationMode.setChecked(
|
||||
tinyDB.getBoolean("notificationsEnableVibration", true));
|
||||
tinyDB.getBoolean("notificationsEnableVibration", false));
|
||||
|
||||
if (!viewBinding.enableNotificationsMode.isChecked()) {
|
||||
AppUtil.setMultiVisibility(
|
||||
|
@ -154,18 +154,28 @@ public class SettingsNotificationsActivity extends BaseActivity {
|
|||
// lights color chooser
|
||||
viewBinding.chooseColorFrame.setOnClickListener(
|
||||
v -> {
|
||||
ColorPicker colorPicker = new ColorPicker(SettingsNotificationsActivity.this);
|
||||
colorPicker.setColor(tinyDB.getInt("notificationsLightColor", Color.GREEN));
|
||||
colorPicker.setCallback(
|
||||
color -> {
|
||||
tinyDB.putInt("notificationsLightColor", color);
|
||||
viewBinding.chooseColorState.setCardBackgroundColor(color);
|
||||
colorPicker.dismiss();
|
||||
Toasty.success(
|
||||
appCtx, getResources().getString(R.string.settingsSave));
|
||||
});
|
||||
ColorPickerDialog.Builder builder =
|
||||
new ColorPickerDialog.Builder(this)
|
||||
.setPreferenceName("colorPickerDialogLabels")
|
||||
.setPositiveButton(
|
||||
getString(R.string.okButton),
|
||||
(ColorEnvelopeListener)
|
||||
(envelope, clicked) -> {
|
||||
tinyDB.putInt(
|
||||
"notificationsLightColor",
|
||||
envelope.getColor());
|
||||
viewBinding.chooseColorState
|
||||
.setCardBackgroundColor(
|
||||
envelope.getColor());
|
||||
})
|
||||
.attachAlphaSlideBar(true)
|
||||
.attachBrightnessSlideBar(true)
|
||||
.setBottomSpace(16);
|
||||
|
||||
colorPicker.show();
|
||||
builder.getColorPickerView().setFlagView(new BubbleFlag(this));
|
||||
|
||||
builder.getColorPickerView().setLifecycleOwner(this);
|
||||
builder.show();
|
||||
});
|
||||
|
||||
// vibration switcher
|
||||
|
|
|
@ -293,8 +293,8 @@ public class AppUtil {
|
|||
return str.matches("^[\\w]+$");
|
||||
}
|
||||
|
||||
public static Boolean checkStrings(String str) { // [a-zA-Z0-9-_. ]
|
||||
return str.matches("^[\\w .-]+$");
|
||||
public static Boolean checkStrings(String str) { // [a-zA-Z0-9-_. /]
|
||||
return str.matches("^[\\w .-/]+$");
|
||||
}
|
||||
|
||||
public static Boolean checkStringsWithAlphaNumericDashDotUnderscore(
|
||||
|
|
|
@ -1,125 +1,110 @@
|
|||
<?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"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView"
|
||||
app:elevation="@dimen/dimen0dp">
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
style="?attr/collapsingToolbarLayoutLargeStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
||||
app:contentScrim="?attr/primaryBackgroundColor"
|
||||
android:layout_height="?attr/collapsingToolbarLayoutLargeSize">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="@dimen/dimen26dp"
|
||||
android:layout_height="@dimen/dimen26dp"
|
||||
android:layout_marginStart="@dimen/dimen16dp"
|
||||
android:layout_marginEnd="@dimen/dimen16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/close"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_close"/>
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/topAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:elevation="0dp"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:title="@string/pageTitleCreateLabel"
|
||||
app:layout_collapseMode="pin"
|
||||
app:menu="@menu/create_label_menu"
|
||||
app:navigationIcon="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/pageTitleCreateLabel"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen20sp"/>
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/labelNameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen8dp"
|
||||
android:layout_marginBottom="@dimen/dimen8dp"
|
||||
android:hint="@string/labelName"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/iconsColor"
|
||||
app:hintTextColor="?attr/hintColor">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/labelName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:textColorHighlight="?attr/hintColor"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:layout_marginTop="@dimen/dimen10dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/labelText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight=".95"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/labelColor"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/labelNameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen8dp"
|
||||
android:layout_marginBottom="@dimen/dimen8dp"
|
||||
android:hint="@string/labelName"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/iconsColor"
|
||||
app:hintTextColor="?attr/hintColor">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:layout_width="@dimen/dimen28dp"
|
||||
android:layout_height="@dimen/dimen28dp"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
app:cardElevation="@dimen/dimen0dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/labelName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:textColorHighlight="?attr/hintColor"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:layout_marginTop="@dimen/dimen16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/colorPicker"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/labelText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/releasePre"/>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight=".95"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/labelColor"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen16sp"/>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:layout_width="@dimen/dimen60dp"
|
||||
android:layout_height="@dimen/dimen28dp"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
app:cardElevation="@dimen/dimen0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/colorPicker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/releasePre" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/createLabelButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dimen54dp"
|
||||
android:layout_marginTop="@dimen/dimen8dp"
|
||||
android:text="@string/newCreateButtonCopy"
|
||||
android:textColor="?attr/materialCardBackgroundColor"
|
||||
android:textStyle="bold"/>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -1,55 +1,43 @@
|
|||
<?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"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/Widget.AppCompat.SearchView"
|
||||
app:elevation="@dimen/dimen0dp">
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
style="?attr/collapsingToolbarLayoutLargeStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
||||
app:contentScrim="?attr/primaryBackgroundColor"
|
||||
android:layout_height="?attr/collapsingToolbarLayoutLargeSize">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="@dimen/dimen26dp"
|
||||
android:layout_height="@dimen/dimen26dp"
|
||||
android:layout_marginStart="@dimen/dimen16dp"
|
||||
android:layout_marginEnd="@dimen/dimen16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/close"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_close"/>
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/topAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:elevation="0dp"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:title="@string/pageTitleCreateMilestone"
|
||||
app:layout_collapseMode="pin"
|
||||
app:menu="@menu/create_issue_menu"
|
||||
app:navigationIcon="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/pageTitleCreateMilestone"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen20sp"/>
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<ScrollView
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor">
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -65,7 +53,6 @@
|
|||
android:layout_marginBottom="@dimen/dimen8dp"
|
||||
android:hint="@string/newMilestoneTitle"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/iconsColor"
|
||||
|
@ -93,7 +80,6 @@
|
|||
android:layout_marginBottom="@dimen/dimen8dp"
|
||||
android:hint="@string/newMilestoneDescription"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
app:counterEnabled="true"
|
||||
app:counterMaxLength="255"
|
||||
|
@ -136,7 +122,6 @@
|
|||
android:layout_marginBottom="@dimen/dimen8dp"
|
||||
android:hint="@string/newMilestoneDueDate"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/iconsColor"
|
||||
|
@ -155,18 +140,9 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/createNewMilestoneButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dimen54dp"
|
||||
android:layout_marginTop="@dimen/dimen8dp"
|
||||
android:text="@string/newCreateButtonCopy"
|
||||
android:textColor="?attr/materialCardBackgroundColor"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
|
|
@ -1,219 +1,182 @@
|
|||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:orientation="vertical">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen10dp"
|
||||
android:theme="@style/Widget.AppCompat.SearchView"
|
||||
app:elevation="@dimen/dimen0dp">
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
style="?attr/collapsingToolbarLayoutLargeStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/primaryBackgroundColor"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
tools:ignore="UnusedAttribute">
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
||||
app:contentScrim="?attr/primaryBackgroundColor"
|
||||
android:layout_height="?attr/collapsingToolbarLayoutLargeSize">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="@dimen/dimen26dp"
|
||||
android:layout_height="@dimen/dimen26dp"
|
||||
android:layout_marginStart="@dimen/dimen16dp"
|
||||
android:layout_marginEnd="@dimen/dimen16dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/close"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_close" />
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/topAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:elevation="0dp"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:title="@string/pageTitleNotifications"
|
||||
app:layout_collapseMode="pin"
|
||||
app:navigationIcon="@drawable/ic_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/pageTitleNotifications"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen20sp" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/enableNotificationsFrame"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="100"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableNotificationsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="90"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:text="@string/enableNotificationsHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
android:gravity="center_vertical|end"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/enableNotificationsMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:paddingStart="@dimen/dimen24dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
<LinearLayout
|
||||
android:id="@+id/enableNotificationsFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableNotificationsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/enableNotificationsHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/enableNotificationsMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/enableNotificationsHeaderText"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pollingDelayFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pollingDelayHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/notificationsPollingHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pollingDelaySelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pollingDelaySelectedText"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/enableLightsFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableLightsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/enableLightsHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/enableLightsMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/enableLightsHeaderText"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/chooseColorFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chooseColorHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/chooseColorSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/chooseColorState"
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="@dimen/dimen24dp"
|
||||
android:layout_height="@dimen/dimen32dp"
|
||||
android:layout_weight=".10"
|
||||
android:gravity="end"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
app:cardElevation="@dimen/dimen0dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/enableVibrationFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableVibrationHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".90"
|
||||
android:text="@string/enableVibrationHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:layout_marginTop="@dimen/dimen4dp"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/enableVibrationMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/enableVibrationHeaderText"
|
||||
android:layout_weight=".10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pollingDelayFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pollingDelayHeaderSelector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/notificationsPollingHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pollingDelaySelected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/pollingDelaySelectedText"
|
||||
android:textColor="?attr/selectedTextColor"
|
||||
android:textSize="@dimen/dimen16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/enableLightsFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableLightsHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/enableLightsHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/enableLightsMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="end"
|
||||
android:layout_toEndOf="@+id/enableLightsHeader"
|
||||
android:gravity="end"
|
||||
android:paddingStart="@dimen/dimen0dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/chooseColorFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chooseColorHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen24dp"
|
||||
android:text="@string/chooseColorSelectorHeader"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/chooseColorState"
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="@dimen/dimen28dp"
|
||||
android:layout_height="@dimen/dimen28dp"
|
||||
android:layout_alignEnd="@id/chooseColorHeader"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dimen28dp"
|
||||
android:gravity="end"
|
||||
app:cardCornerRadius="@dimen/dimen16dp"
|
||||
app:cardElevation="@dimen/dimen0dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/enableVibrationFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dimen6dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dimen16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/enableVibrationHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dimen24dp"
|
||||
android:layout_marginEnd="@dimen/dimen72dp"
|
||||
android:text="@string/enableVibrationHeaderText"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="@dimen/dimen18sp" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/enableVibrationMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dimen24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_gravity="end"
|
||||
android:layout_toEndOf="@+id/enableVibrationHeader"
|
||||
android:gravity="end"
|
||||
android:paddingStart="@dimen/dimen0dp"
|
||||
android:paddingEnd="@dimen/dimen24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/profileTabFollowers" />
|
||||
|
||||
<Button
|
||||
|
@ -123,6 +124,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/profileTabFollowing" />
|
||||
|
||||
<Button
|
||||
|
@ -131,6 +133,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/starredRepos" />
|
||||
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
android:layout_marginBottom="@dimen/dimen20dp"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/metaInfoGroup"
|
||||
|
@ -174,6 +174,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_star_unfilled"
|
||||
android:text="@string/repoStars" />
|
||||
|
||||
|
@ -183,6 +184,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_pull_request"
|
||||
android:text="@string/repoStars" />
|
||||
|
||||
|
@ -192,6 +194,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_fork"
|
||||
android:text="@string/repoStars" />
|
||||
|
||||
|
@ -201,18 +204,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_watchers"
|
||||
android:text="@string/repoStars" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/repoAdditionalButton"
|
||||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
app:icon="@drawable/ic_info"
|
||||
android:text="@string/infoMoreInformation" />
|
||||
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -375,6 +370,26 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/moreInfoFrame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dimen8dp"
|
||||
android:layout_marginBottom="@dimen/dimen12dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/repoAdditionalButton"
|
||||
style="?attr/materialButtonToggleGroupStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dimen12sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_info"
|
||||
android:text="@string/infoMoreInformation" />
|
||||
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/create"
|
||||
android:orderInCategory="0"
|
||||
android:title="@string/newCreateButtonCopy"
|
||||
android:contentDescription="@string/newCreateButtonCopy"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/update"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/newUpdateButtonCopy"
|
||||
android:contentDescription="@string/newUpdateButtonCopy"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
|
@ -7,7 +7,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.0.2'
|
||||
classpath 'com.android.tools.build:gradle:8.1.2'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,6 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register('clean', Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue