Android Open Source - pinpoint-android Quadrants Activity






From Project

Back to project page pinpoint-android.

License

The source code is released under:

MIT License

If you think the Android project pinpoint-android 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 co.islovely.pinpoint;
/*w  w w  .j  a  v a 2 s  . c  om*/
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;

public class QuadrantsActivity extends PinpointActivity implements OnTouchListener {
  @Override
  protected int getLayoutId() {
    return R.layout.quadrants;
  }

  @Override
  protected int[] getButtonIds() {
    return new int[] {
        R.id.topLeft,
        R.id.topRight,
        R.id.bottomLeft,
        R.id.bottomRight
    };
  }

  @Override
  protected boolean isClickCorrect(int id) {
    LauncherItem launcherItem = this.getLauncherItem();
    int
        cellX = launcherItem.getCellX(),
        cellY = launcherItem.getCellY();
    boolean
        isTop    = cellY <  2,
        isBottom = cellY >= 2,
        isLeft   = cellX <  2,
        isRight  = cellX >= 2;

    switch (id) {
      case R.id.topLeft:
        return isTop && isLeft;
      case R.id.topRight:
        return isTop && isRight;
      case R.id.bottomLeft:
        return isBottom && isLeft;
      case R.id.bottomRight:
        return isBottom && isRight;
    }

    return false;
  }
}




Java Source Code List

co.islovely.pinpoint.ColumnsActivity.java
co.islovely.pinpoint.Configuration.java
co.islovely.pinpoint.DeviceMetrics.java
co.islovely.pinpoint.GridActivity.java
co.islovely.pinpoint.HomescreenAdapter.java
co.islovely.pinpoint.HomescreenSelectActivity.java
co.islovely.pinpoint.Homescreen.java
co.islovely.pinpoint.IntermissionActivity.java
co.islovely.pinpoint.LauncherItem.java
co.islovely.pinpoint.LauncherReader.java
co.islovely.pinpoint.LayoutConfigurationActivity.java
co.islovely.pinpoint.MainActivity.java
co.islovely.pinpoint.MyApplication.java
co.islovely.pinpoint.PinpointActivity.java
co.islovely.pinpoint.Pinpoint.java
co.islovely.pinpoint.QuadrantsActivity.java
co.islovely.pinpoint.RowsActivity.java
co.islovely.pinpoint.StatisticsActivity.java
co.islovely.pinpoint.TaskLogEntry.java
co.islovely.pinpoint.TaskLog.java
co.islovely.pinpoint.TaskManager.java
co.islovely.pinpoint.Task.java
co.islovely.pinpoint.User.java
util.Base64.java