我目前在通过gradle导入的Android项目中使用外部库.
此库显示带有ProgressBar圈的通知栏.这是我在其中找到的代码:
<ProgressBar
android:id="@+id/progress_bar"
android:layout_height="match_parent"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
style="@style/SuperActivityToast_Progress_ProgressBar"/>
Run Code Online (Sandbox Code Playgroud)
相关的风格是这样的:
<style name="SuperActivityToast_Progress_ProgressBar" parent="android:Widget.Holo.ProgressBar">
<item name="android:layout_width">32dp</item>
<item name="android:layout_marginLeft">8dp</item>
</style>
Run Code Online (Sandbox Code Playgroud)
如果我理解相关信息,则显示的圆圈颜色来自默认颜色(手机上的绿色).我需要改变它!
现在,我无法修改源代码,库本身也不能让我以编程方式设置样式.
有一种方法可以在应用级别更改默认样式或更好地覆盖此特定样式?
谢谢戴维德
我需要为Play商店生成已签名的APK.(使用Android Studio)如果我没有proguard(build.gradle中的minifyEnabled false)那么一切正常!
如果我使用默认参数激活它:
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Run Code Online (Sandbox Code Playgroud)
我收到这些警告
:app:proguardRelease
Warning: com.android.volley.error.VolleyErrorHelper$1: can't find superclass or interface com.google.gson.reflect.TypeToken
Warning: com.android.volley.error.VolleyErrorHelper: can't find referenced class com.google.gson.Gson
Warning: com.android.volley.error.VolleyErrorHelper: can't find referenced class com.google.gson.Gson
Warning: com.android.volley.error.VolleyErrorHelper: can't find referenced method 'java.lang.reflect.Type getType()' in program class com.android.volley.error.VolleyErrorHelper$1
Warning: com.android.volley.error.VolleyErrorHelper: can't find referenced class com.google.gson.Gson
Warning: com.android.volley.error.VolleyErrorHelper$1: can't find referenced class com.google.gson.reflect.TypeToken
Warning: com.android.volley.error.VolleyErrorHelper$1: can't find referenced class com.google.gson.reflect.TypeToken
Warning: com.android.volley.error.VolleyErrorHelper$1: can't find …Run Code Online (Sandbox Code Playgroud)