Comments (2)
Having the same exact issue when using a VactorDrawable :(.
from fab-loading.
For now, my fix has been this. In the VectorDrawable's XML, I encapsulate the <path>
tag with:
<group
android:pivotX="50"
android:pivotY="50"
android:scaleX="0.3"
android:scaleY="0.3">
Where pivotX/pivotY is half of the viewportWidth/viewportHeight of the vector (to center) and scaleX/scaleY is how much to scale the image by, change this until image fits as intended.
End result example:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportHeight="100.0"
android:viewportWidth="100.0">
<group
android:pivotX="50"
android:pivotY="50"
android:scaleX="0.3"
android:scaleY="0.3">
<path
android:fillColor="#FFFFFF"
android:pathData="M50,40c-8.28,0 -15,6.72 -15,15c0,8.28 6.72,15 15,15c8.28,0 15,-6.72 15,-15C65,46.72 58.28,40 50,40zM90,25H78c-1.65,0 -3.43,-1.28 -3.95,-2.85l-3.1,-9.31C70.43,11.28 68.65,10 67,10H33c-1.65,0 -3.43,1.28 -3.95,2.85l-3.1,9.31C25.43,23.72 23.65,25 22,25H10C4.5,25 0,29.5 0,35v45c0,5.5 4.5,10 10,10h80c5.5,0 10,-4.5 10,-10V35C100,29.5 95.5,25 90,25zM50,80c-13.81,0 -25,-11.19 -25,-25c0,-13.81 11.19,-25 25,-25c13.81,0 25,11.19 25,25C75,68.81 63.81,80 50,80zM86.5,41.99c-1.93,0 -3.5,-1.57 -3.5,-3.5c0,-1.93 1.57,-3.5 3.5,-3.5c1.93,0 3.5,1.57 3.5,3.5C90,40.43 88.43,41.99 86.5,41.99z"/>
</group>
</vector>
from fab-loading.
Related Issues (10)
- compile 'io.saeid:fab-loading:0.6.0' not valid adress HOT 2
- it is square on api 19 and below HOT 2
- Fab loading animation isn't shown on lower api's such as 19 HOT 7
- Is it possible to use the same image for both lollipop and pre lollipop versionns of android? HOT 1
- Animation Not Smooth HOT 4
- May I know how I can set the animation to loop infinitely HOT 1
- build error HOT 1
- Getting error
- inconvertible type : View to LoadingView
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fab-loading.