|
/* |
|
* Copyright (C) 2017 Thiago lopes da Silva |
|
* |
|
* 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 br.org.sidi.butler.view; |
|
|
|
import android.content.Context; |
|
import android.util.AttributeSet; |
|
import android.widget.Button; |
|
|
|
|
|
/** |
|
* The type Login button. |
|
*/ |
|
public class LoginButton extends Button { |
|
|
|
/** |
|
* The enum Dummy status. |
|
*/ |
|
public enum DummyStatus { |
|
/** |
|
* Unknown dummy status. |
|
*/ |
|
UNKNOWN, /** |
|
* Error dummy status. |
|
*/ |
|
ERROR |
|
} |
|
|
|
// This propery will be used only for show how to use a custom matcher on espresso |
|
private DummyStatus dummyLoginStatus = DummyStatus.UNKNOWN; |
|
|
|
|
|
/** |
|
* Instantiates a new Login button. |
|
* |
|
* @param context the context |
|
*/ |
|
public LoginButton(Context context) { |
|
super(context); |
|
} |
|
|
|
/** |
|
* Instantiates a new Login button. |
|
* |
|
* @param context the context |
|
* @param attrs the attrs |
|
*/ |
|
public LoginButton(Context context, AttributeSet attrs) { |
|
super(context, attrs); |
|
} |
|
|
|
/** |
|
* Instantiates a new Login button. |
|
* |
|
* @param context the context |
|
* @param attrs the attrs |
|
* @param defStyleAttr the def style attr |
|
*/ |
|
public LoginButton(Context context, AttributeSet attrs, int defStyleAttr) { |
|
super(context, attrs, defStyleAttr); |
|
} |
|
|
|
/** |
|
* Instantiates a new Login button. |
|
* |
|
* @param context the context |
|
* @param attrs the attrs |
|
* @param defStyleAttr the def style attr |
|
* @param defStyleRes the def style res |
|
*/ |
|
public LoginButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { |
|
super(context, attrs, defStyleAttr, defStyleRes); |
|
} |
|
|
|
/** |
|
* Sets dummy login status. |
|
* |
|
* @param dummyStatus the dummy status |
|
*/ |
|
public void setDummyLoginStatus(DummyStatus dummyStatus) { |
|
this.dummyLoginStatus = dummyStatus; |
|
} |
|
|
|
/** |
|
* Gets dummy login status. |
|
* |
|
* @return the dummy login status |
|
*/ |
|
public DummyStatus getDummyLoginStatus() { |
|
return this.dummyLoginStatus; |
|
} |
|
|
|
|
|
} |