仿微信摇一摇功能,android 重力感应开发

本实例主要使用了android的重力感应功能并配合动画效果实现,主要代码如下:

第一:ShakeActivity主类:

Java代码 复制代码  收藏代码
  1. package com.android.shake;   
  2.   
  3.   
  4.   
  5. import java.io.IOException;   
  6. import java.util.HashMap;   
  7. import android.app.Activity;   
  8. import android.media.AudioManager;   
  9. import android.media.SoundPool;   
  10. import android.os.Bundle;   
  11. import android.os.Handler;   
  12. import android.os.Vibrator;   
  13. import android.view.View;   
  14. import android.view.animation.Animation;   
  15. import android.view.animation.AnimationSet;   
  16. import android.view.animation.TranslateAnimation;   
  17. import android.widget.Button;   
  18. import android.widget.RelativeLayout;   
  19. import android.widget.SlidingDrawer;   
  20. import android.widget.SlidingDrawer.OnDrawerCloseListener;   
  21. import android.widget.SlidingDrawer.OnDrawerOpenListener;   
  22. import android.widget.Toast;   
  23.   
  24. import com.android.shake.ShakeListener.OnShakeListener;   
  25.   
  26. public class ShakeActivity extends Activity{   
  27.        
  28.     ShakeListener mShakeListener = null;   
  29.     Vibrator mVibrator;   
  30.     private RelativeLayout mImgUp;   
  31.     private RelativeLayout mImgDn;   
  32.     private RelativeLayout mTitle;   
  33.        
  34.     private SlidingDrawer mDrawer;   
  35.     private Button mDrawerBtn;   
  36.     private SoundPool sndPool;   
  37.     private HashMap<Integer, Integer> soundPoolMap = new HashMap<Integer, Integer>();   
  38.   
  39.     @Override  
  40.     public void onCreate(Bundle savedInstanceState) {   
  41.         // TODO Auto-generated method stub   
  42.         super.onCreate(savedInstanceState);    
  43.         setContentView(R.layout.shake_activity);   
  44.         //drawerSet ();//设置  drawer监听    切换 按钮的方向   
  45.            
  46.         mVibrator = (Vibrator)getApplication().getSystemService(VIBRATOR_SERVICE);   
  47.            
  48.         mImgUp = (RelativeLayout) findViewById(R.id.shakeImgUp);   
  49.         mImgDn = (RelativeLayout) findViewById(R.id.shakeImgDown);   
  50.         mTitle = (RelativeLayout) findViewById(R.id.shake_title_bar);   
  51.            
  52.         mDrawer = (SlidingDrawer) findViewById(R.id.slidingDrawer1);   
  53.         mDrawerBtn = (Button) findViewById(R.id.handle);   
  54.         mDrawer.setOnDrawerOpenListener(new OnDrawerOpenListener()   
  55.         {   public void onDrawerOpened()   
  56.             {      
  57.                 mDrawerBtn.setBackgroundDrawable(getResources().getDrawable(R.drawable.shake_report_dragger_down));   
  58.                 TranslateAnimation titleup = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-1.0f);   
  59.                 titleup.setDuration(200);   
  60.                 titleup.setFillAfter(true);   
  61.                 mTitle.startAnimation(titleup);   
  62.             }   
  63.         });   
  64.          /* 设定SlidingDrawer被关闭的事件处理 */  
  65.         mDrawer.setOnDrawerCloseListener(new OnDrawerCloseListener()   
  66.         {   public void onDrawerClosed()   
  67.             {      
  68.                 mDrawerBtn.setBackgroundDrawable(getResources().getDrawable(R.drawable.shake_report_dragger_up));   
  69.                 TranslateAnimation titledn = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-1.0f,Animation.RELATIVE_TO_SELF,0f);   
  70.                 titledn.setDuration(200);   
  71.                 titledn.setFillAfter(false);   
  72.                 mTitle.startAnimation(titledn);   
  73.             }   
  74.         });   
  75.         loadSound() ;   
  76.         mShakeListener = new ShakeListener(this);   
  77.         mShakeListener.setOnShakeListener(new OnShakeListener() {   
  78.             public void onShake() {   
  79.                 //Toast.makeText(getApplicationContext(), "抱歉,暂时没有找到在同一时刻摇一摇的人。\n再试一次吧!", Toast.LENGTH_SHORT).show();   
  80.                 startAnim();  //开始 摇一摇手掌动画   
  81.                 mShakeListener.stop();   
  82.                 sndPool.play(soundPoolMap.get(0), (float1, (float100,(float1.2);   
  83.                 new Handler().postDelayed(new Runnable(){   
  84.                     public void run(){   
  85.                         //Toast.makeText(getApplicationContext(), "抱歉,暂时没有找到\n在同一时刻摇一摇的人。\n再试一次吧!", 500).setGravity(Gravity.CENTER,0,0).show();   
  86.                         sndPool.play(soundPoolMap.get(1), (float1, (float100,(float1.0);   
  87.                         Toast mtoast;   
  88.                         mtoast = Toast.makeText(getApplicationContext(),   
  89.                                  "抱歉,暂时没有找到\n在同一时刻摇一摇的人。\n再试一次吧!"10);   
  90.                                //mtoast.setGravity(Gravity.CENTER, 0, 0);   
  91.                                mtoast.show();   
  92.                                mVibrator.cancel();   
  93.                                mShakeListener.start();   
  94.                                   
  95.                     }   
  96.                 }, 2000);   
  97.             }   
  98.         });   
  99.    }   
  100.        
  101.        
  102.        
  103.     private void loadSound() {   
  104.   
  105.         sndPool = new SoundPool(2, AudioManager.STREAM_SYSTEM, 5);   
  106.         new Thread() {   
  107.             public void run() {   
  108.                 try {   
  109.                     soundPoolMap.put(   
  110.                             0,   
  111.                             sndPool.load(getAssets().openFd(   
  112.                                             "sound/shake_sound_male.mp3"), 1));   
  113.   
  114.                     soundPoolMap.put(   
  115.                             1,   
  116.                             sndPool.load(getAssets().openFd(   
  117.                                             "sound/shake_match.mp3"), 1));   
  118.                 } catch (IOException e) {   
  119.                     e.printStackTrace();   
  120.                 }   
  121.             }   
  122.         }.start();   
  123.     }   
  124.        
  125.     public void startAnim () {   //定义摇一摇动画动画   
  126.         AnimationSet animup = new AnimationSet(true);   
  127.         TranslateAnimation mytranslateanimup0 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-0.5f);   
  128.         mytranslateanimup0.setDuration(1000);   
  129.         TranslateAnimation mytranslateanimup1 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,+0.5f);   
  130.         mytranslateanimup1.setDuration(1000);   
  131.         mytranslateanimup1.setStartOffset(1000);   
  132.         animup.addAnimation(mytranslateanimup0);   
  133.         animup.addAnimation(mytranslateanimup1);   
  134.         mImgUp.startAnimation(animup);   
  135.            
  136.         AnimationSet animdn = new AnimationSet(true);   
  137.         TranslateAnimation mytranslateanimdn0 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,+0.5f);   
  138.         mytranslateanimdn0.setDuration(1000);   
  139.         TranslateAnimation mytranslateanimdn1 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-0.5f);   
  140.         mytranslateanimdn1.setDuration(1000);   
  141.         mytranslateanimdn1.setStartOffset(1000);   
  142.         animdn.addAnimation(mytranslateanimdn0);   
  143.         animdn.addAnimation(mytranslateanimdn1);   
  144.         mImgDn.startAnimation(animdn);     
  145.     }   
  146.     public void startVibrato(){     //定义震动   
  147.         mVibrator.vibrate( new long[]{500,200,500,200}, -1); //第一个{}里面是节奏数组, 第二个参数是重复次数,-1为不重复,非-1俄日从pattern的指定下标开始重复   
  148.     }   
  149.        
  150.     public void shake_activity_back(View v) {     //标题栏 返回按钮   
  151.         this.finish();   
  152.       }     
  153.     public void linshi(View v) {     //标题栏   
  154.         startAnim();   
  155.       }     
  156.     @Override  
  157.     protected void onDestroy() {   
  158.         super.onDestroy();   
  159.         if (mShakeListener != null) {   
  160.             mShakeListener.stop();   
  161.         }   
  162.     }   
  163. }  
