~singpolyma/cheogram-android

ee698d591dd0640b674c30bd825a8155e946710f — Stephen Paul Weber 10 months ago 3e21673
Include link to app privacy policy in welcome flow
M src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java => src/cheogram/java/eu/siacs/conversations/ui/WelcomeActivity.java +4 -0
@@ 150,11 150,15 @@ public class WelcomeActivity extends XmppActivity implements XmppConnectionServi

            public void onPageSelected(int position) {
                binding.buttonNext.setVisibility(position > 1 ? View.GONE : View.VISIBLE);
                binding.buttonPrivacy.setVisibility(position < 2 ? View.GONE : View.VISIBLE);
            }
        });
        binding.buttonNext.setOnClickListener((v) ->
            binding.slideshowPager.setCurrentItem(binding.slideshowPager.getCurrentItem() + 1)
        );
        binding.buttonPrivacy.setOnClickListener((v) ->
            startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://cheogram.com/android-privacy.html")))
        );
        setSupportActionBar(binding.toolbar);
        configureActionBar(getSupportActionBar(), false);
        binding.registerNewAccount.setOnClickListener(v -> {

M src/cheogram/res/layout/activity_welcome.xml => src/cheogram/res/layout/activity_welcome.xml +17 -0
@@ 306,6 306,23 @@
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@id/dots_indicator" />

        <Button
            android:id="@+id/button_privacy"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="16dp"
            android:layout_marginEnd="32dp"
            android:layout_marginRight="32dp"
            android:layout_marginBottom="32dp"
            android:text="View Privacy Policy"
            android:textColor="?attr/colorPrimaryDark"
            android:visibility="gone"
            app:backgroundTint="@color/yeller"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@id/dots_indicator" />
      </androidx.constraintlayout.widget.ConstraintLayout>

  </androidx.constraintlayout.widget.ConstraintLayout>