mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-24 21:33:16 +08:00
修复 在魅族设备上新建项目、问题反馈、打包应用等崩溃的问题
This commit is contained in:
parent
7ac7795caf
commit
67f995915b
@ -2,15 +2,15 @@ package org.autojs.autojs.ui.common;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.afollestad.materialdialogs.DialogAction;
|
||||
import com.afollestad.materialdialogs.MaterialDialog;
|
||||
import com.stardust.app.DialogUtils;
|
||||
import com.stardust.app.GlobalAppContext;
|
||||
import org.autojs.autojs.App;
|
||||
|
||||
import org.autojs.autojs.R;
|
||||
import org.autojs.autojs.model.script.ScriptFile;
|
||||
import org.autojs.autojs.model.script.Scripts;
|
||||
@ -28,13 +28,13 @@ public class ScriptLoopDialog {
|
||||
private MaterialDialog mDialog;
|
||||
|
||||
@BindView(R.id.loop_times)
|
||||
TextInputEditText mLoopTimes;
|
||||
EditText mLoopTimes;
|
||||
|
||||
@BindView(R.id.loop_interval)
|
||||
TextInputEditText mLoopInterval;
|
||||
EditText mLoopInterval;
|
||||
|
||||
@BindView(R.id.loop_delay)
|
||||
TextInputEditText mLoopDelay;
|
||||
EditText mLoopDelay;
|
||||
|
||||
|
||||
public ScriptLoopDialog(Context context, ScriptFile file) {
|
||||
@ -44,12 +44,7 @@ public class ScriptLoopDialog {
|
||||
.title(R.string.text_run_repeatedly)
|
||||
.customView(view, true)
|
||||
.positiveText(R.string.ok)
|
||||
.onPositive(new MaterialDialog.SingleButtonCallback() {
|
||||
@Override
|
||||
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
|
||||
startScriptRunningLoop();
|
||||
}
|
||||
})
|
||||
.onPositive((dialog, which) -> startScriptRunningLoop())
|
||||
.build();
|
||||
ButterKnife.bind(this, view);
|
||||
}
|
||||
|
||||
@ -4,8 +4,6 @@ import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
@ -15,11 +13,8 @@ import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringDef;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.support.v4.app.NavUtils;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@ -36,6 +31,7 @@ import android.widget.Toast;
|
||||
import com.afollestad.materialdialogs.DialogAction;
|
||||
import com.afollestad.materialdialogs.MaterialDialog;
|
||||
import com.github.aakira.expandablelayout.ExpandableRelativeLayout;
|
||||
import com.heinrichreimersoftware.androidissuereporter.R;
|
||||
import com.heinrichreimersoftware.androidissuereporter.model.DeviceInfo;
|
||||
import com.heinrichreimersoftware.androidissuereporter.model.Report;
|
||||
import com.heinrichreimersoftware.androidissuereporter.model.github.ExtraInfo;
|
||||
@ -43,7 +39,9 @@ import com.heinrichreimersoftware.androidissuereporter.model.github.GithubLogin;
|
||||
import com.heinrichreimersoftware.androidissuereporter.model.github.GithubTarget;
|
||||
import com.heinrichreimersoftware.androidissuereporter.util.ColorUtils;
|
||||
import com.heinrichreimersoftware.androidissuereporter.util.ThemeUtils;
|
||||
import com.stardust.theme.ThemeColorManager;
|
||||
|
||||
import org.autojs.autojs.BuildConfig;
|
||||
import org.autojs.autojs.ui.BaseActivity;
|
||||
import org.eclipse.egit.github.core.Issue;
|
||||
import org.eclipse.egit.github.core.client.GitHubClient;
|
||||
@ -57,10 +55,6 @@ import java.lang.ref.WeakReference;
|
||||
|
||||
import static android.util.Patterns.EMAIL_ADDRESS;
|
||||
|
||||
import com.heinrichreimersoftware.androidissuereporter.R;
|
||||
import org.autojs.autojs.BuildConfig;
|
||||
import com.stardust.theme.ThemeColorManager;
|
||||
|
||||
/**
|
||||
* Created by Stardust on 2017/4/3.
|
||||
*/
|
||||
@ -88,15 +82,15 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
private boolean emailRequired = false;
|
||||
private int bodyMinChar = 0;
|
||||
private Toolbar toolbar;
|
||||
private TextInputEditText inputTitle;
|
||||
private TextInputEditText inputDescription;
|
||||
private EditText inputTitle;
|
||||
private EditText inputDescription;
|
||||
private TextView textDeviceInfo;
|
||||
private ImageButton buttonDeviceInfo;
|
||||
private ExpandableRelativeLayout layoutDeviceInfo;
|
||||
private ExpandableRelativeLayout layoutAnonymous;
|
||||
private TextInputEditText inputUsername;
|
||||
private TextInputEditText inputPassword;
|
||||
private TextInputEditText inputEmail;
|
||||
private EditText inputUsername;
|
||||
private EditText inputPassword;
|
||||
private EditText inputEmail;
|
||||
private RadioButton optionUseAccount;
|
||||
private RadioButton optionAnonymous;
|
||||
private ExpandableRelativeLayout layoutLogin;
|
||||
@ -127,12 +121,7 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
|
||||
handleIntent();
|
||||
|
||||
optionAnonymous.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
optionAnonymous.performClick();
|
||||
}
|
||||
});
|
||||
optionAnonymous.post(() -> optionAnonymous.performClick());
|
||||
}
|
||||
|
||||
private void handleIntent() {
|
||||
@ -153,23 +142,23 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void findViews() {
|
||||
toolbar = (Toolbar) findViewById(R.id.air_toolbar);
|
||||
toolbar = findViewById(R.id.air_toolbar);
|
||||
|
||||
inputTitle = (TextInputEditText) findViewById(R.id.air_inputTitle);
|
||||
inputDescription = (TextInputEditText) findViewById(R.id.air_inputDescription);
|
||||
textDeviceInfo = (TextView) findViewById(R.id.air_textDeviceInfo);
|
||||
buttonDeviceInfo = (ImageButton) findViewById(R.id.air_buttonDeviceInfo);
|
||||
layoutDeviceInfo = (ExpandableRelativeLayout) findViewById(R.id.air_layoutDeviceInfo);
|
||||
inputTitle = findViewById(R.id.air_inputTitle);
|
||||
inputDescription = findViewById(R.id.air_inputDescription);
|
||||
textDeviceInfo = findViewById(R.id.air_textDeviceInfo);
|
||||
buttonDeviceInfo = findViewById(R.id.air_buttonDeviceInfo);
|
||||
layoutDeviceInfo = findViewById(R.id.air_layoutDeviceInfo);
|
||||
|
||||
inputUsername = (TextInputEditText) findViewById(R.id.air_inputUsername);
|
||||
inputPassword = (TextInputEditText) findViewById(R.id.air_inputPassword);
|
||||
inputEmail = (TextInputEditText) findViewById(R.id.air_inputEmail);
|
||||
optionUseAccount = (RadioButton) findViewById(R.id.air_optionUseAccount);
|
||||
optionAnonymous = (RadioButton) findViewById(R.id.air_optionAnonymous);
|
||||
layoutLogin = (ExpandableRelativeLayout) findViewById(R.id.air_layoutLogin);
|
||||
layoutAnonymous = (ExpandableRelativeLayout) findViewById(R.id.air_layoutGuest);
|
||||
inputUsername = findViewById(R.id.air_inputUsername);
|
||||
inputPassword = findViewById(R.id.air_inputPassword);
|
||||
inputEmail = findViewById(R.id.air_inputEmail);
|
||||
optionUseAccount = findViewById(R.id.air_optionUseAccount);
|
||||
optionAnonymous = findViewById(R.id.air_optionAnonymous);
|
||||
layoutLogin = findViewById(R.id.air_layoutLogin);
|
||||
layoutAnonymous = findViewById(R.id.air_layoutGuest);
|
||||
|
||||
buttonSend = (FloatingActionButton) findViewById(R.id.air_buttonSend);
|
||||
buttonSend = findViewById(R.id.air_buttonSend);
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
@ -186,46 +175,30 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
toolbar.setBackgroundColor(ThemeColorManager.getColorPrimary());
|
||||
|
||||
|
||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
toolbar.setNavigationOnClickListener(v -> finish());
|
||||
|
||||
buttonDeviceInfo.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
layoutDeviceInfo.toggle();
|
||||
}
|
||||
});
|
||||
buttonDeviceInfo.setOnClickListener(v -> layoutDeviceInfo.toggle());
|
||||
|
||||
|
||||
inputPassword.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView textView, int actionId, KeyEvent event) {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEND) {
|
||||
reportIssue();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
inputPassword.setOnEditorActionListener((textView, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEND) {
|
||||
reportIssue();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
updateGuestTokenViews();
|
||||
|
||||
buttonSend.setImageResource(ColorUtils.isDark(ThemeUtils.getColorAccent(this)) ?
|
||||
R.drawable.air_ic_send_dark : R.drawable.air_ic_send_light);
|
||||
buttonSend.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
try {
|
||||
reportIssue();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
mReportFailed = true;
|
||||
finish();
|
||||
}
|
||||
buttonSend.setOnClickListener(v -> {
|
||||
try {
|
||||
reportIssue();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
mReportFailed = true;
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
@ -251,24 +224,18 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
} else {
|
||||
setOptionUseAccountMarginStart(0);
|
||||
optionUseAccount.setEnabled(true);
|
||||
optionUseAccount.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
layoutLogin.expand();
|
||||
layoutAnonymous.collapse();
|
||||
inputUsername.setEnabled(true);
|
||||
inputPassword.setEnabled(true);
|
||||
}
|
||||
optionUseAccount.setOnClickListener(v -> {
|
||||
layoutLogin.expand();
|
||||
layoutAnonymous.collapse();
|
||||
inputUsername.setEnabled(true);
|
||||
inputPassword.setEnabled(true);
|
||||
});
|
||||
optionAnonymous.setVisibility(View.VISIBLE);
|
||||
optionAnonymous.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
layoutLogin.collapse();
|
||||
layoutAnonymous.expand();
|
||||
inputUsername.setEnabled(false);
|
||||
inputPassword.setEnabled(false);
|
||||
}
|
||||
optionAnonymous.setOnClickListener(v -> {
|
||||
layoutLogin.collapse();
|
||||
layoutAnonymous.expand();
|
||||
inputUsername.setEnabled(false);
|
||||
inputPassword.setEnabled(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -348,7 +315,7 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
return !hasErrors;
|
||||
}
|
||||
|
||||
private void setError(TextInputEditText editText, @StringRes int errorRes) {
|
||||
private void setError(EditText editText, @StringRes int errorRes) {
|
||||
try {
|
||||
View layout = (View) editText.getParent();
|
||||
while (!layout.getClass().getSimpleName().equals(TextInputLayout.class.getSimpleName()))
|
||||
@ -360,7 +327,7 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void setError(TextInputEditText editText, String error) {
|
||||
private void setError(EditText editText, String error) {
|
||||
try {
|
||||
View layout = (View) editText.getParent();
|
||||
while (!layout.getClass().getSimpleName().equals(TextInputLayout.class.getSimpleName()))
|
||||
@ -372,7 +339,7 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void removeError(TextInputEditText editText) {
|
||||
private void removeError(EditText editText) {
|
||||
try {
|
||||
View layout = (View) editText.getParent();
|
||||
while (!layout.getClass().getSimpleName().equals(TextInputLayout.class.getSimpleName()))
|
||||
@ -544,19 +511,8 @@ public abstract class AbstractIssueReporterActivity extends BaseActivity {
|
||||
.title(R.string.air_dialog_title_failed)
|
||||
.content(R.string.air_dialog_description_failed_unknown)
|
||||
.positiveText(R.string.air_dialog_action_failed)
|
||||
.onPositive(new MaterialDialog.SingleButtonCallback() {
|
||||
@Override
|
||||
public void onClick(@NonNull MaterialDialog dialog,
|
||||
@NonNull DialogAction which) {
|
||||
tryToFinishActivity();
|
||||
}
|
||||
})
|
||||
.cancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
tryToFinishActivity();
|
||||
}
|
||||
})
|
||||
.onPositive((dialog, which) -> tryToFinishActivity())
|
||||
.cancelListener(dialog -> tryToFinishActivity())
|
||||
.show();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -6,13 +6,13 @@ import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -61,25 +61,25 @@ public class BuildActivity extends BaseActivity implements ApkBuilder.ProgressCa
|
||||
private static final Pattern REGEX_PACKAGE_NAME = Pattern.compile("^([A-Za-z][A-Za-z\\d_]*\\.)+([A-Za-z][A-Za-z\\d_]*)$");
|
||||
|
||||
@ViewById(R.id.source_path)
|
||||
TextInputEditText mSourcePath;
|
||||
EditText mSourcePath;
|
||||
|
||||
@ViewById(R.id.source_path_container)
|
||||
View mSourcePathContainer;
|
||||
|
||||
@ViewById(R.id.output_path)
|
||||
TextInputEditText mOutputPath;
|
||||
EditText mOutputPath;
|
||||
|
||||
@ViewById(R.id.app_name)
|
||||
TextInputEditText mAppName;
|
||||
EditText mAppName;
|
||||
|
||||
@ViewById(R.id.package_name)
|
||||
TextInputEditText mPackageName;
|
||||
EditText mPackageName;
|
||||
|
||||
@ViewById(R.id.version_name)
|
||||
TextInputEditText mVersionName;
|
||||
EditText mVersionName;
|
||||
|
||||
@ViewById(R.id.version_code)
|
||||
TextInputEditText mVersionCode;
|
||||
EditText mVersionCode;
|
||||
|
||||
@ViewById(R.id.icon)
|
||||
ImageView mIcon;
|
||||
@ -224,7 +224,7 @@ public class BuildActivity extends BaseActivity implements ApkBuilder.ProgressCa
|
||||
return inputValid;
|
||||
}
|
||||
|
||||
private boolean checkPackageNameValid(TextInputEditText editText) {
|
||||
private boolean checkPackageNameValid(EditText editText) {
|
||||
Editable text = editText.getText();
|
||||
String hint = ((TextInputLayout) editText.getParent().getParent()).getHint().toString();
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
@ -239,7 +239,7 @@ public class BuildActivity extends BaseActivity implements ApkBuilder.ProgressCa
|
||||
|
||||
}
|
||||
|
||||
private boolean checkNotEmpty(TextInputEditText editText) {
|
||||
private boolean checkNotEmpty(EditText editText) {
|
||||
if (!TextUtils.isEmpty(editText.getText()) || !editText.isShown())
|
||||
return true;
|
||||
// TODO: 2017/12/8 more beautiful ways?
|
||||
|
||||
@ -5,7 +5,6 @@ import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.TextInputEditText;
|
||||
import android.support.design.widget.TextInputLayout;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
@ -58,16 +57,16 @@ public class ProjectConfigActivity extends BaseActivity {
|
||||
EditText mProjectLocation;
|
||||
|
||||
@ViewById(R.id.app_name)
|
||||
TextInputEditText mAppName;
|
||||
EditText mAppName;
|
||||
|
||||
@ViewById(R.id.package_name)
|
||||
TextInputEditText mPackageName;
|
||||
EditText mPackageName;
|
||||
|
||||
@ViewById(R.id.version_name)
|
||||
TextInputEditText mVersionName;
|
||||
EditText mVersionName;
|
||||
|
||||
@ViewById(R.id.version_code)
|
||||
TextInputEditText mVersionCode;
|
||||
EditText mVersionCode;
|
||||
|
||||
@ViewById(R.id.main_file_name)
|
||||
EditText mMainFileName;
|
||||
@ -215,7 +214,7 @@ public class ProjectConfigActivity extends BaseActivity {
|
||||
return inputValid;
|
||||
}
|
||||
|
||||
private boolean checkPackageNameValid(TextInputEditText editText) {
|
||||
private boolean checkPackageNameValid(EditText editText) {
|
||||
Editable text = editText.getText();
|
||||
String hint = ((TextInputLayout) editText.getParent().getParent()).getHint().toString();
|
||||
if(TextUtils.isEmpty(text)){
|
||||
@ -230,7 +229,7 @@ public class ProjectConfigActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
private boolean checkNotEmpty(TextInputEditText editText) {
|
||||
private boolean checkNotEmpty(EditText editText) {
|
||||
if (!TextUtils.isEmpty(editText.getText()))
|
||||
return true;
|
||||
// TODO: 2017/12/8 more beautiful ways?
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
android:layout_weight="1"
|
||||
android:hint="@string/text_source_file_path">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/source_path"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -98,7 +98,7 @@
|
||||
android:layout_weight="1"
|
||||
android:hint="@string/text_output_apk_path">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/output_path"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -147,7 +147,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_app_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/app_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
@ -159,7 +159,7 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="@string/text_package_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/package_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -183,7 +183,7 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="@string/text_version_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/version_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -197,7 +197,7 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="@string/text_version_code">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/version_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/text_username">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -53,7 +53,7 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:hint="@string/text_password">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_app_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/app_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
@ -73,7 +73,7 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="@string/text_package_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/package_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -97,7 +97,7 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="@string/text_version_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/version_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -111,11 +111,10 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:hint="@string/text_version_code">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/version_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:inputType="number"
|
||||
android:text="1"/>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
@ -154,7 +153,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_project_location">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/project_location"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -193,7 +192,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_main_file_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/main_file_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/text_email">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -54,7 +54,7 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/text_username">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -69,7 +69,7 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:hint="@string/text_password">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -417,7 +417,7 @@
|
||||
android:hint="@string/text_broadcast_action">
|
||||
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<include
|
||||
layout="@layout/air_card_login"
|
||||
layout="@layout/air_card_login_compat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/air_card_margin_top"/>
|
||||
|
||||
156
app/src/main/res/layout/air_card_login_compat.xml
Normal file
156
app/src/main/res/layout/air_card_login_compat.xml
Normal file
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ MIT License
|
||||
~
|
||||
~ Copyright (c) 2017 Jan Heinrich Reimer
|
||||
~
|
||||
~ Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
~ of this software and associated documentation files (the "Software"), to deal
|
||||
~ in the Software without restriction, including without limitation the rights
|
||||
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
~ copies of the Software, and to permit persons to whom the Software is
|
||||
~ furnished to do so, subject to the following conditions:
|
||||
~
|
||||
~ The above copyright notice and this permission notice shall be included in all
|
||||
~ copies or substantial portions of the Software.
|
||||
~
|
||||
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
~ SOFTWARE.
|
||||
-->
|
||||
|
||||
<android.support.v7.widget.CardView 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="match_parent"
|
||||
app:cardBackgroundColor="?cardBackgroundColor">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/air_baseline">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/air_title_login"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorSecondary"/>
|
||||
|
||||
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/air_optionUseAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/air_baseline"
|
||||
android:checked="true"
|
||||
android:paddingStart="@dimen/air_radio_button_padding_start"
|
||||
android:paddingLeft="@dimen/air_radio_button_padding_start"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:text="@string/air_label_use_account"/>
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:id="@+id/air_layoutLogin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="true"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/air_baseline_half"
|
||||
android:hint="@string/air_label_username">
|
||||
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/air_inputUsername"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:maxLines="1"/>
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/air_baseline_half"
|
||||
android:hint="@string/air_label_password"
|
||||
app:passwordToggleEnabled="true">
|
||||
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/air_inputPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionSend"
|
||||
android:inputType="textPassword"/>
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/air_optionAnonymous"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/air_baseline"
|
||||
android:paddingStart="@dimen/air_radio_button_padding_start"
|
||||
android:paddingLeft="@dimen/air_radio_button_padding_start"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingRight="0dp"
|
||||
android:text="@string/air_label_use_guest"/>
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:id="@+id/air_layoutGuest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/air_inputEmailParent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/air_baseline_half"
|
||||
android:hint="@string/air_label_email_optional">
|
||||
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/air_inputEmail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"/>
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
@ -47,7 +47,7 @@
|
||||
android:layout_marginTop="@dimen/air_baseline"
|
||||
android:hint="@string/air_label_issue_title">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/air_inputTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -62,7 +62,7 @@
|
||||
android:layout_marginTop="@dimen/air_baseline_half"
|
||||
android:hint="@string/air_label_issue_description">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/air_inputDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
android:hint="@string/text_class_or_package_name"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/keywords"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_loop_times">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/loop_times"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -37,7 +37,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_loop_interval">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/loop_interval"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -52,7 +52,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/text_loop_delay">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/loop_delay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="@string/text_name">
|
||||
|
||||
<android.support.design.widget.TextInputEditText
|
||||
<android.support.v7.widget.AppCompatEditText
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user