Skip to content

Commit 1212ad9

Browse files
committed
Adjust codestyle to an .editorconfig
1 parent 1508a57 commit 1212ad9

File tree

7 files changed

+29
-16
lines changed

7 files changed

+29
-16
lines changed

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
# indent_size = 4

app/src/main/java/com/phikal/regex/activities/GameActivity.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
import android.content.SharedPreferences;
88
import android.os.Bundle;
99
import android.preference.PreferenceManager;
10-
import androidx.annotation.NonNull;
11-
import androidx.annotation.Nullable;
12-
import androidx.core.content.ContextCompat;
1310
import android.view.Gravity;
1411
import android.view.LayoutInflater;
1512
import android.view.View;
@@ -23,6 +20,10 @@
2320
import android.widget.RelativeLayout;
2421
import android.widget.TextView;
2522

23+
import androidx.annotation.NonNull;
24+
import androidx.annotation.Nullable;
25+
import androidx.core.content.ContextCompat;
26+
2627
import com.phikal.regex.R;
2728
import com.phikal.regex.games.Game;
2829
import com.phikal.regex.models.Column;
@@ -75,11 +76,10 @@ public class GameActivity extends Activity {
7576
static boolean reload = false;
7677

7778
SharedPreferences prefs;
78-
private Game game;
79-
private Task task;
80-
8179
LinearLayout colums;
8280
EditText input;
81+
private Game game;
82+
private Task task;
8383

8484
@Override
8585
protected void onCreate(Bundle savedInstanceState) {
@@ -219,4 +219,4 @@ protected void onSaveInstanceState(Bundle outState) {
219219
if (task != null)
220220
outState.putSerializable(CURRENT_TASK, task);
221221
}
222-
}
222+
}

app/src/main/java/com/phikal/regex/activities/SettingsActivity.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import android.os.Build;
66
import android.os.Bundle;
77
import android.preference.PreferenceManager;
8-
import androidx.annotation.NonNull;
9-
import androidx.annotation.Nullable;
108
import android.view.View;
119
import android.view.ViewGroup;
1210
import android.widget.AdapterView;
@@ -15,6 +13,9 @@
1513
import android.widget.Spinner;
1614
import android.widget.TextView;
1715

16+
import androidx.annotation.NonNull;
17+
import androidx.annotation.Nullable;
18+
1819
import com.phikal.regex.R;
1920
import com.phikal.regex.games.Game;
2021
import com.phikal.regex.models.Progress;

app/src/main/java/com/phikal/regex/games/match/MatchTask.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package com.phikal.regex.games.match;
22

33
import android.content.Context;
4-
import androidx.annotation.NonNull;
54
import android.text.Editable;
65
import android.text.InputFilter;
76

7+
import androidx.annotation.NonNull;
8+
89
import com.phikal.regex.R;
910
import com.phikal.regex.games.Game;
1011
import com.phikal.regex.models.Column;
@@ -122,7 +123,7 @@ public void afterTextChanged(Editable pat) {
122123

123124
if (allMatch && pat.length() > 0) {
124125
getProgressCallback().progress(getProgress()
125-
.next(maxLength/pat.length()));
126+
.next(maxLength / pat.length()));
126127
}
127128
} catch (PatternSyntaxException pse) {
128129
for (MatchWord w : allWords)

app/src/main/java/com/phikal/regex/games/match/WordTask.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.util.List;
1515
import java.util.zip.GZIPInputStream;
1616

17-
import static com.phikal.regex.Util.*;
17+
import static com.phikal.regex.Util.rnd;
1818

1919
public class WordTask extends SimpleMatchTask {
2020

app/src/main/res/drawable/ic_settings_black_24dp.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
22
android:width="24dp"
33
android:height="24dp"
4-
android:viewportHeight="24.0"
5-
android:viewportWidth="24.0">
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
66
<path
77
android:fillColor="#FF000000"
88
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z" />

app/src/main/res/layout/main_layout.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
android:id="@+id/input"
3232
android:layout_width="match_parent"
3333
android:layout_height="@dimen/std"
34-
android:layout_marginEnd="@dimen/std"
34+
android:layout_marginStart="@dimen/std"
3535
android:layout_marginLeft="@dimen/std"
36+
android:layout_marginEnd="@dimen/std"
3637
android:layout_marginRight="@dimen/std"
37-
android:layout_marginStart="@dimen/std"
3838
android:background="@color/background"
3939
android:gravity="center_vertical"
4040
android:inputType="textNoSuggestions"

0 commit comments

Comments
 (0)