更改进度条Xamarin Android(C#)
我尝试为我的启动屏幕定制进度条 我是这样做的 以下是ProgressBarStyle.xml:更改进度条Xamarin Android(C#),c#,android,xamarin,xamarin.android,C#,Android,Xamarin,Xamarin.android,我尝试为我的启动屏幕定制进度条 我是这样做的 以下是ProgressBarStyle.xml: <?xml version="1.0" encoding="utf-8" ?> <rotate xmlns:android =" http://schemas.android.com/apk/res/android" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"
<?xml version="1.0" encoding="utf-8" ?>
<rotate xmlns:android =" http://schemas.android.com/apk/res/android"
android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0"
android:toDegrees="360">
<shape android:shape="ring" android:innerRadiusRatio="3"
android:thicknessRatio="8" android:useLevel="false">
<size android:width="76dip" android:height="76dip"/>
<gradient android:type="sweep" android:useLevel="false"
android:startColor="#F57847"
android:endColor="#E67E55"
android:angle="0"/>
</shape>
</rotate>
我的问题是进度条没有改变,它仍然是默认的
我的问题在哪里?我也有这个问题。而且似乎进度条UI不会改变,除非流程离开它被改变的范围。我建议使用另一个线程,我自己还没有尝试过,我仍在寻找更好的解决方案。看起来进度条支持已经随着时间的推移慢慢改善。就我个人而言,除了heightRequest不适用于Android之外,我几乎可以在共享代码中完成所有事情。我能够在xaml中使用ScaleY属性来解决它。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="25px"
android:minHeight="25px">
<ImageView
android:src="@drawable/logo_320"
android:layout_width="match_parent"
android:layout_height="318.1dp"
android:id="@+id/imageView1"
android:layout_marginTop="117.1dp" />
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="67.4dp"
android:background="@drawable/ProgressBarStyle"
android:layout_centerInParent="true"
android:indeterminate="true"
android:id="@+id/progressBar1"
android:layout_marginLeft="127.4dp" />
<TextView
android:text="ЗАГРУЗКА КЭША "
android:layout_width="match_parent"
android:layout_height="52.0dp"
android:id="@+id/textView1"
android:layout_marginTop="28.0dp"
android:textSize="20sp"
android:paddingLeft="95dp" />
</LinearLayout>