-
Notifications
You must be signed in to change notification settings - Fork 408
/
CustomSlide.java
42 lines (34 loc) · 1.1 KB
/
CustomSlide.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package agency.tango.materialintro;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import agency.tango.materialintroscreen.SlideFragment;
public class CustomSlide extends SlideFragment {
private CheckBox checkBox;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_custom_slide, container, false);
checkBox = (CheckBox) view.findViewById(R.id.checkBox);
return view;
}
@Override
public int backgroundColor() {
return R.color.custom_slide_background;
}
@Override
public int buttonsColor() {
return R.color.custom_slide_buttons;
}
@Override
public boolean canMoveFurther() {
return checkBox.isChecked();
}
@Override
public String cantMoveFurtherErrorMessage() {
return getString(R.string.error_message);
}
}