Change in welcome layout

This commit is contained in:
jacques 2021-03-28 23:15:00 +02:00
parent 6d36fa3839
commit 9e77f6ac11
5 changed files with 14 additions and 19 deletions

View file

@ -104,14 +104,11 @@ public class WelcomeActivity extends AppCompatActivity {
private void addBottomDots(int currentPage) {
TextView[] dots = new TextView[layouts.length];
//int[] colorsActive = getResources().getIntArray(R.array.array_dot_active);
//int[] colorsInactive = getResources().getIntArray(R.array.array_dot_inactive);
dotsLayout.removeAllViews();
for (int i = 0; i < dots.length; i++) {
dots[i] = new TextView(this);
dots[i].setText("");
dots[i].setTextSize(35);
dots[i].setTextSize(65);
dots[i].setTextColor(ContextCompat.getColor(this, R.color.dot_dark));
dotsLayout.addView(dots[i]);
}
@ -179,7 +176,6 @@ public class WelcomeActivity extends AppCompatActivity {
@Override
public Object instantiateItem(ViewGroup container, int position) {
//LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LayoutInflater layoutInflater = getLayoutInflater();
View view = layoutInflater.inflate(layouts[position], container, false);

View file

@ -9,7 +9,8 @@
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:background="@color/bg_screen1" />
<LinearLayout
android:id="@+id/layoutDots"
@ -21,13 +22,6 @@
android:orientation="horizontal">
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:alpha=".5"
android:layout_above="@id/layoutDots"
android:background="@android:color/white" />
<Button
android:id="@+id/btn_next"
android:layout_width="wrap_content"
@ -36,16 +30,19 @@
android:layout_alignParentEnd="true"
android:background="@null"
android:text="@string/next"
android:layout_marginBottom="@dimen/dots_margin_bottom"
android:textColor="@android:color/white"
tools:ignore="RelativeOverlap" />
tools:ignore="RelativeOverlap,RtlSymmetry"/>
<Button
android:id="@+id/btn_skip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dots_margin_bottom"
android:background="@null"
android:text="@string/skip"
android:textColor="@android:color/white" />
android:textColor="@android:color/white"/>
</RelativeLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_screen1">
@ -9,7 +10,8 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:orientation="vertical">
android:orientation="vertical"
tools:ignore="UselessParent">
<ImageView
android:layout_width="@dimen/img_width_height"

View file

@ -65,6 +65,6 @@
<string name="slide12_desc">Plus de renseignements sur https://pilldroid.foucry.net</string>
<string name="skip">Passer</string>
<string name="next">Suivant</string>
<string name="start">Démarrage</string>
<string name="start">Démarrer</string>
</resources>

View file

@ -9,7 +9,7 @@
<!-- Slide dimens -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="dots_height">50dp</dimen>
<dimen name="dots_height">75dp</dimen>
<dimen name="dots_margin_bottom">20dp</dimen>
<dimen name="img_width_height">240dp</dimen>
<dimen name="slide_title">30sp</dimen>