package com.android.shake;



import java.io.IOException;
import java.util.HashMap;
import android.app.Activity;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Bundle;
import android.os.Handler;
import android.os.Vibrator;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.TranslateAnimation;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.SlidingDrawer;
import android.widget.SlidingDrawer.OnDrawerCloseListener;
import android.widget.SlidingDrawer.OnDrawerOpenListener;
import android.widget.Toast;

import com.android.shake.ShakeListener.OnShakeListener;

public class ShakeActivity extends Activity{
	
	ShakeListener mShakeListener = null;
	Vibrator mVibrator;
	private RelativeLayout mImgUp;
	private RelativeLayout mImgDn;
	private RelativeLayout mTitle;
	
	private SlidingDrawer mDrawer;
	private Button mDrawerBtn;
	private SoundPool sndPool;
	private HashMap<Integer, Integer> soundPoolMap = new HashMap<Integer, Integer>();

	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);	
		setContentView(R.layout.shake_activity);
		//drawerSet ();//设置  drawer监听    切换 按钮的方向
		
		mVibrator = (Vibrator)getApplication().getSystemService(VIBRATOR_SERVICE);
		
		mImgUp = (RelativeLayout) findViewById(R.id.shakeImgUp);
		mImgDn = (RelativeLayout) findViewById(R.id.shakeImgDown);
		mTitle = (RelativeLayout) findViewById(R.id.shake_title_bar);
		
		mDrawer = (SlidingDrawer) findViewById(R.id.slidingDrawer1);
        mDrawerBtn = (Button) findViewById(R.id.handle);
        mDrawer.setOnDrawerOpenListener(new OnDrawerOpenListener()
		{	public void onDrawerOpened()
			{	
				mDrawerBtn.setBackgroundDrawable(getResources().getDrawable(R.drawable.shake_report_dragger_down));
				TranslateAnimation titleup = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-1.0f);
				titleup.setDuration(200);
				titleup.setFillAfter(true);
				mTitle.startAnimation(titleup);
			}
		});
		 /* 设定SlidingDrawer被关闭的事件处理 */
		mDrawer.setOnDrawerCloseListener(new OnDrawerCloseListener()
		{	public void onDrawerClosed()
			{	
				mDrawerBtn.setBackgroundDrawable(getResources().getDrawable(R.drawable.shake_report_dragger_up));
				TranslateAnimation titledn = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-1.0f,Animation.RELATIVE_TO_SELF,0f);
				titledn.setDuration(200);
				titledn.setFillAfter(false);
				mTitle.startAnimation(titledn);
			}
		});
		loadSound() ;
		mShakeListener = new ShakeListener(this);
        mShakeListener.setOnShakeListener(new OnShakeListener() {
			public void onShake() {
				//Toast.makeText(getApplicationContext(), "抱歉,暂时没有找到在同一时刻摇一摇的人。\n再试一次吧!", Toast.LENGTH_SHORT).show();
				startAnim();  //开始 摇一摇手掌动画
				mShakeListener.stop();
				sndPool.play(soundPoolMap.get(0), (float) 1, (float) 1, 0, 0,(float) 1.2);
				new Handler().postDelayed(new Runnable(){
					public void run(){
						//Toast.makeText(getApplicationContext(), "抱歉,暂时没有找到\n在同一时刻摇一摇的人。\n再试一次吧!", 500).setGravity(Gravity.CENTER,0,0).show();
						sndPool.play(soundPoolMap.get(1), (float) 1, (float) 1, 0, 0,(float) 1.0);
						Toast mtoast;
						mtoast = Toast.makeText(getApplicationContext(),
							     "抱歉,暂时没有找到\n在同一时刻摇一摇的人。\n再试一次吧!", 10);
							   //mtoast.setGravity(Gravity.CENTER, 0, 0);
							   mtoast.show();
							   mVibrator.cancel();
							   mShakeListener.start();
							   
					}
				}, 2000);
			}
		});
   }
	
	
	
	private void loadSound() {

		sndPool = new SoundPool(2, AudioManager.STREAM_SYSTEM, 5);
		new Thread() {
			public void run() {
				try {
					soundPoolMap.put(
							0,
							sndPool.load(getAssets().openFd(
											"sound/shake_sound_male.mp3"), 1));

					soundPoolMap.put(
							1,
							sndPool.load(getAssets().openFd(
											"sound/shake_match.mp3"), 1));
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}.start();
	}
	
	public void startAnim () {   //定义摇一摇动画动画
		AnimationSet animup = new AnimationSet(true);
		TranslateAnimation mytranslateanimup0 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-0.5f);
		mytranslateanimup0.setDuration(1000);
		TranslateAnimation mytranslateanimup1 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,+0.5f);
		mytranslateanimup1.setDuration(1000);
		mytranslateanimup1.setStartOffset(1000);
		animup.addAnimation(mytranslateanimup0);
		animup.addAnimation(mytranslateanimup1);
		mImgUp.startAnimation(animup);
		
		AnimationSet animdn = new AnimationSet(true);
		TranslateAnimation mytranslateanimdn0 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,+0.5f);
		mytranslateanimdn0.setDuration(1000);
		TranslateAnimation mytranslateanimdn1 = new TranslateAnimation(Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,0f,Animation.RELATIVE_TO_SELF,-0.5f);
		mytranslateanimdn1.setDuration(1000);
		mytranslateanimdn1.setStartOffset(1000);
		animdn.addAnimation(mytranslateanimdn0);
		animdn.addAnimation(mytranslateanimdn1);
		mImgDn.startAnimation(animdn);	
	}
	public void startVibrato(){		//定义震动
		mVibrator.vibrate( new long[]{500,200,500,200}, -1); //第一个{}里面是节奏数组, 第二个参数是重复次数,-1为不重复,非-1俄日从pattern的指定下标开始重复
	}
	
	public void shake_activity_back(View v) {     //标题栏 返回按钮
      	this.finish();
      }  
	public void linshi(View v) {     //标题栏
		startAnim();
      }  
	@Override
	protected void onDestroy() {
		super.onDestroy();
		if (mShakeListener != null) {
			mShakeListener.stop();
		}
	}
}

 第二:一个检测手机摇晃的监听器类ShakeListener ,代码如下:

