Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed02Emad committed Jun 22, 2023
1 parent af431ab commit 5e66f84
Show file tree
Hide file tree
Showing 33 changed files with 43 additions and 430 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.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 @@ -7,6 +7,7 @@ import androidx.core.widget.doAfterTextChanged
import com.mo_stepper.horizonta_stepper.databinding.ActivityMainBinding
import com.mo_stepper.mohorizontalstepper.MoHorizontalStepper


class MainActivity : AppCompatActivity() {

private lateinit var binding: ActivityMainBinding
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
android:layout_height="match_parent"
tools:context=".MainActivity">


<com.mo_stepper.mohorizontalstepper.MoHorizontalStepper
android:id="@+id/stepper"
android:layout_width="match_parent"
Expand Down
19 changes: 0 additions & 19 deletions app/src/main/res/layout/space.xml

This file was deleted.

34 changes: 0 additions & 34 deletions app/src/main/res/layout/step_view_layout.xml

This file was deleted.

4 changes: 0 additions & 4 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@

</style>

<style name="roundedImageViewRounded">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">50%</item>
</style>

</resources>
35 changes: 13 additions & 22 deletions mohorizontalstepper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ plugins {
id 'maven-publish'
}
group = 'Mohamed02Emad'
version = "1.0.3"
version = "1.0.4"

android {
namespace 'com.mo_stepper.mohorizontalstepper'
compileSdk 33
Expand Down Expand Up @@ -32,39 +33,29 @@ android {
jvmTarget = '1.8'
}

// productFlavors {
// flavor1 {
// applicationId 'com.mo_stepper.mohorizontalstepper'
// }
// publishing {
// singleVariant("release") {
// withSourcesJar()
// withJavadocJar()
// }
// }
// }

dependencies {
}

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
dependencies {

}
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}


publishing {
publications {
release(MavenPublication) {
groupId = 'com.github.Mohamed02Emad'
artifactId = 'mo-horizontal-stepper'
version = '1.0.3'
version = '1.0.4'

afterEvaluate {
from components.release
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +0,0 @@
package com.mo_stepper.mohorizontalstepper

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.mo_stepper.mohorizontalstepper", appContext.packageName)
}
}
21 changes: 0 additions & 21 deletions mohorizontalstepper/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.mo_stepper.mohorizontalstepper

import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.Menu
import android.view.View
Expand All @@ -10,6 +11,7 @@ import android.widget.LinearLayout
import android.widget.TextView
import androidx.core.content.ContextCompat


class MoHorizontalStepper @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
Expand Down Expand Up @@ -91,16 +93,19 @@ class MoHorizontalStepper @JvmOverloads constructor(
private fun initStepper() {
for (i in 0 until numberOfSteps) {
val stepView = createStepView(i + 1)
stepViews.add(stepView)
stepViews.add(stepView)
Log.d("mohamed", "initStepper: 2 ")
addView(stepView)

if (i != numberOfSteps - 1) {
Log.d("mohamed", "initStepper: 3 ")
val space = createSpace()
spaceViews.add(space)
addView(space)
}

}

updateStepViews()
}

Expand Down Expand Up @@ -200,6 +205,15 @@ class MoHorizontalStepper @JvmOverloads constructor(

fun isLastStep(): Boolean = currentStepIndex == stepViews.size - 1

fun getFragmentByIndex(stepIndex: Int): Int? {
return try {
menu?.getItem(stepIndex)?.itemId
} catch (_: java.lang.Exception) {
null
}
}


/*
methods for shaping and coloring
*/
Expand Down Expand Up @@ -322,13 +336,6 @@ class MoHorizontalStepper @JvmOverloads constructor(
initStepper()
}

fun getFragmentByIndex(stepIndex: Int): Int? {
return try {
menu?.getItem(stepIndex)?.itemId
} catch (_: java.lang.Exception) {
null
}
}

/*
enum for modes
Expand Down

This file was deleted.

Loading

0 comments on commit 5e66f84

Please sign in to comment.