public class AutoRotateTextView extends TextView implements OrientationSensor.OrientationListener
Constructor and Description |
---|
AutoRotateTextView(Context context) |
AutoRotateTextView(Context context,
AttributeSet attrs) |
AutoRotateTextView(Context context,
AttributeSet attrs,
int defStyleAttr) |
Modifier and Type | Method and Description |
---|---|
protected void |
onAttachedToWindow() |
protected void |
onDetachedFromWindow() |
protected void |
onDraw(Canvas canvas) |
void |
onOrientationChange(OrientationSensor.ScreenOrientation screenOrientation)
Would be set by the OrientationSensor Event.
|
public AutoRotateTextView(Context context)
public AutoRotateTextView(Context context, AttributeSet attrs)
public AutoRotateTextView(Context context, AttributeSet attrs, int defStyleAttr)
protected void onAttachedToWindow()
protected void onDetachedFromWindow()
protected void onDraw(Canvas canvas)
public void onOrientationChange(@NonNull OrientationSensor.ScreenOrientation screenOrientation)
onOrientationChange
in interface OrientationSensor.OrientationListener
screenOrientation
- Orientation set by Sensor.