Java代码 复制代码  收藏代码
  1. package com.android.shake;   
  2.   
  3. import android.content.Context;   
  4. import android.hardware.Sensor;   
  5. import android.hardware.SensorEvent;   
  6. import android.hardware.SensorEventListener;   
  7. import android.hardware.SensorManager;   
  8. import android.util.Log;   
  9.   
  10. /**  
  11.  * 一个检测手机摇晃的监听器  
  12.  */  
  13. public class ShakeListener implements SensorEventListener {   
  14.     // 速度阈值,当摇晃速度达到这值后产生作用   
  15.     private static final int SPEED_SHRESHOLD = 2000;   
  16.     // 两次检测的时间间隔   
  17.     private static final int UPTATE_INTERVAL_TIME = 70;   
  18.     // 传感器管理器   
  19.     private SensorManager sensorManager;   
  20.     // 传感器   
  21.     private Sensor sensor;   
  22.     // 重力感应监听器   
  23.     private OnShakeListener onShakeListener;   
  24.     // 上下文   
  25.     private Context mContext;   
  26.     // 手机上一个位置时重力感应坐标   
  27.     private float lastX;   
  28.     private float lastY;   
  29.     private float lastZ;   
  30.     // 上次检测时间   
  31.     private long lastUpdateTime;   
  32.   
  33.     // 构造器   
  34.     public ShakeListener(Context c) {   
  35.         // 获得监听对象   
  36.         mContext = c;   
  37.         start();   
  38.     }   
  39.   
  40.     // 开始   
  41.     public void start() {   
  42.         // 获得传感器管理器   
  43.         sensorManager = (SensorManager) mContext   
  44.                 .getSystemService(Context.SENSOR_SERVICE);   
  45.         if (sensorManager != null) {   
  46.             // 获得重力传感器   
  47.             sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);   
  48.         }   
  49.         // 注册   
  50.         if (sensor != null) {   
  51.             sensorManager.registerListener(this, sensor,   
  52.                     SensorManager.SENSOR_DELAY_GAME);   
  53.         }   
  54.   
  55.     }   
  56.   
  57.     // 停止检测   
  58.     public void stop() {   
  59.         sensorManager.unregisterListener(this);   
  60.     }   
  61.   
  62.     // 设置重力感应监听器   
  63.     public void setOnShakeListener(OnShakeListener listener) {   
  64.         onShakeListener = listener;   
  65.     }   
  66.   
  67.     // 重力感应器感应获得变化数据   
  68.     public void onSensorChanged(SensorEvent event) {   
  69.         // 现在检测时间   
  70.         long currentUpdateTime = System.currentTimeMillis();   
  71.         // 两次检测的时间间隔   
  72.         long timeInterval = currentUpdateTime - lastUpdateTime;   
  73.         // 判断是否达到了检测时间间隔   
  74.         if (timeInterval < UPTATE_INTERVAL_TIME)   
  75.             return;   
  76.         // 现在的时间变成last时间   
  77.         lastUpdateTime = currentUpdateTime;   
  78.   
  79.         // 获得x,y,z坐标   
  80.         float x = event.values[0];   
  81.         float y = event.values[1];   
  82.         float z = event.values[2];   
  83.   
  84.         // 获得x,y,z的变化值   
  85.         float deltaX = x - lastX;   
  86.         float deltaY = y - lastY;   
  87.         float deltaZ = z - lastZ;   
  88.   
  89.         // 将现在的坐标变成last坐标   
  90.         lastX = x;   
  91.         lastY = y;   
  92.         lastZ = z;   
  93.   
  94.         double speed = Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ   
  95.                 * deltaZ)   
  96.                 / timeInterval * 10000;   
  97.         // 达到速度阀值,发出提示   
  98.         if (speed >= SPEED_SHRESHOLD) {   
  99.             onShakeListener.onShake();   
  100.         }   
  101.     }   
  102.   
  103.     public void onAccuracyChanged(Sensor sensor, int accuracy) {   
  104.   
  105.     }   
  106.   
  107.     // 摇晃监听接口   
  108.     public interface OnShakeListener {   
  109.         public void onShake();   
  110.     }   
  111.   
  112. }  
