Android Open Source - AdvancedPlayer Text Activity






From Project

Back to project page AdvancedPlayer.

License

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.

Java Source Code

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);
    }
}




Java Source Code List

com.huilan.library_videoplay.AdvancedPlayerSimple.java
com.huilan.library_videoplay.AdvancedPlayer.java
com.huilan.library_videoplay.VideoViewPlay.java
com.huilan.library_videoplay.sample.LightnessController.java
com.huilan.library_videoplay.sample.MainActivity.java
com.huilan.library_videoplay.sample.TextActivity.java
com.huilan.library_videoplay.util.LightnessController.java
com.huilan.library_videoplay.util.ParseHtmlToUrl.java
com.huilan.library_videoplay.util.ViewController.java
com.huilan.library_videoplay.view.FullScreenVideoView.java
com.huilan.library_videoplay.view.SuperVideoView.java