42
42
import static com .phikal .regex .Util .PROGRESS ;
43
43
import static com .phikal .regex .Util .notif ;
44
44
45
- class ColumAdapter extends ArrayAdapter {
46
- Context ctx ;
47
- Column col ;
45
+ class ColumnAdapter extends ArrayAdapter {
46
+ private Context ctx ;
47
+ private Column col ;
48
48
49
- public ColumAdapter (@ NonNull Context context , Column column ) {
49
+ ColumnAdapter (@ NonNull Context context , Column column ) {
50
50
super (context , 0 );
51
51
this .ctx = context ;
52
52
this .col = column ;
@@ -76,7 +76,7 @@ public class GameActivity extends Activity {
76
76
static boolean reload = false ;
77
77
78
78
SharedPreferences prefs ;
79
- LinearLayout colums ;
79
+ LinearLayout columns ;
80
80
EditText input ;
81
81
private Game game ;
82
82
private Task task ;
@@ -97,7 +97,7 @@ protected void onCreate(Bundle savedInstanceState) {
97
97
if (task == null )
98
98
task = game .nextTask (getApplicationContext (), p -> {
99
99
prefs .edit ()
100
- .putFloat (game .name () + PROGRESS , (float ) p .getDifficutly ())
100
+ .putFloat (game .name () + PROGRESS , (float ) p .getDifficulty ())
101
101
.putInt (game .name () + COUNT , p .getRound ())
102
102
.apply ();
103
103
input .getEditableText ().clear ();
@@ -110,34 +110,33 @@ protected void onCreate(Bundle savedInstanceState) {
110
110
return ;
111
111
}
112
112
113
- assert task != null ;
114
113
assert task .getColumns () != null ;
115
114
assert task .getInput () != null ;
116
115
117
116
// find and setup views
118
- colums = findViewById (R .id .columns );
117
+ columns = findViewById (R .id .columns );
119
118
RelativeLayout input_box = findViewById (R .id .input_box );
120
119
Button status = input_box .findViewById (R .id .status );
121
120
input = input_box .findViewById (R .id .input );
122
121
ImageButton settings = input_box .findViewById (R .id .settings );
123
122
LinearLayout charmb = findViewById (R .id .chars );
124
123
125
- colums .setWeightSum (task .getColumns ().size ());
124
+ columns .setWeightSum (task .getColumns ().size ());
126
125
LayoutInflater inf = LayoutInflater .from (getApplicationContext ());
127
126
List <ArrayAdapter > adapters = new ArrayList <>(task .getColumns ().size ());
128
127
for (Column col : task .getColumns ()) {
129
- View v = inf .inflate (R .layout .column_layout , colums , false );
128
+ View v = inf .inflate (R .layout .column_layout , columns , false );
130
129
131
130
TextView colName = v .findViewById (R .id .col_name );
132
131
ListView colList = v .findViewById (R .id .col_list );
133
132
134
133
colName .setText (col .getHeader ());
135
134
136
- ColumAdapter ca = new ColumAdapter (getApplicationContext (), col );
135
+ ColumnAdapter ca = new ColumnAdapter (getApplicationContext (), col );
137
136
colList .setAdapter (ca );
138
137
adapters .add (ca );
139
138
140
- colums .addView (v );
139
+ columns .addView (v );
141
140
}
142
141
143
142
input .setHint (getString (game .name ));
@@ -205,7 +204,7 @@ protected void onResume() {
205
204
params .setMargins (0 , 0 , 0 ,
206
205
(int ) getResources ().getDimension (
207
206
show ? R .dimen .dstd : R .dimen .std ));
208
- colums .setLayoutParams (params );
207
+ columns .setLayoutParams (params );
209
208
210
209
input .requestFocus ();
211
210
}
0 commit comments