fixed sign in screen style

This commit is contained in:
Mariotaku Lee 2015-04-26 13:30:13 +08:00
parent ca05126422
commit 95c60ceeae
3 changed files with 24 additions and 20 deletions

View File

@ -91,7 +91,7 @@ import static org.mariotaku.twidere.util.Utils.isUserLoggedIn;
import static org.mariotaku.twidere.util.Utils.showErrorMessage;
import static org.mariotaku.twidere.util.Utils.trim;
public class SignInActivity extends BaseAppCompatActivity implements TwitterConstants, OnClickListener,
public class SignInActivity extends BaseDialogWhenLargeActivity implements TwitterConstants, OnClickListener,
TextWatcher {
private static final String TWITTER_SIGNUP_URL = "https://twitter.com/signup";
@ -104,16 +104,17 @@ public class SignInActivity extends BaseAppCompatActivity implements TwitterCons
private String mConsumerKey, mConsumerSecret;
private String mUsername, mPassword;
private long mAPIChangeTimestamp;
private boolean mSameOAuthSigningUrl, mNoVersionSuffix;
private EditText mEditUsername, mEditPassword;
private Button mSignInButton, mSignUpButton;
private LinearLayout mSignInSignUpContainer, mUsernamePasswordContainer;
private final Handler mHandler = new Handler();
private TwidereApplication mApplication;
private SharedPreferences mPreferences;
private ContentResolver mResolver;
private AbstractSignInTask mTask;
private boolean mSameOAuthSigningUrl, mNoVersionSuffix;
@Override
public void afterTextChanged(final Editable s) {
@ -275,6 +276,8 @@ public class SignInActivity extends BaseAppCompatActivity implements TwitterCons
setSignInButton();
}
@Override
protected void onCreate(final Bundle savedInstanceState) {
supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR);
@ -482,8 +485,6 @@ public class SignInActivity extends BaseAppCompatActivity implements TwitterCons
setSignInButton();
}
private final Handler mHandler = new Handler();
void onSignInStart() {
mHandler.post(new Runnable() {
@Override

View File

@ -144,6 +144,8 @@ public class ThemedLayoutInflaterFactory implements LayoutInflaterFactory {
} else if (view instanceof TintableBackgroundView) {
final TintableBackgroundView tintable = (TintableBackgroundView) view;
if (view instanceof Button) {
} else if (view instanceof EditText) {
tintable.setSupportBackgroundTintList(ColorStateList.valueOf(tintColor));
} else {
if (isColorTint) {
final int[][] states = {{android.R.attr.state_selected}, {android.R.attr.state_focused},

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
~ Twidere - Twitter client for Android
~
~ Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com>
@ -17,20 +16,24 @@
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.mariotaku.twidere.view.TintedStatusFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:setPadding="true">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<RelativeLayout
<LinearLayout
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fitsSystemWindows="true"
android:gravity="center">
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:id="@+id/username_password"
@ -47,7 +50,7 @@
android:hint="@string/username"
android:inputType="textEmailAddress"
android:singleLine="true"
android:typeface="normal"/>
android:typeface="normal" />
<EditText
android:id="@+id/password"
@ -58,14 +61,13 @@
android:hint="@string/password"
android:inputType="textPassword"
android:singleLine="true"
android:typeface="normal"/>
android:typeface="normal" />
</LinearLayout>
<LinearLayout
android:id="@+id/sign_in_sign_up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/username_password"
android:orientation="horizontal"
android:padding="8dp">
@ -77,7 +79,7 @@
android:layout_weight="1"
android:minHeight="48dp"
android:onClick="onClick"
android:text="@string/register"/>
android:text="@string/register" />
<Button
android:id="@+id/sign_in"
@ -87,7 +89,7 @@
android:layout_weight="1"
android:minHeight="48dp"
android:onClick="onClick"
android:text="@string/sign_in"/>
android:text="@string/sign_in" />
</LinearLayout>
@ -96,15 +98,14 @@
style="?android:borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/sign_in_sign_up"
android:layout_margin="8dp"
android:clickable="true"
android:gravity="center_vertical"
android:minHeight="36dp"
android:onClick="onClick"
android:text="@string/sign_in_method_introduction_title"
android:textAppearance="?android:textAppearanceSmall"/>
</RelativeLayout>
android:textAppearance="?android:textAppearanceSmall" />
</LinearLayout>
</ScrollView>
</merge>
</org.mariotaku.twidere.view.TintedStatusFrameLayout>