Android xml shapes different from API 16 to API 23 -


i create drawable object (without blue borders):
api 23
enter image description here

for api 23 correct.

but for: api 22
enter image description here
, api 16
enter image description here

are not correct.

drawable code:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >      <item         android:height="100dp"         android:width="100dp"         android:gravity="center">          <rotate xmlns:android="http://schemas.android.com/apk/res/android"                 android:fromdegrees="90"                 android:todegrees="90">             <shape                 android:shape="line">                 <stroke                     android:width="1dp"                     android:color="#000" />             </shape>         </rotate>     </item>      <item         android:height="100dp"         android:width="100dp"         android:gravity="center">             <shape                 android:shape="line">                 <stroke                     android:width="1dp"                     android:color="#000" />             </shape>     </item>      <item         android:height="75dp"         android:width="75dp"         android:gravity="center">         <shape             android:shape="oval">             <stroke                 android:width="1dp"                 android:color="#000"/>         </shape>     </item>      <item         android:height="50dp"         android:width="50dp"         android:gravity="center">         <shape             android:shape="oval" >              <stroke                 android:width="1dp"                 android:color="#000"/>         </shape>     </item>  </layer-list> 

i have drawable object same these apis. can me please? thank much.

this not possible api lower 21 (it material design feature included on android 5.0):


create vector drawables

in android 5.0 (api level 21) , above, can define vector drawables, scale without losing definition. need 1 asset file vector image, opposed asset file each screen density in case of bitmap images. create vector image, define details of shape inside <vector> xml element

http://developer.android.com/training/material/drawables.html


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -