]>
Commit | Line | Data |
---|---|---|
402e19d8 MG |
1 | package ro.ieval.unical; |
2 | ||
dfc674f6 MG |
3 | import java.util.Locale; |
4 | ||
402e19d8 MG |
5 | import android.view.View; |
6 | import android.view.ViewGroup; | |
7 | ||
8 | final class Utils { | |
dfc674f6 MG |
9 | private Utils(){ /* do nothing */ } |
10 | ||
361c6a28 | 11 | public static void setEnabledRecursively(final View view, final boolean enabled){ |
402e19d8 MG |
12 | view.setEnabled(enabled); |
13 | if(view instanceof ViewGroup){ | |
14 | final ViewGroup group=(ViewGroup) view; | |
15 | for(int i=0;i<group.getChildCount();i++) | |
16 | setEnabledRecursively(group.getChildAt(i), enabled); | |
17 | } | |
18 | } | |
dfc674f6 MG |
19 | |
20 | public static String formatDate(final int year, final int month, final int day){ | |
21 | return String.format(Locale.ENGLISH, "%4d-%02d-%02d", year, month, day); | |
22 | } | |
402e19d8 | 23 | } |