mirror of
https://github.com/NiciDieNase/chaosflix
synced 2025-02-28 13:17:09 +00:00
add custom loading-spinner
This commit is contained in:
parent
db4538129d
commit
e979c06000
4 changed files with 42 additions and 19 deletions
13
logo.svg
13
logo.svg
|
@ -27,16 +27,16 @@
|
|||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.979899"
|
||||
inkscape:cx="357.42213"
|
||||
inkscape:cy="354.99385"
|
||||
inkscape:zoom="0.9899495"
|
||||
inkscape:cx="393.55172"
|
||||
inkscape:cy="3.6297467"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="mm"
|
||||
inkscape:window-width="1916"
|
||||
inkscape:window-height="1040"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:window-maximized="0" />
|
||||
<defs
|
||||
|
@ -392,5 +392,10 @@
|
|||
inkscape:export-filename="/home/felix/projects/chaosflix/amazon_icons/toolbar_icon.png"
|
||||
inkscape:export-xdpi="32.23"
|
||||
inkscape:export-ydpi="32.23" />
|
||||
<path
|
||||
style="opacity:1;fill:#c1c1c1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.10644536;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 42.970601,301.3184 a 25.886282,25.886282 0 0 0 -25.29148,26.0072 25.886282,25.886282 0 0 0 25.546245,25.75657 25.886282,25.886282 0 0 0 26.213387,-25.07754 25.886282,25.886282 0 0 0 -24.600566,-26.66142 z m 0.593763,6.97581 v 5.1e-4 c 10.443691,0 18.910924,8.46678 18.912022,18.91203 a 18.91117,18.91117 0 0 1 -9.312093,16.26774 25.671369,25.671369 0 0 0 0.196371,-3.10059 c 0,-2.51838 -0.36568,-5.001 -1.06867,-7.24504 a 10.286325,10.286325 0 0 0 2.314588,-0.94671 c 1.084686,-0.61179 2.089285,-1.46362 2.587956,-2.60449 0.387852,-0.88884 0.44237,-1.88497 0.468188,-2.85461 0.03078,-1.11087 0.03323,-2.22174 -0.02687,-3.33106 -0.01721,-0.31746 -0.0405,-0.63505 -0.104386,-0.94671 -0.06425,-0.31168 -0.171421,-0.61739 -0.347266,-0.88212 -0.309361,-0.46596 -0.827743,-0.78323 -1.381829,-0.86403 a 1.9138959,1.9138959 0 0 0 -0.773594,0.0424 1.6129979,1.6129979 0 0 0 -0.677994,0.36948 c -0.287057,0.26742 -0.458552,0.64137 -0.546222,1.02423 -0.12968,0.56562 -0.0893,1.15374 -0.03927,1.73168 0.07308,0.89038 0.171035,1.78773 0.07287,2.6758 -0.03848,0.34822 -0.107457,0.69856 -0.280603,1.00252 a 1.8277054,1.8277054 0 0 1 -0.579292,0.60927 2.4075687,2.4075687 0 0 1 -0.778764,0.33021 2.8527592,2.8527592 0 0 1 -1.529107,-0.0625 c -0.437507,-0.147 -0.950619,-0.49077 -1.309997,-0.89556 0.04765,-0.072 0.104137,-0.13825 0.150379,-0.21135 a 7.0818766,7.0818766 0 0 0 1.026292,-3.17759 c 0.0858,-1.13242 -0.094,-2.26519 -0.168981,-3.39876 -0.05383,-0.78958 -0.05763,-1.5829 -0.103871,-2.37401 -0.05387,-0.91385 -0.165414,-1.82965 -0.421679,-2.70888 -0.09312,-0.31897 -0.20724,-0.63546 -0.388088,-0.91364 a 2.0454907,2.0454907 0 0 0 -0.866617,-0.75396 1.8496377,1.8496377 0 0 0 -1.137914,-0.12712 c -0.322837,0.0685 -0.620988,0.22832 -0.882632,0.42994 -0.261268,0.20125 -0.487574,0.44445 -0.700733,0.69609 a 10.628779,10.628779 0 0 0 -1.514636,2.35748 5.2091523,5.2091523 0 0 0 -1.593184,0 10.64494,10.64494 0 0 0 -1.513604,-2.35748 c -0.213551,-0.25164 -0.439087,-0.4942 -0.700733,-0.69505 -0.261266,-0.20201 -0.559671,-0.36168 -0.882116,-0.43098 -0.385548,-0.0647 -0.732186,-0.0306 -1.131197,0.12712 a 2.043182,2.043182 0 0 0 -0.867129,0.75138 c -0.180851,0.27897 -0.294516,0.59761 -0.387575,0.91622 -0.256656,0.87921 -0.368366,1.79479 -0.422196,2.70939 -0.04624,0.79074 -0.04952,1.58162 -0.103354,2.37195 -0.07505,1.13319 -0.25364,2.26751 -0.167431,3.40031 0.08466,1.1201 0.433451,2.22113 1.02371,3.17655 0.03852,0.0546 0.0845,0.11944 0.130741,0.18294 -1.603002,0.74109 -3.037501,1.86044 -4.135665,3.24373 -0.665673,0.8392 -1.219454,1.79158 -1.454173,2.83703 -0.234704,1.04544 -0.12685,2.19366 0.443383,3.10059 0.320535,0.50906 0.772173,0.90915 1.26969,1.2516 -0.07891,0.80804 -0.120607,1.62446 -0.123507,2.44326 a 25.714849,25.714849 0 0 0 0.188103,3.07836 18.911939,18.911939 0 0 1 -5.279782,-4.6395 c -0.0099,-0.11466 -0.02582,-0.22847 -0.03462,-0.34313 -0.06735,-1.23128 0.07464,-2.49125 0.567925,-3.62097 0.604102,-1.3829 1.701533,-2.50711 2.282548,-3.90002 0.323932,-0.77725 0.478242,-1.63131 0.400491,-2.47014 -0.07696,-0.83881 -0.391472,-1.66173 -0.927073,-2.312 -0.43211,-0.52331 -1.014555,-0.93612 -1.674834,-1.09657 a 2.562635,2.562635 0 0 0 -0.504362,-0.0693 c -0.510995,-0.0192 -1.028228,0.11716 -1.437639,0.41961 -0.45943,0.33936 -0.7641,0.87408 -0.844909,1.43971 -0.08042,0.56485 0.06168,1.15521 0.371036,1.63504 0.121596,0.18893 0.268056,0.36022 0.401526,0.54106 0.133135,0.18007 0.256077,0.37388 0.321427,0.58859 0.114741,0.37748 0.04568,0.78993 -0.104386,1.15548 -0.149677,0.36438 -0.374333,0.69234 -0.578259,1.03095 -0.400557,0.6649 -0.718253,1.37327 -0.995288,2.09858 a 18.911939,18.911939 0 0 1 -1.235584,-6.70295 c 0,-10.44485 8.466765,-18.91202 18.910475,-18.91202 z m -5.289085,23.31227 11.322307,6.13296 -11.322307,6.13915 v -5.44256 a 2.5357005,2.5357005 0 0 0 1.149284,-0.17828 2.4021819,2.4021819 0 0 0 0.927592,-0.66818 2.177855,2.177855 0 0 0 0.483693,-1.03249 c 0.07311,-0.42594 0.008,-0.87167 -0.168984,-1.26607 a 2.5349309,2.5349309 0 0 0 -0.811318,-0.99271 2.7423274,2.7423274 0 0 0 -1.580267,-0.52865 z"
|
||||
id="path4485-1-3-3-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before (image error) Size: 134 KiB After (image error) Size: 138 KiB |
|
@ -0,0 +1,17 @@
|
|||
package de.nicidienase.chaosflix.touch
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.animation.*
|
||||
import android.widget.ImageView
|
||||
|
||||
class ChaosflixLoadingSpinner(context: Context, attributeSet: AttributeSet): ImageView(context,attributeSet){
|
||||
init {
|
||||
val anim = RotateAnimation(360.0f, 0.0f,
|
||||
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f)
|
||||
anim.interpolator = AnticipateInterpolator()
|
||||
anim.duration = 1000
|
||||
anim.repeatCount = Animation.INFINITE
|
||||
animation = anim
|
||||
}
|
||||
}
|
BIN
touch/src/main/res/drawable/loading_icon.png
Normal file
BIN
touch/src/main/res/drawable/loading_icon.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 16 KiB |
|
@ -1,19 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/loading_overlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black_trans80"
|
||||
tools:showIn="@layout/fragment_tab_pager_layout">
|
||||
<FrameLayout
|
||||
android:id="@+id/loading_overlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black_trans80"
|
||||
tools:showIn="@layout/fragment_tab_pager_layout">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"/>
|
||||
</FrameLayout>
|
||||
<de.nicidienase.chaosflix.touch.ChaosflixLoadingSpinner
|
||||
android:id="@+id/loading_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/loading_icon"/>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
|
|
Loading…
Add table
Reference in a new issue