mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
* fix(android/application): org.nativescript.widgets.Utils::getDrawable * chore: fix spacing * fix(android/application): do not load empty path Co-authored-by: Igor Randjelovic <rigor789@gmail.com> * test: Add tests for empty image sources * chore: add a few more test cases These make the app crash without the fix in place Co-authored-by: Igor Randjelovic <rigor789@gmail.com> Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
60 lines
2.5 KiB
XML
60 lines
2.5 KiB
XML
<Page>
|
|
<GridLayout rows="*,*,*,*,*,*,*,*,*,*,*,*,*" >
|
|
<Button backgroundImage="url('~/resources/images/no-image.png')"
|
|
borderRadius='125' borderWidth='2' borderColor='black'
|
|
backgroundRepeat="repeat" backgroundSize="contain"
|
|
/>
|
|
<Button row="1" backgroundImage="url('~/resources/images/no-image.png')"
|
|
borderRadius='5' borderWidth='2' borderColor='black'
|
|
backgroundRepeat="repeat-y"
|
|
/>
|
|
<Button row="2" backgroundImage="url('~/resources/images/no-image.png')"
|
|
borderRadius='25' borderWidth='2' borderColor='black'
|
|
backgroundRepeat="repeat-x"
|
|
/>
|
|
<Button row="3" backgroundImage="url('res://icon')"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
backgroundRepeat="no-repeat"
|
|
backgroundSize="contain"
|
|
height="80" width="180"
|
|
/>
|
|
<Button row="4" text="css background no-repeat" class="testBtn"/>
|
|
<Button row="5" backgroundImage="url('res://icon')"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
style="background-repeat: no-repeat"
|
|
backgroundSize="contain"
|
|
height="80" width="180"
|
|
/>
|
|
|
|
<!-- Test some invalid cases - these should not crash -->
|
|
<Button row="6" backgroundImage="url('res://theneverfoundunicorn.png')"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
height="80" width="180"
|
|
/>
|
|
<Button row="7" backgroundImage="url('res://')"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
height="80" width="180"
|
|
/>
|
|
<Button row="8" backgroundImage="url('')"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
height="80" width="180"
|
|
/>
|
|
<Button row="9" backgroundImage="res://theneverfoundunicorn.png"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
height="80" width="180"
|
|
/>
|
|
<Button row="10" backgroundImage="res://"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
height="80" width="180"
|
|
/>
|
|
<Button row="11" backgroundImage=" "
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
height="80" width="180"
|
|
/>
|
|
<Button row="12" backgroundImage="bad"
|
|
borderRadius='10' borderWidth='2' borderColor='black'
|
|
height="80" width="180"
|
|
/>
|
|
</GridLayout>
|
|
</Page>
|