Skip to content

Commit 5b8461c

Browse files
committed
Open instructions at first start #8
Disable scrolling in Viewpager2 Layout improvements
1 parent 7db77d3 commit 5b8461c

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

app/src/main/java/org/woheller69/weather/activities/ForecastCityActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ protected void onNewIntent(Intent intent) {
139139
private void initResources() {
140140
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
141141
viewPager2 = findViewById(R.id.viewPager2);
142-
reduceViewpager2DragSensitivity(viewPager2,2);
142+
viewPager2.setUserInputEnabled(false);
143+
//reduceViewpager2DragSensitivity(viewPager2,2);
143144
tabLayout = findViewById(R.id.tab_layout);
144145
if (sharedPreferences.getBoolean("pref_summarize",false)){
145146
pagerAdapter = new WeatherPagerAdapter(this, getSupportFragmentManager(),getLifecycle(),true);

app/src/main/java/org/woheller69/weather/firststart/TutorialActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import org.woheller69.weather.R;
2424
import org.woheller69.weather.activities.ForecastCityActivity;
25-
import org.woheller69.weather.activities.SettingsActivity;
25+
import org.woheller69.weather.activities.HelpActivity;
2626

2727

2828
/**
@@ -118,7 +118,7 @@ private void launchHomeScreen() {
118118
}
119119

120120
private void launchSettings() {
121-
startActivity(new Intent(TutorialActivity.this, SettingsActivity.class));
121+
startActivity(new Intent(TutorialActivity.this, HelpActivity.class));
122122
finish();
123123
}
124124

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
android:paddingLeft="@dimen/activity_horizontal_margin"
1515
android:paddingRight="@dimen/activity_horizontal_margin"
1616
android:paddingTop="@dimen/activity_vertical_margin"
17-
android:layout_marginTop="53dp"
1817
android:weightSum="1">
1918

2019
<TextView

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@
1313
android:layout_height="match_parent"
1414
android:fitsSystemWindows="true"
1515
tools:context=".activities.AboutActivity">
16+
<LinearLayout
17+
android:layout_width="match_parent"
18+
android:layout_height="match_parent"
19+
android:orientation="vertical">
1620

17-
<include layout="@layout/toolbar" />
21+
<include layout="@layout/toolbar" />
1822

19-
<include layout="@layout/about" />
23+
<include layout="@layout/about" />
24+
</LinearLayout>
2025

2126
</androidx.coordinatorlayout.widget.CoordinatorLayout>
2227

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@
1414
android:fitsSystemWindows="true"
1515
tools:context=".activities.HelpActivity">
1616

17-
<include layout="@layout/toolbar" />
18-
19-
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
20-
android:id="@+id/help"
21-
android:layout_marginTop="53dp"
17+
<LinearLayout
2218
android:layout_width="match_parent"
23-
android:layout_height="fill_parent" />
19+
android:layout_height="match_parent"
20+
android:orientation="vertical">
21+
22+
<include layout="@layout/toolbar" />
23+
24+
<WebView
25+
android:id="@+id/help"
26+
android:padding="10dp"
27+
android:layout_width="match_parent"
28+
android:layout_height="fill_parent" />
2429

30+
</LinearLayout>
2531
</androidx.coordinatorlayout.widget.CoordinatorLayout>
2632

2733
<com.google.android.material.navigation.NavigationView

0 commit comments

Comments
 (0)