WaveLoading
WaveLoading copied to clipboard
Layout - XML
How can i use this library, but setting all the configuration from xml... I.e: Something like this
<WaveDrawable
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dip"
app:setIndeterminate="true"
app:level="40"
app:WaveAmplitude="65"
app:WaveLength="40"
app:WaveeSpeed="60" />
How can i use this library, but setting all the configuration from xml... I.e: Something like this
<WaveDrawable android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="8dip" app:setIndeterminate="true" app:level="40" app:WaveAmplitude="65" app:WaveLength="40" app:WaveeSpeed="60" />
this is not an object , you need to have a image view with a image to load the library
as
ImageView imageView = v.findViewById(R.id.battery); // an image wth battry image
Drawable mWaveDrawable = new WaveDrawable(imageView.getDrawable());
((WaveDrawable) mWaveDrawable).setIndeterminate(true);
imageView.setImageDrawable(mWaveDrawable);