Forum > Android

Android design

(1/2) > >>

huberte:
started a new thread....


--- Quote from: felipemdc on April 25, 2012, 08:22:19 am ---
--- Quote from: huberte on April 25, 2012, 02:08:30 am ---To look like ICS button : http://developer.android.com/design/downloads/index.html I did try with image, but it's not so good
--- End quote ---

The best would be to create a new drawer for Android 4, my drawer is based in Android 2. Look at the file lazarus/lcl/customdrawn_android.pas and you need to write a similar file which implements Android 4 style instead of the current Android 2.

--- End quote ---

I will look at this complex file when I got time, seems complicated, no ?
Thing is, I end with a non android 2 design (gray button, grey bckground color, green button when pushed though) when I launch LCL Test on my android. How do we get this design running ?

Thks

EDIT :

Here you can see (despite the new customdrawnproc.pas and latest svn lazarus), that the background color (set to black) is not being shown. Moreover, it seems that the new LCL buil in Lazarus has some pb whith the screen. When you rotate your phone,  buttons are visible though

http://tof.canardpc.com/view/ac1bfff2-0d01-40e3-91ec-3b0913ee4107.jpg

felipemdc:

--- Quote from: huberte on April 28, 2012, 10:07:45 pm ---Thing is, I end with a non android 2 design (gray button, grey bckground color, green button when pushed though) when I launch LCL Test on my android. How do we get this design running ?
--- End quote ---

Android has many multiple looks, it changes not only with the Android version but also some manufacturers change the look =/

Having said that my current Android look does immitate well the Android look for many components.

Yes, you are right about the background, it should probably be changed to black, but I haven't done so yet because then it causes problems with the text drawing, because black text does not show in a black background and also small errors which we have in the font rendering become much more apparent.

But the native standard (non-manufacturer modified) Android 2 button is grey when up and green when pushed down, please see: http://www.androidpeople.com/wp-content/uploads/2010/01/buttondrawable.png See also HTC Wildfire for an example.


--- Quote ---Here you can see (despite the new customdrawnproc.pas and latest svn lazarus), that the background color (set to black) is not being shown. Moreover, it seems that the new LCL buil in Lazarus has some pb whith the screen. When you rotate your phone,  buttons are visible though

http://tof.canardpc.com/view/ac1bfff2-0d01-40e3-91ec-3b0913ee4107.jpg

--- End quote ---

Are you 100% sure that you are using Lazarus SVN? If you open in Lazarus the menu Tools->Options what is your Lazarus directory? Is it the Lazarus SVN directory?

Also does it work for you in the desktop? You can use the lazarus/examples/androidtest/nonandroidtest.lpi to check how it works with LCL-CustomDrawn in the Desktop.

About the layout, it seams wrong, kind of like if the measurement of the screensize is wrong.

Which device are you using?

huberte:

--- Quote ---Yes, you are right about the background, it should probably be changed to black,
--- End quote ---

You wrote :


--- Quote from: felipemdc on April 24, 2012, 03:44:06 pm ---
--- Quote from: huberte on April 24, 2012, 03:34:43 pm ---I did set a color for a form (black) but it's still gray in android.
--- End quote ---

I fixed it in this commit: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=37010
--- End quote ---

that's why I tried :) Bbut ok, no pb I'll wait....


--- Quote ---Are you 100% sure that you are using Lazarus SVN? If you open in Lazarus the menu Tools->Options what is your Lazarus directory? Is it the Lazarus SVN directory?
--- End quote ---

Yep, c:\Lazarus, which is the folder I'm using with tortoise. Moreover, it worked two days ago before I get an update from svn.


--- Quote ---Also does it work for you in the desktop? You can use the lazarus/examples/androidtest/nonandroidtest.lpi to check how it works with LCL-CustomDrawn in the Desktop.
--- End quote ---

Not anymore, could you give it a try, it worked 2 days ago. Compiling is fine, with running I end with :

http://tof.canardpc.com/view/d3e40602-032c-4ee6-9de8-27c6d4813791.jpg

and

http://tof.canardpc.com/view/7cd5665c-95f9-4a77-8dfd-e4ad12560019.jpg

About the layout, I think it's because of the previous error, it was fine 2 days ago.

felipemdc:
Could you find the revision that broke it? In TortoiseSVN there is "update to revision" and there you can put a revision number which you can see here:

http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=37083

You can successively try revision. For example try 36000 and 37000. If it works in 37000 but not in 36000 then the error is somewhere in between .... so try 36500, and so on. You can find the error after some tries.

huberte:
This error is not android related, but windows related (strangely, only with the example androidlcl, whi i did not modify)

the screen is now fine when rolling back lazarus to a prior version (the LCLxxxx seems to be a pb)

So you can confirm, it's not possible to have a bckground color, button color or font color ?

thks

Navigation

[0] Message Index

[#] Next page

Go to full version