After Lottie ProgressBar Circular

0

I created a circular ProgressBar bar in the "After" and I used "Lottie" to create the XML to run in "Android Studio" so far so good.  But I'm not able to populate the created bar in After, through a SeeckBar. What I need is to write the value in the "android: trimPathStart=" 0.19 "", of the XML generated by Lottie.  I would love someone to help me and I've been trying to do this for a long time, I'll post my files here.

.MainActivity.

publicclassMainActivityextendsAppCompatActivity{

//LottieAnimationViewlottieAnimationView;ImageViewimageView;Buttonbutton;privatestaticStringresponse;privateSeekBarseekBar;privateTextViewtextView;intprogress;//=60;@SuppressLint("WrongViewCast")
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);



    imageView = (ImageView) findViewById(R.id.imageView);
    textView = (TextView) findViewById(R.id.text1);
    seekBar = (SeekBar) findViewById(R.id.seek1);
    seekBar.setMax(230);



    seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @SuppressLint("Range")
        @Override
        public void onProgressChanged(SeekBar seekBar, int progressValue, boolean fromuser) {
            progress = progressValue;

            ImageView imv = (ImageView) findViewById(R.id.imageView);
            imv.trimPathStart(progressValue);

            textView.setText("Status: " + progressValue + "/" + seekBar.getMax());

        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {

        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {

        }
    });
}

}

ProgressBar XML

<?xml version="1.0" encoding="utf-8"?>

    <aapt:attr name="android:drawable">
        <vector
            android:height="220dp"
            android:width="220dp"
            android:viewportHeight="220"
            android:viewportWidth="220">

            <group android:name="_R_G">
            <group
                android:name="_R_G_L_1_G"
                android:translateX="110"
                android:translateY="110">

                    <path
                        android:name="_R_G_L_1_G_D_0_P_0"
                        android:strokeColor="#a1a"
                        android:strokeLineCap="round"
                        android:strokeLineJoin="round"
                        android:strokeWidth="23"
                        android:strokeAlpha="1"
                        android:pathData=" M0 -90.5 C49.95,-90.5 90.5,-49.95 90.5,0 C90.5,49.95 49.95,90.5 0,90.5 C-49.95,90.5 -90.5,49.95 -90.5,0 C-90.5,-49.95 -49.95,-90.5 0,-90.5c "/>
                </group>

                <group
                    android:name="_R_G_L_0_G"
                    android:translateX="110"
                    android:translateY="110">

                    <!-- _R_G_L_0_G_D_0_P_0 -->
                    <path
                        android:name="imageView"
                        android:strokeColor="#1420c1"
                        android:strokeLineCap="round"
                        android:strokeLineJoin="round"
                        android:strokeWidth="19"
                        android:strokeAlpha="1"
                        android:trimPathStart="0.19"
                        android:trimPathOffset="0"
                        android:trimPathEnd="1"
                        android:pathData=" M0 -91 C50.22,-91 91,-50.22 91,0 C91,50.22 50.22,91 0,91 C-50.22,91 -91,50.22 -91,0 C-91,-50.22 -50.22,-91 0,-91c "/>
                </group> <!-- trimPathStart mudar val gauge android:trimPathStart="0.19" -->

            </group>
            <group android:name="time_group"/>
        </vector>
    </aapt:attr>
    <target android:name="time_group">
        <aapt:attr name="android:animation">
            <set android:ordering="together">
                <objectAnimator
                    android:propertyName="translateX"
                    android:startOffset="0"
                    android:valueFrom="0"
                    android:valueTo="1"
                    android:valueType="floatType"/>
            </set>
            <!--  android:duration="500" -->
        </aapt:attr>
    </target>

Thank you all.

    
asked by anonymous 02.05.2018 / 15:58

0 answers