Showing
8 changed files
with
11 additions
and
10 deletions
... | @@ -31,8 +31,9 @@ class ViewPagerAdapter(private val context : Context) : PagerAdapter() { | ... | @@ -31,8 +31,9 @@ class ViewPagerAdapter(private val context : Context) : PagerAdapter() { |
31 | layoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater | 31 | layoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater |
32 | val v = layoutInflater!!.inflate(R.layout.viewpager_activity, null) | 32 | val v = layoutInflater!!.inflate(R.layout.viewpager_activity, null) |
33 | val image = v.findViewById<View>(R.id.imageview) as ImageView | 33 | val image = v.findViewById<View>(R.id.imageview) as ImageView |
34 | + image.setBackgroundResource(Image[position]) | ||
34 | 35 | ||
35 | - image.setImageResource(Image[position]) | 36 | + //image.setImageResource(Image[position]) |
36 | val vp = container as ViewPager | 37 | val vp = container as ViewPager |
37 | vp.addView(v , 0) | 38 | vp.addView(v , 0) |
38 | 39 | ... | ... |
... | @@ -12,11 +12,11 @@ class WelcomeViewPagerAdapter(private val context : Context) : PagerAdapter() { | ... | @@ -12,11 +12,11 @@ class WelcomeViewPagerAdapter(private val context : Context) : PagerAdapter() { |
12 | 12 | ||
13 | private var layoutInflater : LayoutInflater? = null | 13 | private var layoutInflater : LayoutInflater? = null |
14 | val Image = arrayOf( | 14 | val Image = arrayOf( |
15 | - R.drawable.onboarding_1, | 15 | + R.drawable.onboarding1, |
16 | - R.drawable.onboarding_2, | 16 | + R.drawable.onboarding2, |
17 | - R.drawable.onboarding_3, | 17 | + R.drawable.onboarding3, |
18 | - R.drawable.onboarding_4, | 18 | + R.drawable.onboarding4, |
19 | - R.drawable.onboarding_5 | 19 | + R.drawable.onboarding5 |
20 | ) | 20 | ) |
21 | 21 | ||
22 | 22 | ||
... | @@ -33,8 +33,8 @@ class WelcomeViewPagerAdapter(private val context : Context) : PagerAdapter() { | ... | @@ -33,8 +33,8 @@ class WelcomeViewPagerAdapter(private val context : Context) : PagerAdapter() { |
33 | layoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater | 33 | layoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater |
34 | val v = layoutInflater!!.inflate(R.layout.welcomeviewpager_activity, null) | 34 | val v = layoutInflater!!.inflate(R.layout.welcomeviewpager_activity, null) |
35 | val image = v.findViewById<View>(R.id.imageview) as ImageView | 35 | val image = v.findViewById<View>(R.id.imageview) as ImageView |
36 | - | 36 | + image.setBackgroundResource(Image[position]) |
37 | - image.setImageResource(Image[position]) | 37 | + //image.setImageResource(Image[position]) |
38 | val vp = container as ViewPager | 38 | val vp = container as ViewPager |
39 | vp.addView(v , 0) | 39 | vp.addView(v , 0) |
40 | 40 | ... | ... |
89.5 KB
156 KB
195 KB
192 KB
287 KB
... | @@ -20,11 +20,11 @@ | ... | @@ -20,11 +20,11 @@ |
20 | android:layout_width="match_parent" | 20 | android:layout_width="match_parent" |
21 | android:layout_height="wrap_content" | 21 | android:layout_height="wrap_content" |
22 | android:layout_weight="0" | 22 | android:layout_weight="0" |
23 | - android:orientation="horizontal"> | 23 | + android:orientation="vertical"> |
24 | 24 | ||
25 | <Button | 25 | <Button |
26 | android:id="@+id/buttonGotIt" | 26 | android:id="@+id/buttonGotIt" |
27 | - android:layout_width="wrap_content" | 27 | + android:layout_width="match_parent" |
28 | android:layout_height="70dp" | 28 | android:layout_height="70dp" |
29 | android:layout_weight="1" | 29 | android:layout_weight="1" |
30 | android:background="#FF29ABE2" | 30 | android:background="#FF29ABE2" | ... | ... |
-
Please register or login to post a comment