动画调整
@@ -62,6 +62,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
}else {
|
||||
implementation project(":core:mogo-core-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
@@ -69,6 +70,7 @@ dependencies {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:function-impl:mogo-core-function-v2x')
|
||||
implementation project(':core:mogo-core-res')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,14 @@ import com.amap.api.navi.view.PoiInputSearchWidget
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.OverlayViewUtils
|
||||
import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
|
||||
import com.mogo.och.common.module.wigets.OCHBorderShadowLayout
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerCommonCallback
|
||||
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerScoreCallback
|
||||
import com.mogo.och.taxi.passenger.utils.view.FrameSurfaceView
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
@@ -51,107 +54,15 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
private lateinit var ivStarFourth: ImageView
|
||||
private lateinit var ivStarFifth: ImageView
|
||||
private lateinit var ivAnimalList: ImageView
|
||||
private lateinit var svFrame: FrameSurfaceView
|
||||
private lateinit var svpFrame: SimpleVideoPlayer
|
||||
private var subscribe: Disposable?=null
|
||||
private var orderNo = ""
|
||||
|
||||
var right_res_id = arrayListOf<Int>(
|
||||
R.drawable.tail_ani_0000,
|
||||
R.drawable.tail_ani_0001,
|
||||
R.drawable.tail_ani_0002,
|
||||
R.drawable.tail_ani_0003,
|
||||
R.drawable.tail_ani_0004,
|
||||
R.drawable.tail_ani_0005,
|
||||
R.drawable.tail_ani_0006,
|
||||
R.drawable.tail_ani_0007,
|
||||
R.drawable.tail_ani_0008,
|
||||
R.drawable.tail_ani_0009,
|
||||
R.drawable.tail_ani_0010,
|
||||
R.drawable.tail_ani_0011,
|
||||
R.drawable.tail_ani_0012,
|
||||
R.drawable.tail_ani_0013,
|
||||
R.drawable.tail_ani_0014,
|
||||
R.drawable.tail_ani_0015,
|
||||
R.drawable.tail_ani_0016,
|
||||
R.drawable.tail_ani_0017,
|
||||
R.drawable.tail_ani_0018,
|
||||
R.drawable.tail_ani_0019,
|
||||
R.drawable.tail_ani_0020,
|
||||
R.drawable.tail_ani_0021,
|
||||
R.drawable.tail_ani_0022,
|
||||
R.drawable.tail_ani_0023,
|
||||
R.drawable.tail_ani_0024,
|
||||
R.drawable.tail_ani_0025,
|
||||
R.drawable.tail_ani_0026,
|
||||
R.drawable.tail_ani_0027,
|
||||
R.drawable.tail_ani_0028,
|
||||
R.drawable.tail_ani_0029,
|
||||
R.drawable.tail_ani_0030,
|
||||
R.drawable.tail_ani_0031,
|
||||
R.drawable.tail_ani_0032,
|
||||
R.drawable.tail_ani_0033,
|
||||
R.drawable.tail_ani_0034,
|
||||
R.drawable.tail_ani_0035,
|
||||
R.drawable.tail_ani_0036,
|
||||
R.drawable.tail_ani_0037,
|
||||
R.drawable.tail_ani_0038,
|
||||
R.drawable.tail_ani_0039,
|
||||
R.drawable.tail_ani_0040,
|
||||
R.drawable.tail_ani_0041,
|
||||
R.drawable.tail_ani_0042,
|
||||
R.drawable.tail_ani_0043,
|
||||
R.drawable.tail_ani_0044,
|
||||
R.drawable.tail_ani_0045,
|
||||
R.drawable.tail_ani_0046,
|
||||
R.drawable.tail_ani_0047,
|
||||
R.drawable.tail_ani_0048,
|
||||
R.drawable.tail_ani_0049,
|
||||
R.drawable.tail_ani_0050,
|
||||
R.drawable.tail_ani_0051,
|
||||
R.drawable.tail_ani_0052,
|
||||
R.drawable.tail_ani_0053,
|
||||
R.drawable.tail_ani_0054,
|
||||
R.drawable.tail_ani_0055,
|
||||
R.drawable.tail_ani_0056,
|
||||
R.drawable.tail_ani_0057,
|
||||
R.drawable.tail_ani_0058,
|
||||
R.drawable.tail_ani_0059,
|
||||
R.drawable.tail_ani_0060,
|
||||
R.drawable.tail_ani_0061,
|
||||
R.drawable.tail_ani_0062,
|
||||
R.drawable.tail_ani_0063,
|
||||
R.drawable.tail_ani_0064,
|
||||
R.drawable.tail_ani_0065,
|
||||
R.drawable.tail_ani_0066,
|
||||
R.drawable.tail_ani_0067,
|
||||
R.drawable.tail_ani_0068,
|
||||
R.drawable.tail_ani_0069,
|
||||
R.drawable.tail_ani_0070,
|
||||
R.drawable.tail_ani_0071,
|
||||
R.drawable.tail_ani_0072,
|
||||
R.drawable.tail_ani_0073,
|
||||
R.drawable.tail_ani_0074,
|
||||
R.drawable.tail_ani_0075,
|
||||
R.drawable.tail_ani_0076,
|
||||
R.drawable.tail_ani_0077,
|
||||
R.drawable.tail_ani_0078,
|
||||
R.drawable.tail_ani_0079,
|
||||
R.drawable.tail_ani_0080,
|
||||
R.drawable.tail_ani_0081,
|
||||
R.drawable.tail_ani_0082,
|
||||
R.drawable.tail_ani_0083,
|
||||
R.drawable.tail_ani_0084,
|
||||
R.drawable.tail_ani_0085,
|
||||
R.drawable.tail_ani_0086,
|
||||
R.drawable.tail_ani_0087,
|
||||
R.drawable.tail_ani_0088,
|
||||
R.drawable.tail_ani_0089,
|
||||
R.drawable.tail_ani_0090
|
||||
)
|
||||
private val gsyVideoOptionBuilder = GSYVideoOptionBuilder()
|
||||
|
||||
|
||||
var iTaxiPassengerScoreCallback: ITaxiPassengerScoreCallback?=null
|
||||
@Volatile
|
||||
|
||||
var taxiPassengerCommonCallback: ITaxiPassengerCommonCallback?=null
|
||||
var left2Right: Animation = AnimationUtils.loadAnimation(
|
||||
context, R.anim.left_to_right
|
||||
@@ -176,21 +87,30 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
ochShadowLayout = findViewById(R.id.och_shadow_layout)
|
||||
ochThankShadowLayout = findViewById(R.id.och_thank_shadow_layout)
|
||||
ivAnimalList = findViewById(R.id.iv_animal_list)
|
||||
svFrame = findViewById(R.id.sv_frame)
|
||||
svpFrame = findViewById(R.id.svp_frame)
|
||||
|
||||
allStartOrdered = mutableListOf()
|
||||
initScore()
|
||||
|
||||
findViewById<View>(R.id.tv_please_score).setOnClickListener(this)
|
||||
|
||||
svFrame.setBitmapIds(right_res_id)
|
||||
svFrame.setDuration(2000)
|
||||
|
||||
// debug 弹出
|
||||
mArrivedEndStation.setOnLongClickListener {
|
||||
scoreSuccess()
|
||||
false
|
||||
}
|
||||
|
||||
val url = "android.resource://" + context.packageName + "/" + R.raw.end_video
|
||||
gsyVideoOptionBuilder.setUrl(url)
|
||||
.setCacheWithPlay(false)
|
||||
.setPlayTag("TaxiPassengerArrivedView")
|
||||
.setVideoAllCallBack(object : GSYSampleCallBack() {
|
||||
override fun onAutoComplete(url: String?, vararg objects: Any?) {
|
||||
svpFrame.setBackgroundResource(R.drawable.tail_ani_0090)
|
||||
}
|
||||
})
|
||||
.build(svpFrame)
|
||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL)
|
||||
}
|
||||
|
||||
private fun initScore() {
|
||||
@@ -218,6 +138,7 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
svpFrame.setBackgroundResource(R.drawable.tail_ani_0000)
|
||||
super.onDetachedFromWindow()
|
||||
show = false
|
||||
subscribe?.let {
|
||||
@@ -322,14 +243,11 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
ochThankShadowLayout.visibility = View.GONE
|
||||
ivAnimalList.visibility = View.GONE
|
||||
|
||||
//play frame animation by FrameSurfaceView which is much more memory-efficient than AnimationDrawable
|
||||
svFrame.setRepeatTimes(0)
|
||||
svFrame.setFrameFinishCallback {
|
||||
svpFrame.startButton.performClick()
|
||||
postDelayed({
|
||||
ochShadowLayout.visibility = View.VISIBLE
|
||||
svFrame.setBackgroundResource(R.drawable.tail_ani_0090)
|
||||
ochShadowLayout.startAnimation(left2Right)
|
||||
}
|
||||
svFrame.start()
|
||||
},1928)
|
||||
|
||||
showThanks = false
|
||||
this.orderNo = orderId
|
||||
@@ -378,8 +296,9 @@ class TaxiPassengerArrivedView :RelativeLayout, View.OnClickListener {
|
||||
* 评论失败 重置状态
|
||||
*/
|
||||
fun scoreFail(){
|
||||
tvFeel.text = ""
|
||||
resetStar()
|
||||
scoreSuccess()
|
||||
// tvFeel.text = ""
|
||||
// resetStar()
|
||||
}
|
||||
|
||||
private fun resetStar() {
|
||||
|
||||
@@ -116,14 +116,10 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
}
|
||||
});
|
||||
|
||||
findViewById(R.id.iv_temp).setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
//showOrHideArrivedEndLayout(true, "北京北京北京", "1527481606997577728");
|
||||
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
//CallerHmiManager.INSTANCE.showToolsView();
|
||||
return false;
|
||||
}
|
||||
findViewById(R.id.iv_temp).setOnClickListener(view -> {
|
||||
//showOrHideArrivedEndLayout(true, "北京北京北京", "1527481606997577728");
|
||||
//showOrHidePressengerCheckPager(true, "开始站点开", "开始站点开始站点开始", "2", "京A888888", "18811539480");
|
||||
//CallerHmiManager.INSTANCE.showToolsView();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -281,7 +277,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null){
|
||||
initArrivedView();
|
||||
}
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mArrivedEndView.get());
|
||||
OverlayViewUtils.showOverlayView(getActivity(),mArrivedEndView.get(),R.style.och_window_anim_alpha);
|
||||
mArrivedEndView.get().setDataAndStartAnimation(arrivedEndStation,orderNo);
|
||||
}else {
|
||||
OverlayViewUtils.dismissOverlayView(mArrivedEndView.get());
|
||||
@@ -296,7 +292,7 @@ public class TaxiPassengerBaseFragment extends MvpFragment<TaxiPassengerBaseFrag
|
||||
String passengerNum,
|
||||
String carNumber,
|
||||
String phone){
|
||||
if(mArrivedEndView.get()==null||!mArrivedEndView.get().getShow()){
|
||||
if(mArrivedEndView==null||mArrivedEndView.get()==null||!mArrivedEndView.get().getShow()){
|
||||
showOrHidePressengerCheckPager(true, startSiteAddr,
|
||||
endSiteAddr, passengerNum, carNumber, phone);
|
||||
}else {
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.utils.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
|
||||
public abstract class BaseSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
|
||||
public static final int DEFAULT_FRAME_DURATION_MILLISECOND = 50;
|
||||
|
||||
private HandlerThread handlerThread;
|
||||
private SurfaceViewHandler handler;
|
||||
protected int frameDuration = DEFAULT_FRAME_DURATION_MILLISECOND;
|
||||
private Canvas canvas;
|
||||
private boolean isAlive;
|
||||
|
||||
public BaseSurfaceView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public BaseSurfaceView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public BaseSurfaceView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
protected int getFrameDuration() {
|
||||
return frameDuration;
|
||||
}
|
||||
|
||||
protected void setFrameDuration(int frameDuration) {
|
||||
this.frameDuration = frameDuration;
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
getHolder().addCallback(this);
|
||||
setBackgroundTransparent();
|
||||
}
|
||||
|
||||
private void setBackgroundTransparent() {
|
||||
getHolder().setFormat(PixelFormat.TRANSLUCENT);
|
||||
setZOrderOnTop(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceCreated(SurfaceHolder holder) {
|
||||
isAlive = true;
|
||||
startDrawThread();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void surfaceDestroyed(SurfaceHolder holder) {
|
||||
stopDrawThread();
|
||||
isAlive = false;
|
||||
}
|
||||
|
||||
private void stopDrawThread() {
|
||||
isAlive = false;
|
||||
handlerThread.quit();
|
||||
handler = null;
|
||||
}
|
||||
|
||||
private void startDrawThread() {
|
||||
handlerThread = new HandlerThread("SurfaceViewThread");
|
||||
handlerThread.start();
|
||||
handler = new SurfaceViewHandler(handlerThread.getLooper());
|
||||
handler.post(new DrawRunnable());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
int widthMode = MeasureSpec.getMode(widthMeasureSpec);
|
||||
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
|
||||
int originWidth = getMeasuredWidth();
|
||||
int originHeight = getMeasuredHeight();
|
||||
int width = widthMode == MeasureSpec.AT_MOST ? getDefaultWidth() : originWidth;
|
||||
int height = heightMode == MeasureSpec.AT_MOST ? getDefaultHeight() : originHeight;
|
||||
setMeasuredDimension(width, height);
|
||||
Log.v("ttaylor", "BaseSurfaceView.onMeasure()" + " default Width=" + getDefaultWidth() + " default height=" + getDefaultHeight());
|
||||
}
|
||||
|
||||
/**
|
||||
* the width is used when wrap_content is set to layout_width
|
||||
* the child knows how big it should be
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected abstract int getDefaultWidth();
|
||||
|
||||
/**
|
||||
* the height is used when wrap_content is set to layout_height
|
||||
* the child knows how big it should be
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected abstract int getDefaultHeight();
|
||||
|
||||
|
||||
private class SurfaceViewHandler extends Handler {
|
||||
|
||||
public SurfaceViewHandler(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
super.handleMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
private class DrawRunnable implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (!isAlive) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
canvas = getHolder().lockCanvas();
|
||||
onFrameDraw(canvas);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
getHolder().unlockCanvasAndPost(canvas);
|
||||
onFrameDrawFinish();
|
||||
}
|
||||
|
||||
handler.postDelayed(this, frameDuration);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* it is will be invoked after one frame is drawn
|
||||
*/
|
||||
protected abstract void onFrameDrawFinish();
|
||||
|
||||
/**
|
||||
* draw one frame to the surface by canvas
|
||||
*
|
||||
* @param canvas
|
||||
*/
|
||||
protected abstract void onFrameDraw(Canvas canvas);
|
||||
|
||||
protected void runOnUIThread( Runnable executor ) {
|
||||
if ( executor == null ) {
|
||||
return;
|
||||
}
|
||||
if ( Looper.myLooper() != Looper.getMainLooper() ) {
|
||||
UiThreadHandler.post( executor );
|
||||
} else {
|
||||
executor.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.utils.view;
|
||||
|
||||
public interface FrameFinishCallback {
|
||||
void onFinishCallback();
|
||||
}
|
||||
@@ -1,399 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.utils.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffXfermode;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* a SurfaceView which draws bitmaps one after another like frame animation
|
||||
*/
|
||||
public class FrameSurfaceView extends BaseSurfaceView {
|
||||
public static final int INVALID_INDEX = Integer.MAX_VALUE;
|
||||
private int bufferSize = 3;
|
||||
public static final String DECODE_THREAD_NAME = "DecodingThread";
|
||||
public static final int INFINITE = -1;
|
||||
//-1 means repeat infinitely
|
||||
private int repeatTimes;
|
||||
private int repeatedCount;
|
||||
|
||||
/**
|
||||
* the resources of frame animation
|
||||
*/
|
||||
private List<Integer> bitmapIds = new ArrayList<>();
|
||||
/**
|
||||
* the index of bitmap resource which is decoding
|
||||
*/
|
||||
private int bitmapIdIndex;
|
||||
/**
|
||||
* the index of frame which is drawing
|
||||
*/
|
||||
private AtomicInteger frameIndex;
|
||||
/**
|
||||
* decoded bitmaps stores in this queue
|
||||
* consumer is drawing thread, producer is decoding thread.
|
||||
*/
|
||||
private LinkedBlockingQueue decodedBitmaps = new LinkedBlockingQueue(bufferSize);
|
||||
/**
|
||||
* bitmaps already drawn by canvas stores in this queue
|
||||
* consumer is decoding thread, producer is drawing thread.
|
||||
*/
|
||||
private LinkedBlockingQueue drawnBitmaps = new LinkedBlockingQueue(bufferSize);
|
||||
/**
|
||||
* the thread for decoding bitmaps
|
||||
*/
|
||||
private HandlerThread decodeThread;
|
||||
/**
|
||||
* the Runnable describes how to decode one bitmap
|
||||
*/
|
||||
private DecodeRunnable decodeRunnable;
|
||||
/**
|
||||
* this handler helps to decode bitmap one after another
|
||||
*/
|
||||
private Handler handler;
|
||||
private BitmapFactory.Options options;
|
||||
private Paint paint = new Paint();
|
||||
private Rect srcRect;
|
||||
private Rect dstRect = new Rect();
|
||||
private int defaultWidth;
|
||||
private int defaultHeight;
|
||||
|
||||
private FrameFinishCallback frameFinishCallback;
|
||||
|
||||
public FrameSurfaceView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public FrameSurfaceView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public FrameSurfaceView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public void setRepeatTimes(int repeatTimes) {
|
||||
this.repeatTimes = repeatTimes;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
options = new BitmapFactory.Options();
|
||||
options.inMutable = true;
|
||||
decodeThread = new HandlerThread(DECODE_THREAD_NAME);
|
||||
frameIndex = new AtomicInteger();
|
||||
frameIndex.set(INVALID_INDEX);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
super.onLayout(changed, left, top, right, bottom);
|
||||
dstRect.set(0, 0, getWidth(), getHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDefaultWidth() {
|
||||
return defaultWidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDefaultHeight() {
|
||||
return defaultHeight;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFrameDrawFinish() {
|
||||
}
|
||||
|
||||
/**
|
||||
* set the duration of frame animation
|
||||
*
|
||||
* @param duration time in milliseconds
|
||||
*/
|
||||
public void setDuration(int duration) {
|
||||
int frameDuration = duration / bitmapIds.size();
|
||||
setFrameDuration(frameDuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the materials of frame animation which is an array of bitmap resource id
|
||||
*
|
||||
* @param bitmapIds an array of bitmap resource id
|
||||
*/
|
||||
public void setBitmapIds(List<Integer> bitmapIds) {
|
||||
if (bitmapIds == null || bitmapIds.size() == 0) {
|
||||
return;
|
||||
}
|
||||
this.bitmapIds = bitmapIds;
|
||||
//by default, take the first bitmap's dimension into consideration
|
||||
getBitmapDimension(bitmapIds.get(bitmapIdIndex));
|
||||
preloadFrames();
|
||||
decodeRunnable = new DecodeRunnable(bitmapIdIndex, bitmapIds, options);
|
||||
}
|
||||
|
||||
private void getBitmapDimension(int bitmapId) {
|
||||
final BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
options.inJustDecodeBounds = true;
|
||||
BitmapFactory.decodeResource(this.getResources(), bitmapId, options);
|
||||
defaultWidth = options.outWidth;
|
||||
defaultHeight = options.outHeight;
|
||||
srcRect = new Rect(0, 0, defaultWidth, defaultHeight);
|
||||
//we have to re-measure to make defaultWidth in use in onMeasure()
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
* load the first several frames of animation before it is started
|
||||
*/
|
||||
private void preloadFrames() {
|
||||
decodeAndPutBitmap(bitmapIds.get(bitmapIdIndex++), options, new LinkedBitmap());
|
||||
decodeAndPutBitmap(bitmapIds.get(bitmapIdIndex++), options, new LinkedBitmap());
|
||||
}
|
||||
|
||||
/**
|
||||
* recycle the bitmap used by frame animation.
|
||||
* Usually it should be invoked when the ui of frame animation is no longer visible
|
||||
*/
|
||||
public void destroy() {
|
||||
if (drawnBitmaps != null) {
|
||||
drawnBitmaps.clear();
|
||||
}
|
||||
if (decodeThread != null) {
|
||||
decodeThread.quit();
|
||||
decodeThread = null;
|
||||
}
|
||||
if (handler != null) {
|
||||
handler = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFrameDraw(Canvas canvas) {
|
||||
clearCanvas(canvas);
|
||||
if (!isStart()) {
|
||||
return;
|
||||
}
|
||||
if (!isFinish()) {
|
||||
drawOneFrame(canvas);
|
||||
} else {
|
||||
onFrameAnimationEnd();
|
||||
if (repeatTimes != 0 && repeatTimes == INFINITE) {
|
||||
start();
|
||||
} else if (repeatedCount < repeatTimes) {
|
||||
start();
|
||||
repeatedCount++;
|
||||
} else {
|
||||
repeatedCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* draw a single frame which is a bitmap
|
||||
*
|
||||
* @param canvas
|
||||
*/
|
||||
private void drawOneFrame(Canvas canvas) {
|
||||
LinkedBitmap linkedBitmap = getDecodedBitmap();
|
||||
if (linkedBitmap != null) {
|
||||
canvas.drawBitmap(linkedBitmap.bitmap, srcRect, dstRect, paint);
|
||||
}
|
||||
putDrawnBitmap(linkedBitmap);
|
||||
frameIndex.incrementAndGet();
|
||||
if(isFinish()&&frameFinishCallback!=null){
|
||||
runOnUIThread(() -> frameFinishCallback.onFinishCallback());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* invoked when frame animation is done
|
||||
*/
|
||||
private void onFrameAnimationEnd() {
|
||||
reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* reset the index of frame, preparing for the next frame animation
|
||||
*/
|
||||
private void reset() {
|
||||
frameIndex.set(INVALID_INDEX);
|
||||
}
|
||||
|
||||
/**
|
||||
* whether frame animation is finished
|
||||
*
|
||||
* @return true: animation is finished, false: animation is doing
|
||||
*/
|
||||
private boolean isFinish() {
|
||||
return frameIndex.get() >= bitmapIds.size() - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* whether frame animation is started
|
||||
*
|
||||
* @return true: animation is started, false: animation is not started
|
||||
*/
|
||||
private boolean isStart() {
|
||||
return frameIndex.get() != INVALID_INDEX;
|
||||
}
|
||||
|
||||
/**
|
||||
* start frame animation from the first frame
|
||||
*/
|
||||
public void start() {
|
||||
frameIndex.compareAndSet(INVALID_INDEX, 0);
|
||||
if (decodeThread == null) {
|
||||
decodeThread = new HandlerThread(DECODE_THREAD_NAME);
|
||||
}
|
||||
if (!decodeThread.isAlive()) {
|
||||
decodeThread.start();
|
||||
}
|
||||
if (handler == null) {
|
||||
handler = new Handler(decodeThread.getLooper());
|
||||
}
|
||||
if (decodeRunnable != null) {
|
||||
decodeRunnable.setIndex(0);
|
||||
}
|
||||
handler.post(decodeRunnable);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* clear out the drawing on canvas,preparing for the next frame
|
||||
* * @param canvas
|
||||
*/
|
||||
private void clearCanvas(Canvas canvas) {
|
||||
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
|
||||
canvas.drawPaint(paint);
|
||||
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
|
||||
}
|
||||
|
||||
/**
|
||||
* decode bitmap by BitmapFactory.decodeStream(), it is about twice faster than BitmapFactory.decodeResource()
|
||||
*
|
||||
* @param resId the bitmap resource
|
||||
* @param options
|
||||
* @return
|
||||
*/
|
||||
private Bitmap decodeBitmap(int resId, BitmapFactory.Options options) {
|
||||
options.inScaled = false;
|
||||
InputStream inputStream = getResources().openRawResource(resId);
|
||||
return BitmapFactory.decodeStream(inputStream, null, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* reuse bitmap in drawnBitmaps to decode new bitmap
|
||||
*
|
||||
* @param resId
|
||||
* @param options
|
||||
*/
|
||||
private void decodedBitmapByReuse(int resId, BitmapFactory.Options options) {
|
||||
LinkedBitmap linkedBitmap = getDrawnBitmap();
|
||||
if (linkedBitmap == null) {
|
||||
linkedBitmap = new LinkedBitmap();
|
||||
}
|
||||
options.inBitmap = linkedBitmap.bitmap;
|
||||
decodeAndPutBitmap(resId, options, linkedBitmap);
|
||||
}
|
||||
|
||||
/**
|
||||
* decode bitmap and put it into decodedBitmaps
|
||||
*
|
||||
* @param resId
|
||||
* @param options
|
||||
* @param linkedBitmap
|
||||
*/
|
||||
private void decodeAndPutBitmap(int resId, BitmapFactory.Options options, LinkedBitmap linkedBitmap) {
|
||||
Bitmap bitmap = decodeBitmap(resId, options);
|
||||
linkedBitmap.bitmap = bitmap;
|
||||
try {
|
||||
decodedBitmaps.put(linkedBitmap);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void putDrawnBitmap(LinkedBitmap bitmap) {
|
||||
drawnBitmaps.offer(bitmap);
|
||||
}
|
||||
|
||||
/**
|
||||
* get bitmap which already drawn by canvas
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private LinkedBitmap getDrawnBitmap() {
|
||||
LinkedBitmap bitmap = null;
|
||||
try {
|
||||
bitmap = drawnBitmaps.take();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* get decoded bitmap in the decoded bitmap queue
|
||||
* it might block due to new bitmap is not ready
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private LinkedBitmap getDecodedBitmap() {
|
||||
LinkedBitmap bitmap = null;
|
||||
try {
|
||||
bitmap = decodedBitmaps.take();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
public FrameFinishCallback getFrameFinishCallback() {
|
||||
return frameFinishCallback;
|
||||
}
|
||||
|
||||
public void setFrameFinishCallback(FrameFinishCallback frameFinishCallback) {
|
||||
this.frameFinishCallback = frameFinishCallback;
|
||||
}
|
||||
|
||||
private class DecodeRunnable implements Runnable {
|
||||
|
||||
private int index;
|
||||
private List<Integer> bitmapIds;
|
||||
private BitmapFactory.Options options;
|
||||
|
||||
public DecodeRunnable(int index, List<Integer> bitmapIds, BitmapFactory.Options options) {
|
||||
this.index = index;
|
||||
this.bitmapIds = bitmapIds;
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
decodedBitmapByReuse(bitmapIds.get(index), options);
|
||||
index++;
|
||||
if (index < bitmapIds.size()) {
|
||||
handler.post(this);
|
||||
} else {
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.utils.view;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
/**
|
||||
* a structure used by LinkedBlockingQueue to keep bitmap
|
||||
*/
|
||||
public class LinkedBitmap {
|
||||
public Bitmap bitmap;
|
||||
public LinkedBitmap next;
|
||||
|
||||
}
|
||||
@@ -1,205 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.utils.view;
|
||||
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.locks.Condition;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
public class LinkedBlockingQueue {
|
||||
/**
|
||||
* Current number of elements
|
||||
*/
|
||||
private final AtomicInteger count = new AtomicInteger();
|
||||
/**
|
||||
* Lock held by take, poll, etc
|
||||
*/
|
||||
private final ReentrantLock takeLock = new ReentrantLock();
|
||||
|
||||
/**
|
||||
* Wait queue for waiting takes
|
||||
*/
|
||||
private final Condition notEmpty = takeLock.newCondition();
|
||||
|
||||
/**
|
||||
* Lock held by put, offer, etc
|
||||
*/
|
||||
private final ReentrantLock putLock = new ReentrantLock();
|
||||
|
||||
/**
|
||||
* Wait queue for waiting puts
|
||||
*/
|
||||
private final Condition notFull = putLock.newCondition();
|
||||
/**
|
||||
* The capacity bound, or Integer.MAX_VALUE if none
|
||||
*/
|
||||
private final int capacity;
|
||||
/**
|
||||
* the first element in the queue
|
||||
*/
|
||||
private LinkedBitmap head;
|
||||
/**
|
||||
* the last element int the queue
|
||||
*/
|
||||
private LinkedBitmap tail;
|
||||
|
||||
|
||||
public LinkedBlockingQueue(int capacity) {
|
||||
if (capacity <= 0) throw new IllegalArgumentException();
|
||||
this.capacity = capacity;
|
||||
}
|
||||
|
||||
public void put(LinkedBitmap bitmap) throws InterruptedException {
|
||||
if (bitmap == null) throw new NullPointerException();
|
||||
// Note: convention in all put/take/etc is to preset local var
|
||||
// holding count negative to indicate failure unless set.
|
||||
int c = -1;
|
||||
final ReentrantLock putLock = this.putLock;
|
||||
final AtomicInteger count = this.count;
|
||||
putLock.lockInterruptibly();
|
||||
try {
|
||||
/*
|
||||
* Note that count is used in wait guard even though it is
|
||||
* not protected by lock. This works because count can
|
||||
* only decrease at this point (all other puts are shut
|
||||
* out by lock), and we (or some other waiting put) are
|
||||
* signalled if it ever changes from capacity. Similarly
|
||||
* for all other uses of count in other wait guards.
|
||||
*/
|
||||
while (count.get() == capacity) {
|
||||
notFull.await();
|
||||
}
|
||||
enqueue(bitmap);
|
||||
c = count.getAndIncrement();
|
||||
if (c + 1 < capacity)
|
||||
notFull.signal();
|
||||
} finally {
|
||||
putLock.unlock();
|
||||
}
|
||||
if (c == 0)
|
||||
signalNotEmpty();
|
||||
}
|
||||
|
||||
public boolean offer(LinkedBitmap bitmap) {
|
||||
if (bitmap == null) throw new NullPointerException();
|
||||
final AtomicInteger count = this.count;
|
||||
if (count.get() == capacity)
|
||||
return false;
|
||||
int c = -1;
|
||||
final ReentrantLock putLock = this.putLock;
|
||||
putLock.lock();
|
||||
try {
|
||||
if (count.get() < capacity) {
|
||||
enqueue(bitmap);
|
||||
c = count.getAndIncrement();
|
||||
if (c + 1 < capacity)
|
||||
notFull.signal();
|
||||
}
|
||||
} finally {
|
||||
putLock.unlock();
|
||||
}
|
||||
if (c == 0)
|
||||
signalNotEmpty();
|
||||
return c >= 0;
|
||||
}
|
||||
|
||||
public LinkedBitmap take() throws InterruptedException {
|
||||
LinkedBitmap x;
|
||||
int c = -1;
|
||||
final AtomicInteger count = this.count;
|
||||
final ReentrantLock takeLock = this.takeLock;
|
||||
takeLock.lockInterruptibly();
|
||||
try {
|
||||
while (count.get() == 0) {
|
||||
notEmpty.await();
|
||||
}
|
||||
x = dequeue();
|
||||
c = count.getAndDecrement();
|
||||
if (c > 1)
|
||||
notEmpty.signal();
|
||||
} finally {
|
||||
takeLock.unlock();
|
||||
}
|
||||
if (c == capacity)
|
||||
signalNotFull();
|
||||
return x;
|
||||
}
|
||||
|
||||
/**
|
||||
* insert element into the end of queue
|
||||
*
|
||||
* @param bitmap
|
||||
*/
|
||||
private void enqueue(LinkedBitmap bitmap) {
|
||||
if (head == null) {
|
||||
head = bitmap;
|
||||
tail = bitmap;
|
||||
bitmap.next = null;
|
||||
} else {
|
||||
tail.next = bitmap;
|
||||
bitmap.next = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get and remove the first element of the queue
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private LinkedBitmap dequeue() {
|
||||
LinkedBitmap p = head;
|
||||
if (p == null) {
|
||||
return null;
|
||||
} else {
|
||||
head = head.next;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Signals a waiting take. Called only from put/offer (which do not
|
||||
* otherwise ordinarily lock takeLock.)
|
||||
*/
|
||||
private void signalNotEmpty() {
|
||||
final ReentrantLock takeLock = this.takeLock;
|
||||
takeLock.lock();
|
||||
try {
|
||||
notEmpty.signal();
|
||||
} finally {
|
||||
takeLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Signals a waiting put. Called only from take/poll.
|
||||
*/
|
||||
private void signalNotFull() {
|
||||
final ReentrantLock putLock = this.putLock;
|
||||
putLock.lock();
|
||||
try {
|
||||
notFull.signal();
|
||||
} finally {
|
||||
putLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* recycle the bitmaps one by one
|
||||
*/
|
||||
public void clear() {
|
||||
LinkedBitmap p = head;
|
||||
if (p == null) {
|
||||
return;
|
||||
}
|
||||
while (p != null) {
|
||||
if (p.bitmap != null) {
|
||||
p.bitmap.recycle();
|
||||
}
|
||||
p.bitmap = null;
|
||||
p = p.next;
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count.get();
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.utils.view;
|
||||
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
public class MethodUtil {
|
||||
/**
|
||||
* calculate the time consumed by runnable invocation, print log in millisecond
|
||||
*
|
||||
* @param runnable
|
||||
*/
|
||||
public static long time(Runnable runnable) {
|
||||
long start = SystemClock.elapsedRealtime();
|
||||
runnable.run();
|
||||
long end = SystemClock.elapsedRealtime();
|
||||
long span = end - start;
|
||||
Log.v("ttaylor", "MethodUtil.time()" + " time span = " + span + " ms");
|
||||
return span;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.mogo.och.taxi.passenger.utils.view;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
public class NumberUtil {
|
||||
|
||||
private static long total;
|
||||
private static int times;
|
||||
|
||||
private static String tag;
|
||||
|
||||
/**
|
||||
* calculate the average of a series long number and print it
|
||||
* @param tag
|
||||
* @param l
|
||||
*/
|
||||
public static void average(String tag, Long l) {
|
||||
if (!TextUtils.isEmpty(tag) && !tag.equals(NumberUtil.tag)) {
|
||||
reset();
|
||||
NumberUtil.tag = tag;
|
||||
}
|
||||
times++;
|
||||
total += l;
|
||||
Log.v("ttaylor", "Average.average() " + NumberUtil.tag + " average = " + (total / times));
|
||||
}
|
||||
|
||||
private static void reset() {
|
||||
total = 0;
|
||||
times = 0;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="500" android:fromAlpha="0" android:toAlpha="1" />
|
||||
android:duration="1000" android:fromAlpha="0" android:toAlpha="1" />
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" android:startOffset="500" >
|
||||
<translate
|
||||
android:duration="500"
|
||||
android:duration="142"
|
||||
android:fromXDelta="-110%"
|
||||
android:toXDelta="0"/>
|
||||
</set>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" android:startOffset="500" >
|
||||
<translate
|
||||
android:duration="500"
|
||||
android:duration="142"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-110%"/>
|
||||
</set>
|
||||
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 497 B |
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 497 B |
@@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="true">
|
||||
<item android:drawable="@drawable/tail_ani_0000" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0001" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0002" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0003" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0004" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0005" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0006" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0007" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0008" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0009" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0010" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0011" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0012" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0013" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0014" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0015" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0016" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0017" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0018" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0019" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0020" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0021" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0022" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0023" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0024" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0025" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0026" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0027" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0028" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0029" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0030" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0031" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0032" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0033" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0034" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0035" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0036" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0037" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0038" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0039" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0040" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0041" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0042" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0043" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0044" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0045" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0046" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0047" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0048" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0049" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0050" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0051" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0052" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0053" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0054" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0055" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0056" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0057" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0058" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0059" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0060" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0061" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0062" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0063" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0064" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0065" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0066" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0067" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0068" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0069" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0070" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0071" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0072" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0073" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0074" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0075" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0076" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0077" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0078" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0079" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0080" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0081" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0082" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0083" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0084" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0085" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0086" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0087" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0088" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0089" android:duration="33"/>
|
||||
<item android:drawable="@drawable/tail_ani_0090" android:duration="33"/>
|
||||
|
||||
</animation-list>
|
||||
@@ -2,41 +2,41 @@
|
||||
|
||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:oneshot="false">
|
||||
<item android:drawable="@drawable/hand_00000" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00002" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00004" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00006" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00008" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00010" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00012" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00014" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00016" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00018" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00020" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00022" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00024" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00026" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00028" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00030" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00032" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00034" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00036" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00038" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00040" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00042" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00044" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00046" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00048" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00050" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00052" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00054" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00056" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00058" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00060" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00062" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00064" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00066" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00068" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00069" android:duration="33"/>
|
||||
<item android:drawable="@drawable/hand_00000" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00002" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00004" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00006" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00008" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00010" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00012" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00014" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00016" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00018" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00020" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00022" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00024" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00026" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00028" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00030" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00032" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00034" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00036" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00038" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00060" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00042" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00044" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00046" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00048" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00050" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00052" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00054" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00056" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00058" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00060" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00062" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00064" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00066" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00068" android:duration="60"/>
|
||||
<item android:drawable="@drawable/hand_00069" android:duration="60"/>
|
||||
|
||||
</animation-list>
|
||||
|
Before Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 144 KiB |