Browse Source

indicator code added

PankajBranch^2
Hemant Khadase 2 years ago
parent
commit
4d0ccce126
12 changed files with 111 additions and 68 deletions
  1. +1
    -1
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/adapters1/SectionsPagerAdapter1.kt
  2. +2
    -2
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/activities1/RegisterActivity.kt
  3. +1
    -1
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/activities1/ViewPagerActivity.kt
  4. +5
    -2
      app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/AlmostThereFragment.kt
  5. +13
    -0
      app/src/main/res/drawable/default_pager_dot.xml
  6. +13
    -0
      app/src/main/res/drawable/selected_pager_dot.xml
  7. +7
    -0
      app/src/main/res/drawable/tab_pager_selector.xml
  8. +1
    -1
      app/src/main/res/layout/activity_register.xml
  9. +17
    -45
      app/src/main/res/layout/activity_viewpager.xml
  10. +41
    -12
      app/src/main/res/layout/fragment_almost_there.xml
  11. +5
    -2
      app/src/main/res/values-hi-rIN/strings.xml
  12. +5
    -2
      app/src/main/res/values/strings.xml

+ 1
- 1
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/adapters1/SectionsPagerAdapter1.kt View File

@ -13,6 +13,6 @@ class SectionsPagerAdapter1(manager: FragmentManager, private val fragments: Arr
override fun getCount(): Int = fragments.size
override fun getPageTitle(position: Int): CharSequence = titles[position]
// override fun getPageTitle(position: Int): CharSequence = titles[position]
}

+ 2
- 2
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/activities1/RegisterActivity.kt View File

@ -32,11 +32,11 @@ class RegisterActivity : BaseActivity() {
startActivity(intent)
}
binding.btnDistributor.setOnClickListener{
intent = Intent(this@RegisterActivity, RegisterActivity::class.java)
intent = Intent(this@RegisterActivity, ViewPagerActivity::class.java)
startActivity(intent)
}
binding.btnReferrer.setOnClickListener{
intent = Intent(this@RegisterActivity, RegisterActivity::class.java)
intent = Intent(this@RegisterActivity, ViewPagerActivity::class.java)
startActivity(intent)
}


+ 1
- 1
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/activities1/ViewPagerActivity.kt View File

@ -44,6 +44,7 @@ class ViewPagerActivity : BaseActivity() {
viewPager.adapter = sectionsPagerAdapter
viewPager.setPagingEnabled(false)
viewPager.offscreenPageLimit = 3
binding.tabDots.setupWithViewPager(viewPager)
viewPager.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrolled(
position: Int,
@ -70,7 +71,6 @@ class ViewPagerActivity : BaseActivity() {
}
})
}
// step 1 response


+ 5
- 2
app/src/main/java/com/nivesh/production/niveshfd/partnerOnBoarding/ui/fragments1/AlmostThereFragment.kt View File

