]>
Commit | Line | Data |
---|---|---|
1 | package ro.ieval.unical; | |
2 | ||
3 | import java.util.Locale; | |
4 | ||
5 | import android.view.View; | |
6 | import android.view.ViewGroup; | |
7 | ||
8 | final class Utils { | |
9 | private Utils(){ /* do nothing */ } | |
10 | ||
11 | public static void setEnabledRecursively(final View view, final boolean enabled){ | |
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 | } | |
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 | } | |
23 | } |