Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Commit

Permalink
Changed auth layout
Browse files Browse the repository at this point in the history
Fixed crash in change description activity
  • Loading branch information
CoolONEOfficial committed Apr 26, 2018
1 parent 11d1bba commit 588c647
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "ru.coolone.travelquest"
minSdkVersion 19
targetSdkVersion 27
versionCode 8
versionName "1.7"
versionCode 9
versionName "1.8"

// Google maps key
manifestPlaceholders = [googleMapApiKey: GOOGLE_MAPS_API_KEY]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ abstract public class AbstractAuthActivity
// --- Ui references ---
// Auth form
protected View authFormView;
// OAuth form
protected View oauthFormView;
// Progress
protected RelativeLayout progressLayout;
protected ProgressBar progressBar;
Expand Down Expand Up @@ -239,6 +241,11 @@ private void setProgressVisibility(final boolean visibility) {
? View.GONE
: View.VISIBLE
);
oauthFormView.setVisibility(
visibility
? View.GONE
: View.VISIBLE
);
authFormView
.animate()
.setDuration(shortAnimTime)
Expand All @@ -250,6 +257,11 @@ private void setProgressVisibility(final boolean visibility) {
new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
oauthFormView.setVisibility(
visibility
? View.GONE
: View.VISIBLE
);
authFormView.setVisibility(
visibility
? View.GONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected void onCreate(Bundle savedInstanceState) {
passwordView = findViewById(R.id.login_text_password);
authButton = findViewById(R.id.login_button_login);
authFormView = findViewById(R.id.login_form);
oauthFormView = findViewById(R.id.oauth_form);
oauthGoogleView = findViewById(R.id.login_oauth_google);
progressLayout = findViewById(R.id.login_progress_layout);
progressBar = findViewById(R.id.login_progress_bar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.InstanceState;
import org.androidannotations.annotations.ViewById;

import lombok.val;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected void onCreate(Bundle savedInstanceState) {
passwordView = findViewById(R.id.signin_text_password);
authButton = findViewById(R.id.signin_button_signin);
authFormView = findViewById(R.id.signin_form);
oauthFormView = findViewById(R.id.oauth_form);
oauthGoogleView = findViewById(R.id.signin_oauth_google);
progressLayout = findViewById(R.id.signin_progress_layout);
progressBar = findViewById(R.id.signin_progress_bar);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.Fragment;
Expand All @@ -28,9 +29,12 @@
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.Extra;
import org.androidannotations.annotations.FragmentArg;
import org.androidannotations.annotations.InstanceState;
import org.androidannotations.annotations.ViewById;

import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
Expand All @@ -51,7 +55,7 @@ public class PlaceDetailsFragment extends Fragment {

static final String TAG = PlaceDetailsFragment.class.getSimpleName();

private FragmentListener fragmentListener;
FragmentListener fragmentListener;

@ViewById(R.id.details_details_recycler)
public RecyclerView detailsRecyclerView;
Expand Down
12 changes: 9 additions & 3 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -90,7 +90,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/login_text_view_signin" />
</LinearLayout>

<LinearLayout
android:id="@+id/oauth_form"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="bottom">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -102,9 +109,8 @@
android:id="@+id/login_oauth_google"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginTop="@dimen/content_inset"
android:src="@drawable/ic_auth_google"
android:clickable="true"
android:focusable="true" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

0 comments on commit 588c647

Please sign in to comment.