package com.android.shake;

import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.util.Log;

/**
 * 一个检测手机摇晃的监听器
 */
public class ShakeListener implements SensorEventListener {
	// 速度阈值,当摇晃速度达到这值后产生作用
	private static final int SPEED_SHRESHOLD = 2000;
	// 两次检测的时间间隔
	private static final int UPTATE_INTERVAL_TIME = 70;
	// 传感器管理器
	private SensorManager sensorManager;
	// 传感器
	private Sensor sensor;
	// 重力感应监听器
	private OnShakeListener onShakeListener;
	// 上下文
	private Context mContext;
	// 手机上一个位置时重力感应坐标
	private float lastX;
	private float lastY;
	private float lastZ;
	// 上次检测时间
	private long lastUpdateTime;

	// 构造器
	public ShakeListener(Context c) {
		// 获得监听对象
		mContext = c;
		start();
	}

	// 开始
	public void start() {
		// 获得传感器管理器
		sensorManager = (SensorManager) mContext
				.getSystemService(Context.SENSOR_SERVICE);
		if (sensorManager != null) {
			// 获得重力传感器
			sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
		}
		// 注册
		if (sensor != null) {
			sensorManager.registerListener(this, sensor,
					SensorManager.SENSOR_DELAY_GAME);
		}

	}

