有什么区别:
android:background="?selectableItemBackground"
android:background="?attr/selectableItemBackground"
android:background="?android:selectableItemBackground"
android:background="?android:attr/selectableItemBackground"
Run Code Online (Sandbox Code Playgroud)
在Android?
组织专业Android应用程序按钮样式的最佳实践是什么?假设更大的当代应用程序(SDK 26 +,min SDK 21).
这个问题是可以回答的,因为它们的来源Material Design和设置都Android Studio提供了足够的线索和预期专业用途模式的例子.当然,用户不仅限于这种模式,而是遵循它们,使应用程序与源代码一起发挥良好Material Design并提供最佳可维护性.
我找到了几个与按钮造型相关的成分.
@style/Widget.AppCompat.Button@style/Widget.AppCompat.Button.Colored@style/TextAppearance.AppCompat.Button@style/TextAppearance.AppCompat.Widget.Button@color/foreground_material_dark?colorAccent?textColorPrimary?android:colorForeground?textAppearanceButton可能会有更多.
您可以查找来源.但是,即使知道所有细节也无法全面了解预期用途.这个问题要求绘制图片.
android android-layout android-fonts android-studio android-color