Skip to content

Commit 1b52301

Browse files
Feat :
- redme.md updated and package name change
1 parent 6526465 commit 1b52301

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies {
5757

5858
* Usage
5959
```
60-
<com.simform.ssCustomEdittextOutlinedBorder.CustomComponent
60+
<com.simform.customcomponent.CustomEdittextOutlinedBorder
6161
android:id="@+id/edtAbout"
6262
android:layout_width="0dp"
6363
android:layout_height="wrap_content"
@@ -80,4 +80,4 @@ dependencies {
8080
app:textValue="aboutText"/>
8181
```
8282

83-
![](data.gif)
83+
![](/Users/Shweta.Chauhan/Desktop/workspace/CustomEditTextOutlineBorder/customedittextoutlinedborder/src/main/assets/data.gif)

app/src/main/java/com/simform/customedittextoutlineborder/BaseActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import androidx.annotation.LayoutRes
2121
import androidx.appcompat.app.AppCompatActivity
2222
import androidx.databinding.DataBindingUtil
2323
import androidx.databinding.ViewDataBinding
24-
import com.simform.ssCustomEdittextOutlinedBorder.BR
24+
import com.simform.customcomponent.BR
2525

2626
/**
2727
* This is base activity of all activities

app/src/main/res/layout/activity_main.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
android:background="@color/colorPrimary"
2525
tools:context=".MainActivity">
2626

27-
<com.simform.ssCustomEdittextOutlinedBorder.CustomComponent
27+
<com.simform.customcomponent.CustomEdittextOutlinedBorder
2828
android:id="@+id/edtEmail"
2929
android:layout_width="0dp"
3030
android:layout_height="wrap_content"
@@ -45,7 +45,7 @@
4545
app:layout_constraintTop_toTopOf="parent"
4646
app:textValue="@={viewModel.email}" />
4747

48-
<com.simform.ssCustomEdittextOutlinedBorder.CustomComponent
48+
<com.simform.customcomponent.CustomEdittextOutlinedBorder
4949
android:id="@+id/edtPassword"
5050
android:layout_width="0dp"
5151
android:layout_height="wrap_content"
@@ -65,7 +65,7 @@
6565
app:layout_constraintTop_toBottomOf="@+id/edtEmail"
6666
app:textValue="@={viewModel.password}" />
6767

68-
<com.simform.ssCustomEdittextOutlinedBorder.CustomComponent
68+
<com.simform.customcomponent.CustomEdittextOutlinedBorder
6969
android:id="@+id/edtAbout"
7070
android:layout_width="0dp"
7171
android:layout_height="wrap_content"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.simform.ssCustomEdittextOutlinedBorder" />
2+
package="com.simform.customcomponent" />

images/data.gif renamed to customedittextoutlinedborder/src/main/assets/data.gif

File renamed without changes.

customedittextoutlinedborder/src/main/java/com/simform/ssCustomEdittextOutlinedBorder/CustomComponent.kt renamed to customedittextoutlinedborder/src/main/java/com/simform/customcomponent/CustomEdittextOutlinedBorder.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.simform.ssCustomEdittextOutlinedBorder
1+
package com.simform.customcomponent
22

33
import android.content.Context
44
import android.graphics.Typeface
@@ -19,10 +19,10 @@ import androidx.databinding.InverseBindingMethod
1919
import androidx.databinding.InverseBindingMethods
2020
import kotlinx.android.synthetic.main.layout_custom_edittext.view.*
2121

22-
@InverseBindingMethods(value = [InverseBindingMethod(type = CustomComponent::class, attribute = "textValue", event = "android:textAttrChanged", method = "getTextValue"),
23-
InverseBindingMethod(type = CustomComponent::class, attribute = "errorTextValue"),
24-
InverseBindingMethod(type = CustomComponent::class, attribute = "isErrorEnable")])
25-
class CustomComponent @JvmOverloads constructor(context: Context, attrs: AttributeSet?, defStyle: Int = 0, defStyleRes: Int = 0) : LinearLayout(context, attrs, defStyle, defStyleRes) {
22+
@InverseBindingMethods(value = [InverseBindingMethod(type = CustomEdittextOutlinedBorder::class, attribute = "textValue", event = "android:textAttrChanged", method = "getTextValue"),
23+
InverseBindingMethod(type = CustomEdittextOutlinedBorder::class, attribute = "errorTextValue"),
24+
InverseBindingMethod(type = CustomEdittextOutlinedBorder::class, attribute = "isErrorEnable")])
25+
class CustomEdittextOutlinedBorder @JvmOverloads constructor(context: Context, attrs: AttributeSet?, defStyle: Int = 0, defStyleRes: Int = 0) : LinearLayout(context, attrs, defStyle, defStyleRes) {
2626

2727
private var titleColor = ContextCompat.getColor(context, R.color.color_brownish_grey_two)
2828
private var titleErrorColor = ContextCompat.getColor(context, R.color.color_error)

customedittextoutlinedborder/src/main/java/com/simform/databinding/CustomEditTextBinder.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import androidx.databinding.InverseBindingListener
77
import androidx.databinding.adapters.ListenerUtil
88
import androidx.databinding.adapters.TextViewBindingAdapter
99
import kotlinx.android.synthetic.main.layout_custom_edittext.view.*
10-
import com.simform.ssCustomEdittextOutlinedBorder.CustomComponent
11-
import com.simform.ssCustomEdittextOutlinedBorder.R
10+
import com.simform.customcomponent.CustomEdittextOutlinedBorder
11+
import com.simform.customcomponent.R
1212

1313
object CustomEditTextBinder {
1414

@@ -20,29 +20,29 @@ object CustomEditTextBinder {
2020
*/
2121
@JvmStatic
2222
@BindingAdapter("textValue")
23-
fun setTextValue(customEditText: CustomComponent, value: String?) {
23+
fun setTextValue(customEditText: CustomEdittextOutlinedBorder, value: String?) {
2424
value?.let {
2525
customEditText.editText.setText(value)
2626
}
2727
}
2828

2929
@JvmStatic
3030
@BindingAdapter("errorTextValue")
31-
fun setErrorTextValue(customEditText: CustomComponent, value: String?) {
31+
fun setErrorTextValue(customEditText: CustomEdittextOutlinedBorder, value: String?) {
3232
value?.let {
3333
customEditText.lableError.text = value
3434
}
3535
}
3636

3737
@JvmStatic
3838
@BindingAdapter("isErrorEnable")
39-
fun setIsErrorEnable(customEditText: CustomComponent, value: Boolean) {
39+
fun setIsErrorEnable(customEditText: CustomEdittextOutlinedBorder, value: Boolean) {
4040
customEditText.setIsErrorEnable(value)
4141
}
4242

4343
@JvmStatic
4444
@BindingAdapter(value = ["android:afterTextChanged", "android:textAttrChanged"], requireAll = false)
45-
fun setTextWatcher(filterPositionView: CustomComponent, test: TextViewBindingAdapter.AfterTextChanged?, textAttrChanged: InverseBindingListener?) {
45+
fun setTextWatcher(filterPositionView: CustomEdittextOutlinedBorder, test: TextViewBindingAdapter.AfterTextChanged?, textAttrChanged: InverseBindingListener?) {
4646
val newValue = object : TextWatcher {
4747
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
4848
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {}

0 commit comments

Comments
 (0)