Open instructions at first start #8

Disable scrolling in Viewpager2
Layout improvements
This commit is contained in:
woheller69 2023-05-07 10:39:22 +02:00
parent 7db77d345f
commit 5b8461c8a3
5 changed files with 23 additions and 12 deletions

View file

@ -139,7 +139,8 @@ public class ForecastCityActivity extends NavigationActivity implements IUpdatea
private void initResources() { private void initResources() {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
viewPager2 = findViewById(R.id.viewPager2); viewPager2 = findViewById(R.id.viewPager2);
reduceViewpager2DragSensitivity(viewPager2,2); viewPager2.setUserInputEnabled(false);
//reduceViewpager2DragSensitivity(viewPager2,2);
tabLayout = findViewById(R.id.tab_layout); tabLayout = findViewById(R.id.tab_layout);
if (sharedPreferences.getBoolean("pref_summarize",false)){ if (sharedPreferences.getBoolean("pref_summarize",false)){
pagerAdapter = new WeatherPagerAdapter(this, getSupportFragmentManager(),getLifecycle(),true); pagerAdapter = new WeatherPagerAdapter(this, getSupportFragmentManager(),getLifecycle(),true);

View file

@ -22,7 +22,7 @@ import android.widget.TextView;
import org.woheller69.weather.R; import org.woheller69.weather.R;
import org.woheller69.weather.activities.ForecastCityActivity; import org.woheller69.weather.activities.ForecastCityActivity;
import org.woheller69.weather.activities.SettingsActivity; import org.woheller69.weather.activities.HelpActivity;
/** /**
@ -118,7 +118,7 @@ public class TutorialActivity extends AppCompatActivity {
} }
private void launchSettings() { private void launchSettings() {
startActivity(new Intent(TutorialActivity.this, SettingsActivity.class)); startActivity(new Intent(TutorialActivity.this, HelpActivity.class));
finish(); finish();
} }

View file

@ -14,7 +14,6 @@
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" android:paddingTop="@dimen/activity_vertical_margin"
android:layout_marginTop="53dp"
android:weightSum="1"> android:weightSum="1">
<TextView <TextView

View file

@ -13,10 +13,15 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
tools:context=".activities.AboutActivity"> tools:context=".activities.AboutActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" /> <include layout="@layout/toolbar" />
<include layout="@layout/about" /> <include layout="@layout/about" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -14,14 +14,20 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
tools:context=".activities.HelpActivity"> tools:context=".activities.HelpActivity">
<include layout="@layout/toolbar" /> <LinearLayout
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/help"
android:layout_marginTop="53dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" /> android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<WebView
android:id="@+id/help"
android:padding="10dp"
android:layout_width="match_parent"
android:layout_height="fill_parent" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView <com.google.android.material.navigation.NavigationView