2

Tengo este diseño que se ve de esta forma: introducir la descripción de la imagen aquí

Lo que quiero hacer es que el ancho del la barra de progreso que indica la flecha sea mas fina si hay alguna forma de hacerlo en tiempo de ejecución sería perfecto, Muchas Gracias

<?xml version="1.0" encoding="utf-8"?>
   <android.support.constraint.ConstraintLayout 
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:background="@drawable/fotos">
          <RelativeLayout
              android:id="@+id/relativeLayout"
              android:layout_width="464dp"
              android:layout_height="764dp"
              android:layout_alignParentBottom="true"
              app:layout_constraintBottom_toBottomOf="parent"
              tools:ignore="MissingConstraints"
              tools:layout_editor_absoluteX="8dp">
                    <ImageButton
                        android:id="@+id/start"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:background="@android:color/transparent"
                        android:elevation="0dp"
                        app:srcCompat="@drawable/push"
         tools:ignore="ContentDescription,InefficientWeight,UnusedAttribute" />
                    <ProgressBar
                         android:id="@+id/progressBar"
                         style="?android:attr/progressBarStyle"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
                         android:layout_weight="1"
                         tools:ignore="ObsoleteLayoutParam" />
                    </RelativeLayout>
</android.support.constraint.ConstraintLayout>

1 respuesta 1

3

Si estas usando un estilo nativo :

no se podría realizar esto, incluso debes contemplar que tu ProgressBar puede verse diferente en los diversos sistemas operativos.

La opción sería crear un estilo personalizado:

<?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="9" android:useLevel="false">    
        <size android:width="76dip" android:height="76dip" />
        <gradient android:type="sweep" android:useLevel="false"
            android:startColor="#001100" 
            android:endColor="#00FF00"
            android:angle="0"/>
    </shape>
</rotate> 

Cambiar color ProgressBar

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.