@ -97,6 +97,9 @@ class AlmostThereFragment : Fragment() {
}
binding.tvPrivacyPolicy.setOnClickListener{
}
binding.tvAgreement.setOnClickListener{
}
binding.btnBack.setOnClickListener {
@ -105,7 +108,7 @@ class AlmostThereFragment : Fragment() {
binding.btnNext.setOnClickListener {
if (validate()) {
// submit
}
}
@ -180,7 +183,7 @@ class AlmostThereFragment : Fragment() {
""
)
}else if (!binding.cbCheck.isChecked) { // EditText
return false;
return false
} else {
return true
}


+ 13
- 0
app/src/main/res/drawable/default_pager_dot.xml View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:innerRadius="0dp"
android:shape="ring"
android:thickness="@dimen/margin_10"
android:useLevel="false">
<solid android:color="@color/greyColor2"/>
</shape>
</item>
</layer-list>

+ 13
- 0
app/src/main/res/drawable/selected_pager_dot.xml View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:innerRadius="0dp"
android:shape="ring"
android:thickness="@dimen/margin_10"
android:useLevel="false">
<solid android:color="@color/red"/>
</shape>
</item>
</layer-list>

+ 7
- 0
app/src/main/res/drawable/tab_pager_selector.xml View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/selected_pager_dot"
android:state_selected="true"/>
<item android:drawable="@drawable/default_pager_dot"/>
</selector>

+ 1
- 1
app/src/main/res/layout/activity_register.xml View File

@ -50,7 +50,7 @@
android:id="@+id/txtAccount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginTop="@dimen/margin_15"
android:maxLines="2"
android:padding="@dimen/margin_5"


+ 17
- 45
app/src/main/res/layout/activity_viewpager.xml View File

@ -1,49 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:layout_gravity="center_horizontal"
android:background="@color/greyColor4">
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/red"
android:orientation="horizontal">
<ImageView
android:id="@+id/imgBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="@dimen/margin_15"
android:layout_marginEnd="@dimen/margin_15"
android:contentDescription="@string/back"
android:gravity="center"
android:padding="@dimen/margin_10"
android:src="@drawable/svg_back" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?actionBarSize"
android:padding="@dimen/margin_16"
android:text="@string/fd"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
android:textColor="@color/white"
android:textSize="@dimen/text_size_14" />
</LinearLayout>
</com.google.android.material.appbar.AppBarLayout>
android:layout_height="match_parent"
android:orientation="vertical">
<com.nivesh.production.niveshfd.partnerOnBoarding.adapters1.DisableAdapter1
android:id="@+id/viewPager1"
@ -52,5 +12,17 @@
android:contentDescription="@string/viewpager"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabDots"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
app:tabBackground="@drawable/tab_pager_selector"
app:tabGravity="center"
android:layout_marginBottom="@dimen/margin_70"
android:layout_alignParentBottom="true"
app:tabPaddingStart="@dimen/margin_25"
app:tabPaddingEnd="@dimen/margin_25"
app:tabIndicatorHeight="0dp" />
</RelativeLayout>

+ 41
- 12
app/src/main/res/layout/fragment_almost_there.xml View File

@ -9,7 +9,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/margin_90"
android:layout_marginBottom="@dimen/margin_100"
android:fillViewport="true"
android:padding="@dimen/margin_15"
app:layout_constraintTop_toTopOf="parent">
@ -140,7 +140,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:digits="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ"
android:digits="@string/onlyAlphabets"
android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14"
tool:ignore="TextContrastCheck" />
@ -289,6 +289,7 @@
android:layout_height="@dimen/margin_48"
android:layout_marginTop="@dimen/margin_20"
android:layout_marginEnd="@dimen/margin_25"
android:buttonTint="@color/black"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tlState" />
@ -307,31 +308,46 @@
android:id="@+id/tvTermsAndCondition"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_5"
android:layout_marginStart="@dimen/margin_45"
android:text="@string/terms_and_conditions"
android:textColor="@color/blue1"
app:layout_constraintStart_toEndOf="@+id/cbCheck"
app:layout_constraintStart_toEndOf="@+id/tvPrivacyPolicy"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/byClicking" />
<TextView
android:id="@+id/tvAnd"
android:id="@+id/tvPrivacyPolicy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_5"
android:layout_marginStart="@dimen/margin_5"
android:text="@string/and"
android:text="@string/privacyPolicy"
android:textColor="@color/blue1"
app:layout_constraintStart_toEndOf="@+id/tvTermsAndCondition"
app:layout_constraintTop_toBottomOf="@id/byClicking" />
<TextView
android:id="@+id/tvPrivacyPolicy"
android:id="@+id/tvAnd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="@string/privacyPolicy"
android:layout_marginStart="@dimen/margin_5"
android:layout_marginTop="@dimen/margin_5"
android:text="@string/and"
app:layout_constraintStart_toEndOf="@+id/tvPrivacyPolicy"
app:layout_constraintTop_toBottomOf="@id/byClicking"/>
<TextView
android:id="@+id/tvAgreement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_5"
android:layout_marginStart="@dimen/margin_45"
android:text="@string/agreement"
android:textColor="@color/blue1"
app:layout_constraintStart_toEndOf="@+id/tvAnd"
app:layout_constraintTop_toBottomOf="@id/byClicking" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTermsAndCondition"/>
</androidx.constraintlayout.widget.ConstraintLayout>
@ -342,7 +358,7 @@
android:layout_width="@dimen/margin_120"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_35"
android:backgroundTint="@color/white"
android:text="@string/back"
android:textColor="@color/red"
@ -356,7 +372,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_30"
android:layout_marginEnd="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_35"
android:backgroundTint="@color/red"
android:text="@string/next"
android:textColor="@color/white"
@ -365,5 +381,18 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/btnBack" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_150"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginBottom="@dimen/margin_20"
app:layout_constraintTop_toBottomOf="@+id/btnNext"
android:text="@string/upNextHome"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

+ 5
- 2
app/src/main/res/values-hi-rIN/strings.xml View File

@ -286,10 +286,13 @@
<string name="month">MM</string>
<string name="year">YYYY</string>
<string name="byClicking">By clicking on next, you agree to accept our</string>
<string name="terms_and_conditions">terms and conditions</string>
<string name="terms_and_conditions">terms and conditions,</string>
<string name="and">and</string>
<string name="privacyPolicy">privacy policy.</string>
<string name="privacyPolicy">privacy policy</string>
<string name="number">0123456789</string>
<string name="agreement">Agreement</string>
<string name="upNextHome">Up Next: Home</string>
<string name="onlyAlphabets">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</string>
</resources>

+ 5
- 2
app/src/main/res/values/strings.xml View File

@ -293,10 +293,13 @@
<string name="month">MM</string>
<string name="year">YYYY</string>
<string name="byClicking">By clicking on next, you agree to accept our</string>
<string name="terms_and_conditions">terms and conditions</string>
<string name="terms_and_conditions">terms and conditions,</string>
<string name="and">and</string>
<string name="privacyPolicy">privacy policy.</string>
<string name="privacyPolicy">privacy policy</string>
<string name="number">0123456789</string>
<string name="agreement">Agreement</string>
<string name="upNextHome">Up Next: Home</string>
<string name="onlyAlphabets">abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ</string>
</resources>

Loading…
Cancel
Save

Powered by TurnKey Linux.