Skip to content

Commit fb60faa

Browse files
authored
Merge pull request #30 from CatMe0w/master
Auto-scroll main menu to second item only on round screens
2 parents a3c21c5 + 645deec commit fb60faa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/src/main/java/net/devemperor/wristassist/activities/MainActivity.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,11 @@ protected void onCreate(Bundle savedInstanceState) {
132132

133133
mainWrv.requestFocus();
134134
mainWrv.postDelayed(() -> {
135-
View view = mainWrv.getChildAt(0);
136-
if (view == null) return;
137-
mainWrv.scrollBy(0, view.getHeight());
135+
if (getResources().getConfiguration().isScreenRound()) {
136+
View view = mainWrv.getChildAt(0);
137+
if (view == null) return;
138+
mainWrv.scrollBy(0, view.getHeight());
139+
}
138140
}, 100);
139141
}
140142

0 commit comments

Comments
 (0)