Clockplus/app/src/main/java/com/philliphsu/clock2/UntouchableSeekBar.java
2016-09-29 03:02:33 -07:00

46 lines
1.3 KiB
Java

/*
* Copyright (C) 2016 Phillip Hsu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.philliphsu.clock2;
import android.content.Context;
import android.support.v7.widget.AppCompatSeekBar;
import android.util.AttributeSet;
import android.view.MotionEvent;
/**
* A SeekBar that cannot be touch controlled.
*/
public class UntouchableSeekBar extends AppCompatSeekBar {
public UntouchableSeekBar(Context context) {
super(context);
}
public UntouchableSeekBar(Context context, AttributeSet attrs) {
super(context, attrs);
}
public UntouchableSeekBar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public final boolean onTouchEvent(MotionEvent event) {
return true;
}
}