修复开通贵族全服通知不滚动问题
This commit is contained in:
parent
d544de6c1d
commit
548e373310
@ -1,7 +1,9 @@
|
||||
package com.yunbao.common.views.weight;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.AsyncTask;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
@ -256,14 +258,35 @@ public class NobleNoticeView extends FrameLayout {
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
@Override
|
||||
public void onStep(int frame, double v) {
|
||||
System.out.println("frame = " + frame);
|
||||
System.out.println("scrollLayout.getMeasuredWidth() = " + scrollLayout.getMeasuredWidth());
|
||||
if (frame == 21) {
|
||||
setButtonPosition(roleType);
|
||||
observable.observeOn(AndroidSchedulers.mainThread())
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground(Void... voids) {
|
||||
// 在这里执行后台任务
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void aVoid) {
|
||||
super.onPostExecute(aVoid);
|
||||
TranslateAnimation animationTranslate = new TranslateAnimation(scrollLayout.getMeasuredHeight(), -scrollLayout.getMeasuredWidth(), 0, 0);
|
||||
AnimationSet animationSet1 = new AnimationSet(true);
|
||||
animationSet1.addAnimation(animationTranslate);
|
||||
animationSet1.setFillAfter(true);
|
||||
animationSet1.setDuration((animationTime - 1000) / 2);
|
||||
animationSet1.setAnimationListener(animationListener);
|
||||
scrollLayout.startAnimation(animationSet1);
|
||||
}
|
||||
}.execute();
|
||||
/*observable.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(bitmap -> {
|
||||
L.e("44444");
|
||||
TranslateAnimation animationTranslate = new TranslateAnimation(0, -scrollLayout.getMeasuredWidth(), 0, 0);
|
||||
AnimationSet animationSet1 = new AnimationSet(true);
|
||||
animationSet1.addAnimation(animationTranslate);
|
||||
@ -273,8 +296,7 @@ public class NobleNoticeView extends FrameLayout {
|
||||
scrollLayout.startAnimation(animationSet1);
|
||||
}, throwable -> {
|
||||
|
||||
}).isDisposed();
|
||||
|
||||
}).isDisposed();*/
|
||||
}
|
||||
if (frame == 135) {
|
||||
contextLayout.setVisibility(GONE);
|
||||
@ -377,12 +399,10 @@ public class NobleNoticeView extends FrameLayout {
|
||||
Animation.AnimationListener animationListener = new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
|
||||
scrollLayout.clearAnimation();
|
||||
if (svagaBc.isAnimating()) {
|
||||
TranslateAnimation animationTranslate = new TranslateAnimation(0, -scrollLayout.getMeasuredWidth(), 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user