rnso
rnso

Reputation: 24545

Rebol for android showing very small gui

I tried to make an app for android mobile using following steps:

  1. Download and install r3-droid.apk from http://development.saphirion.com/experimental/r3-droid.apk

  2. Download r3-gui.r3

  3. Create simple code file:

REBOL [title: "Widgets on Screen"] do %r3-gui.r3 view [ field area check radio text-list text-table drop-down button ]

  1. Run above file.

The code runs but I am getting gui elements and entire window to be very small. I tried following code:

gui-metric/set 'unit-size dpi / 128

But I get error message:

script error: dpi has no value.

I also tried load-gui instead of do %r3-gui.r3 but still the gui is very small.

Where is the problem and how can this be solved? Also, is this the best way to use rebol or its derivatives for android app creation or is there a better method?

Upvotes: 0

Views: 337

Answers (1)

GordR
GordR

Reputation: 91

Define 1.) layout, 2.) init-size, and 3.) unit-size (gui-metric 'screen-dpi) then 4.) call to view. Ex:

1 DB_HomeV: layout [
   Buttons, fields, etc.
   ]
2 DB_HomeV/facets/init-size: 246x408
3 gui-metric/set 'unit-size (gui-metric 'screen-dpi) / 112

4 view/options DB_HomeV [max-hint: round/floor (gui-metric 'work-size) - gui-metric 'title-size]

(Note that the max Android screen width is 246 and max Android screen height is 408 when the 'unit-size (gui-metric 'screen-dpi)' is set to "112" as above.)

Upvotes: 0

Related Questions