Commit 427ca9b1 authored by Mygod's avatar Mygod

Remove useless TargetApi

parent 2f8c1ab7
package com.github.shadowsocks.preferences package com.github.shadowsocks.preferences
import android.annotation.TargetApi
import android.content.Context import android.content.Context
import android.content.res.TypedArray import android.content.res.TypedArray
import android.os.Build
import android.preference.Preference import android.preference.Preference
import android.support.annotation.{ArrayRes, NonNull} import android.support.annotation.{ArrayRes, NonNull}
import android.support.v7.widget.AppCompatSpinner import android.support.v7.widget.AppCompatSpinner
...@@ -155,7 +153,6 @@ final class DropDownPreference(private val mContext: Context, attrs: AttributeSe ...@@ -155,7 +153,6 @@ final class DropDownPreference(private val mContext: Context, attrs: AttributeSe
protected override def onSetInitialValue (restoreValue: Boolean, defaultValue: AnyRef) = protected override def onSetInitialValue (restoreValue: Boolean, defaultValue: AnyRef) =
setValue(if (restoreValue) getPersistedString(getValue) else defaultValue.asInstanceOf[String]) setValue(if (restoreValue) getPersistedString(getValue) else defaultValue.asInstanceOf[String])
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
def setDropDownWidth(dimenResId: Int) = def setDropDownWidth(dimenResId: Int) =
mSpinner.setDropDownWidth(mContext.getResources.getDimensionPixelSize(dimenResId)) mSpinner.setDropDownWidth(mContext.getResources.getDimensionPixelSize(dimenResId))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment