Skip to content

Commit 0cda630

Browse files
author
Paolo Rotolo
committed
Add Toast method
1 parent b700e85 commit 0cda630

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

app/src/main/java/org/glucosio/android/activity/HelloActivity.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,10 @@ public void closeHelloActivity(){
128128
finish();
129129
}
130130

131-
private void setError(TextView view, String text) {
132-
TextInputLayout parent = (TextInputLayout) view.getParent();
133-
parent.setError(text);
131+
public void showToast(String text){
132+
Toast.makeText(this, text, Toast.LENGTH_SHORT).show();
134133
}
135134

136-
private void removeError(TextView view) {
137-
TextInputLayout parent = (TextInputLayout) view.getParent();
138-
parent.setError(null);
139-
}
140-
141-
142135
@Override
143136
public boolean onCreateOptionsMenu(Menu menu) {
144137
// Inflate the menu; this adds items to the action bar if it is present.

0 commit comments

Comments
 (0)