Skip to content

Commit

Permalink
Merge pull request #4 from acefalobi/fix/remove-default-padding
Browse files Browse the repository at this point in the history
Removed default static padding.
Upgraded to Kotlin 1.4.0
  • Loading branch information
acefalobi authored Aug 18, 2020
2 parents 7c60d7c + 5558bbc commit 005ea21
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 23 deletions.
11 changes: 10 additions & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class NumberedTabStepperActivity : AppCompatActivity(), StepperNavListener {
)
)

menu.add(0 /* or 0 */, R.id.step_4_dest, 0, "New Step")

stepperNavListener = this@NumberedTabStepperActivity
setupWithNavController(findNavControllerFromFragment(R.id.frame_stepper))
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/progress_stepper_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
android:id="@+id/stepper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="40dp"
app:iconSize="20dp"
app:items="@menu/menu_stepper"
app:textColor="@android:color/black"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/layout/stepper_no_up_nav_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
android:id="@+id/stepper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
app:iconSize="20dp"
app:items="@menu/menu_stepper"
app:textColor="@android:color/black"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/layout/tab_numbered_stepper_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
android:id="@+id/stepper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
app:iconSize="24dp"
app:items="@menu/menu_stepper"
app:textColor="@android:color/black"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/layout/tab_stepper_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
android:id="@+id/stepper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
app:iconSize="20dp"
app:items="@menu/menu_stepper"
app:textColor="@android:color/black"
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ kotlinDslPluginOptions {

dependencies {
implementation("com.android.tools.build:gradle:4.0.1")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
implementation("org.jetbrains.kotlin:kotlin-allopen:1.3.72")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0")
implementation("org.jetbrains.kotlin:kotlin-allopen:1.4.0")
implementation("com.diffplug.spotless:spotless-plugin-gradle:4.3.0")
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object ProjectDependencies {
object RootDependencies {

object Versions {
const val kotlin = "1.3.72"
const val kotlin = "1.4.0"
}

const val kotlin = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}"
Expand All @@ -41,7 +41,7 @@ object AndroidXDependencies {
object AsyncDependencies {

object Versions {
const val coroutines = "1.3.7"
const val coroutines = "1.3.9"
}

const val coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutines}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ class StepperNavigationView(context: Context, attrs: AttributeSet) : FrameLayout

menu = when (type) {
context.getString(R.string.stepper_type_tab) -> {
updatePadding(
16 * resources.displayMetrics.density.toInt(),
20 * resources.displayMetrics.density.toInt(),
16 * resources.displayMetrics.density.toInt(),
20 * resources.displayMetrics.density.toInt()
)
TabStepperMenu(
context,
widgetColorAttr,
Expand All @@ -148,12 +142,6 @@ class StepperNavigationView(context: Context, attrs: AttributeSet) : FrameLayout
)
}
context.getString(R.string.stepper_type_tab_numbered) -> {
updatePadding(
16 * resources.displayMetrics.density.toInt(),
20 * resources.displayMetrics.density.toInt(),
16 * resources.displayMetrics.density.toInt(),
20 * resources.displayMetrics.density.toInt()
)
TabNumberedStepperMenu(
context,
widgetColorAttr,
Expand All @@ -163,12 +151,6 @@ class StepperNavigationView(context: Context, attrs: AttributeSet) : FrameLayout
)
}
context.getString(R.string.stepper_type_progress) -> {
updatePadding(
40 * resources.displayMetrics.density.toInt(),
40 * resources.displayMetrics.density.toInt(),
40 * resources.displayMetrics.density.toInt(),
40 * resources.displayMetrics.density.toInt()
)
ProgressStepperMenu(
context,
widgetColorAttr,
Expand Down

0 comments on commit 005ea21

Please sign in to comment.