Browse Source

spinner adde to splash screen

master
Preyea Regmi 5 years ago
parent
commit
73aa53e82b
  1. 9
      app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java
  2. 7
      app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java
  3. 14
      app/src/main/res/layout/activity_splash_screen_key_0.xml
  4. 14
      app/src/main/res/layout/activity_splash_screen_key_1.xml
  5. 14
      app/src/main/res/layout/activity_splash_screen_key_2.xml

9
app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java

@ -45,13 +45,6 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
private final CompositeDisposable compositeDisposables; private final CompositeDisposable compositeDisposables;
private final String sendCountryDefault = "118"; private final String sendCountryDefault = "118";
/**
* Exrate Related Data
*/
private List<CountryPaymentService> countryRelatedCurrencyList; private List<CountryPaymentService> countryRelatedCurrencyList;
private CountryPaymentService selectedCountryPaymentService; private CountryPaymentService selectedCountryPaymentService;
private PaymentMode selectedPaymentMode; private PaymentMode selectedPaymentMode;
@ -139,7 +132,7 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
public void getExrateRelatedData() { public void getExrateRelatedData() {
compositeDisposables.add( compositeDisposables.add(
Observable.zip(getPaymentServiceInfo(), getDefaultValue(this.gateway.getPreferredCountryCode()), PaymentServiceData::new) Observable.zip(getPaymentServiceInfo(), getDefaultValue(this.gateway.getPreferredCountryCode()), PaymentServiceData::new)
.delay(300, TimeUnit.MILLISECONDS)
.delaySubscription(3000, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribeWith(new PaymentServiceDataObserver()) .subscribeWith(new PaymentServiceDataObserver())
); );

7
app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java

@ -16,6 +16,7 @@ import android.support.transition.Transition;
import android.support.transition.TransitionListenerAdapter; import android.support.transition.TransitionListenerAdapter;
import android.support.transition.TransitionManager; import android.support.transition.TransitionManager;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.GestureDetectorCompat; import android.support.v4.view.GestureDetectorCompat;
import android.support.v4.view.ViewCompat; import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorListenerAdapter; import android.support.v4.view.ViewPropertyAnimatorListenerAdapter;
@ -33,6 +34,7 @@ import android.view.animation.OvershootInterpolator;
import android.view.inputmethod.EditorInfo; import android.view.inputmethod.EditorInfo;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import com.gmeremit.online.gmeremittance_native.R; import com.gmeremit.online.gmeremittance_native.R;
@ -131,6 +133,9 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
@BindView(R.id.sendMoneyViewContainer) @BindView(R.id.sendMoneyViewContainer)
View sendMoneyViewContainer; View sendMoneyViewContainer;
@BindView(R.id.progressBar)
ProgressBar progressBar;
LanguageViewTransitionManager languageViewTransitionManager; LanguageViewTransitionManager languageViewTransitionManager;
@ -175,6 +180,8 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
} }
private void init() { private void init() {
progressBar.getIndeterminateDrawable().setColorFilter(ContextCompat.getColor(this, android.R.color.white), android.graphics.PorterDuff.Mode.MULTIPLY);
presenter = new SplashScreenPresenter(this); presenter = new SplashScreenPresenter(this);
initAntiDebugger(); initAntiDebugger();
languageViewTransitionManager = new LanguageViewTransitionManager(this); languageViewTransitionManager = new LanguageViewTransitionManager(this);

14
app/src/main/res/layout/activity_splash_screen_key_0.xml

@ -457,6 +457,20 @@
app:layout_constraintVertical_bias="0.52" app:layout_constraintVertical_bias="0.52"
tools:text="2" /> tools:text="2" />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="visible"
android:layout_gravity="center"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:indeterminate="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>

14
app/src/main/res/layout/activity_splash_screen_key_1.xml

@ -460,6 +460,20 @@
app:layout_constraintVertical_bias="0.52" app:layout_constraintVertical_bias="0.52"
tools:text="2" /> tools:text="2" />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="gone"
android:layout_gravity="center"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:indeterminate="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>

14
app/src/main/res/layout/activity_splash_screen_key_2.xml

@ -143,6 +143,20 @@
app:layout_constraintTop_toBottomOf="@+id/btn_new_user" app:layout_constraintTop_toBottomOf="@+id/btn_new_user"
tools:text=" 2.2.3 " /> tools:text=" 2.2.3 " />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="gone"
android:layout_gravity="center"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:indeterminate="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
Loading…
Cancel
Save