This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
//---change to landscape mode--- | |
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); | |
accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); | |
sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ahuralab.shakeacocktail.layouts; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.Checkable; | |
import android.widget.LinearLayout; | |
/** | |
* Allow custom list rows to be checked. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ahuralab.shakeacocktail.drawer; | |
/** | |
* Menu actions used as events identifiers to propagate events. | |
* | |
* Created by msama on 14/02/2015. | |
*/ | |
public enum DrawerAction { | |
NONE, | |
COCKTAILS_FILTER_ALL, |