	// 停止检测
	public void stop() {
		sensorManager.unregisterListener(this);
	}

	// 设置重力感应监听器
	public void setOnShakeListener(OnShakeListener listener) {
		onShakeListener = listener;
	}

	// 重力感应器感应获得变化数据
	public void onSensorChanged(SensorEvent event) {
		// 现在检测时间
		long currentUpdateTime = System.currentTimeMillis();
		// 两次检测的时间间隔
		long timeInterval = currentUpdateTime - lastUpdateTime;
		// 判断是否达到了检测时间间隔
		if (timeInterval < UPTATE_INTERVAL_TIME)
			return;
		// 现在的时间变成last时间
		lastUpdateTime = currentUpdateTime;

		// 获得x,y,z坐标
		float x = event.values[0];
		float y = event.values[1];
		float z = event.values[2];

		// 获得x,y,z的变化值
		float deltaX = x - lastX;
		float deltaY = y - lastY;
		float deltaZ = z - lastZ;

		// 将现在的坐标变成last坐标
		lastX = x;
		lastY = y;
		lastZ = z;

		double speed = Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ
				* deltaZ)
				/ timeInterval * 10000;
		// 达到速度阀值,发出提示
		if (speed >= SPEED_SHRESHOLD) {
			onShakeListener.onShake();
		}
	}

	public void onAccuracyChanged(Sensor sensor, int accuracy) {

	}

	// 摇晃监听接口
	public interface OnShakeListener {
		public void onShake();
	}

}

 第三:必须在AndroidManifest.xml中添加权限,否侧摇动时不能监听

<uses-permission android:name="android.hardware.sensor.accelerometer"/>

第四:效果图:


 项目代码在下面附件

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值