Back to project page AdvancedPlayer.
The source code is released under:
Apache License
If you think the Android project AdvancedPlayer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.huilan.library_videoplay.sample; // w w w. j a va2s.c o m import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.widget.TextView; /** * Created by liujigang on 2014/12/15 0015. */ public class TextActivity extends Activity { private TextView textView; private String TAG = "AdvancedPlayer>>"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); textView = new TextView(getApplicationContext()); textView.setTextColor(Color.WHITE); setContentView(textView); } @Override protected void onResume() { super.onResume(); int lightness = LightnessController.getLightness(getApplicationContext()); textView.setText(lightness + "--" + Math.hypot(3, 3) + "--" + Math.sqrt(Math.hypot(3, 3))); } @Override public boolean onTouchEvent(MotionEvent event) { Log.i(TAG, event.getX() + "-" + event.getY()); return super.onTouchEvent(event); } }