|
|
|
@ -4,7 +4,6 @@ import android.content.Context |
|
|
|
|
import android.graphics.drawable.Drawable |
|
|
|
|
import android.util.AttributeSet |
|
|
|
|
import android.view.View |
|
|
|
|
import android.view.ViewGroup |
|
|
|
|
import android.widget.FrameLayout |
|
|
|
|
import android.widget.ProgressBar |
|
|
|
|
import androidx.appcompat.widget.AppCompatButton |
|
|
|
@ -61,30 +60,6 @@ class DynamicFrameLayout(context: Context, attrs: AttributeSet?) : FrameLayout(c |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun addView(child: View) { |
|
|
|
|
check(childCount <= 2) { "DynamicFrameLayout can host only one direct child" } |
|
|
|
|
|
|
|
|
|
super.addView(child) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun addView(child: View, index: Int) { |
|
|
|
|
check(childCount <= 2) { "DynamicFrameLayout can host only one direct child" } |
|
|
|
|
|
|
|
|
|
super.addView(child, index) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun addView(child: View, params: ViewGroup.LayoutParams) { |
|
|
|
|
check(childCount <= 2) { "DynamicFrameLayout can host only one direct child" } |
|
|
|
|
|
|
|
|
|
super.addView(child, params) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun addView(child: View, index: Int, params: ViewGroup.LayoutParams) { |
|
|
|
|
check(childCount <= 2) { "DynamicFrameLayout can host only one direct child" } |
|
|
|
|
|
|
|
|
|
super.addView(child, index, params) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun showErrorView(message: CharSequence) { |
|
|
|
|
ensureErrorView() |
|
|
|
|
|
|
|
|
|