mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-01 04:17:21 +01:00
added text limitation for EditText, renamed resource IDs from login page, gradle update
This commit is contained in:
parent
41a038dc5b
commit
ad6254ddaa
@ -7,7 +7,7 @@
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="/opt/Gradle/gradle-6.6.1" />
|
||||
<option name="gradleHome" value="/opt/Gradle/gradle-6.7.1" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
@ -55,10 +55,10 @@ public class LoginActivity extends AppCompatActivity implements OnClickListener
|
||||
super.onCreate(b);
|
||||
setContentView(R.layout.page_login);
|
||||
Toolbar toolbar = findViewById(R.id.login_toolbar);
|
||||
linkButton = findViewById(R.id.linkButton);
|
||||
loginButton = findViewById(R.id.verifier);
|
||||
linkButton = findViewById(R.id.login_get_link);
|
||||
loginButton = findViewById(R.id.login_verifier);
|
||||
root = findViewById(R.id.login_root);
|
||||
pinInput = findViewById(R.id.pin);
|
||||
pinInput = findViewById(R.id.login_enter_pin);
|
||||
|
||||
settings = GlobalSettings.getInstance(this);
|
||||
toolbar.setTitle(R.string.login_info);
|
||||
@ -116,7 +116,7 @@ public class LoginActivity extends AppCompatActivity implements OnClickListener
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// get login request link
|
||||
if (v.getId() == R.id.linkButton) {
|
||||
if (v.getId() == R.id.login_get_link) {
|
||||
if (registerAsync == null || registerAsync.getStatus() != RUNNING) {
|
||||
Toast.makeText(this, R.string.info_fetching_link, LENGTH_LONG).show();
|
||||
registerAsync = new Registration(this);
|
||||
@ -124,7 +124,7 @@ public class LoginActivity extends AppCompatActivity implements OnClickListener
|
||||
}
|
||||
}
|
||||
// verify user
|
||||
else if (v.getId() == R.id.verifier) {
|
||||
else if (v.getId() == R.id.login_verifier) {
|
||||
if (registerAsync == null || registerAsync.getStatus() != FINISHED) {
|
||||
Toast.makeText(this, R.string.info_get_link, LENGTH_LONG).show();
|
||||
} else if (pinInput.getText() != null && pinInput.length() > 0) {
|
||||
|
@ -102,13 +102,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/editprofile_layout_padding"
|
||||
android:layout_marginRight="@dimen/editprofile_layout_padding"
|
||||
android:padding="@dimen/editprofile_edittext_padding"
|
||||
android:background="@color/half_transparent"
|
||||
android:hint="@string/enter_username"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text"
|
||||
android:maxLength="@integer/editprofile_username_max_length"
|
||||
android:padding="@dimen/editprofile_edittext_padding"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/editprofile_textsize"
|
||||
android:importantForAutofill="no" />
|
||||
android:textSize="@dimen/editprofile_textsize" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -39,10 +39,10 @@
|
||||
android:textSize="24sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/linkButton"
|
||||
android:id="@+id/login_get_link"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/loginpage_button_size"
|
||||
android:layout_height="@dimen/loginpage_button_height"
|
||||
android:background="@drawable/button"
|
||||
android:paddingLeft="@dimen/loginpage_button_padding"
|
||||
android:paddingRight="@dimen/loginpage_button_padding"
|
||||
@ -57,7 +57,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/loginpage_button_size"
|
||||
android:layout_height="@dimen/loginpage_button_height"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@ -70,18 +70,19 @@
|
||||
android:textSize="24sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/pin"
|
||||
android:id="@+id/login_enter_pin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="@dimen/loginpage_button_height"
|
||||
android:autofillHints="pin"
|
||||
android:background="@android:color/transparent"
|
||||
android:drawablePadding="@dimen/loginpage_padding_drawable"
|
||||
android:hint="@string/login_pin"
|
||||
android:inputType="numberPassword"
|
||||
android:maxLength="@integer/loginpage_pin_max_chars"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/loginpage_textsize_login_key"
|
||||
app:drawableLeftCompat="@drawable/key"
|
||||
app:drawableStartCompat="@drawable/key"
|
||||
android:autofillHints="pin" />
|
||||
app:drawableStartCompat="@drawable/key" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -105,10 +106,10 @@
|
||||
android:textSize="24sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/verifier"
|
||||
android:id="@+id/login_verifier"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/loginpage_button_size"
|
||||
android:layout_height="@dimen/loginpage_button_height"
|
||||
android:background="@drawable/button"
|
||||
android:paddingLeft="@dimen/loginpage_button_padding"
|
||||
android:paddingRight="@dimen/loginpage_button_padding"
|
||||
|
@ -358,11 +358,12 @@
|
||||
android:digits="0123456789."
|
||||
android:ems="10"
|
||||
android:hint="@string/enter_proxy"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number|numberDecimal"
|
||||
android:maxLength="15"
|
||||
android:padding="@dimen/settings_edittext_padding"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/settings_edittext_textsize"
|
||||
android:importantForAutofill="no" />
|
||||
android:textSize="@dimen/settings_edittext_textsize" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_proxyport"
|
||||
@ -373,11 +374,12 @@
|
||||
android:background="@color/half_transparent"
|
||||
android:ems="10"
|
||||
android:hint="@string/proxy_port"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number"
|
||||
android:maxLength="5"
|
||||
android:padding="@dimen/settings_edittext_padding"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/settings_edittext_textsize"
|
||||
android:importantForAutofill="no" />
|
||||
android:textSize="@dimen/settings_edittext_textsize" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -76,6 +76,7 @@
|
||||
<dimen name="editprofile_toolbar_height">@dimen/toolbar_height</dimen>
|
||||
<dimen name="editprofile_dummy_height">@dimen/profile_button_height</dimen>
|
||||
<dimen name="editprofile_add_btn_size">40dp</dimen>
|
||||
<integer name="editprofile_username_max_length">50</integer>
|
||||
|
||||
<!--dimens of item_tweet.xml-->
|
||||
<dimen name="tweetitem_profile_small">36sp</dimen>
|
||||
@ -126,11 +127,12 @@
|
||||
<!--dimens of page_login.xml-->
|
||||
<dimen name="loginpage_toolbar_height">@dimen/toolbar_height</dimen>
|
||||
<dimen name="loginpage_button_padding">24dp</dimen>
|
||||
<dimen name="loginpage_button_size">40dp</dimen>
|
||||
<dimen name="loginpage_button_height">40dp</dimen>
|
||||
<dimen name="loginpage_textsize_button">14sp</dimen>
|
||||
<dimen name="loginpage_padding_drawable">5dp</dimen>
|
||||
<dimen name="loginpage_textsize_login_key">24sp</dimen>
|
||||
<dimen name="loginpage_textsize_login_key">20sp</dimen>
|
||||
<dimen name="loginpage_number_padding">10dp</dimen>
|
||||
<integer name="loginpage_pin_max_chars">10</integer>
|
||||
|
||||
<!--dimens of popup_tweet.xml-->
|
||||
<dimen name="tweetpopup_margin_layout">5dp</dimen>
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user