Skip to content

Commit

Permalink
Add support for Material 1.1.0-alphaXX.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiper committed Jun 17, 2019
1 parent cc984d6 commit 6bd32c7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Change Log
==========

Version 1.0.1 *(2019-06-17)*
----------------------------

* Fix: Add support for Material 1.1.0-alphaXX.


Version 1.0.0 *(2019-06-13)*
----------------------------

Initial release.


2 changes: 1 addition & 1 deletion materialspinner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.sdkVersion
versionCode 1
versionName "1.0"
versionName "1.0.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
8 changes: 4 additions & 4 deletions materialspinner/src/main/java/com/tiper/MaterialSpinner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import com.tiper.materialspinner.R
* @see [android.support.design.widget.TextInputLayout]
* @author Tiago Pereira ([email protected])
*/
open class MaterialSpinner @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = android.support.design.R.attr.textInputStyle, mode: Int = Spinner.MODE_DROPDOWN) : TextInputLayout(context, attrs, defStyleAttr) {
open class MaterialSpinner @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, mode: Int = Spinner.MODE_DROPDOWN) : TextInputLayout(context, attrs) {


companion object {
Expand All @@ -49,7 +49,7 @@ open class MaterialSpinner @JvmOverloads constructor(context: Context, attrs: At
/**
* The view that will display the selected item.
*/
private val editText = TextInputEditText(context, null, android.support.design.R.attr.editTextStyle)
private val editText = TextInputEditText(getContext())

/**
* Drawable to display when the spinner is in a open state.
Expand Down Expand Up @@ -135,7 +135,7 @@ open class MaterialSpinner @JvmOverloads constructor(context: Context, attrs: At
DialogPopup(context, getString(R.styleable.MaterialSpinner_android_prompt))
}
else -> {
DropdownPopup(context, attrs, android.support.v7.appcompat.R.attr.listPopupWindowStyle)
DropdownPopup(context, attrs)
}
}
recycle()
Expand Down Expand Up @@ -352,7 +352,7 @@ open class MaterialSpinner @JvmOverloads constructor(context: Context, attrs: At
/**
* A PopupWindow that anchors itself to a host view and displays a list of choices.
*/
private inner class DropdownPopup(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : ListPopupWindow(context, attrs, defStyleAttr), SpinnerPopup {
private inner class DropdownPopup(context: Context, attrs: AttributeSet?) : ListPopupWindow(context, attrs), SpinnerPopup {

init {
inputMethodMode = INPUT_METHOD_NOT_NEEDED
Expand Down

0 comments on commit 6bd32c7

Please sign in to comment.