Recent

Author Topic: LAMW : Is there a way to use xml shape in jImageView?  (Read 3215 times)

MFP

  • Newbie
  • Posts: 4
LAMW : Is there a way to use xml shape in jImageView?
« on: November 23, 2021, 08:08:57 am »
hi,

Is there a way to use xml shape in jImageView?

For example something like this xml file :
Code: Pascal  [Select][+][-]
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <shape xmlns:android="http://schemas.android.com/apk/res/android" >
  3.          
  4.         <!-- Green & Blue -->
  5.         <gradient
  6.             android:startColor="#ff227777"
  7.             android:centerColor="#ff00ffff"
  8.             android:endColor="#ff227777"
  9.             android:angle="135"
  10.             />
  11.        
  12. </shape>

Or other examples,
 
how to show this xml file in jImageview or jDrawingView or ...?

Thanks

jmpessoa

  • Hero Member
  • *****
  • Posts: 2053
Re: LAMW : Is there a way to use xml shape in jImageView?
« Reply #1 on: November 28, 2021, 08:38:42 pm »

Hi, MFP!

Can you, please, point up some android/java example?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2053
Re: LAMW : Is there a way to use xml shape in jImageView?
« Reply #2 on: November 29, 2021, 08:29:29 am »

Done!

New demo "AppApplyDrawableXMLDemo1"

added method "ApplyDrawableXML"  to components:
jTextView, jEditText, jImageView, jButton     (others coming soon!)

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

MFP

  • Newbie
  • Posts: 4
Re: LAMW : Is there a way to use xml shape in jImageView?
« Reply #3 on: November 29, 2021, 03:56:02 pm »
Exactly what i needed and works great!

Thank you very much!

 

TinyPortal © 2005-2018