0

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?

rnso
  • 23,686
  • 25
  • 112
  • 234
  • Be forewarned, that code is years old, not maintained, and they never open-sourced the build process to make the APK. We couldn't fix bugs in it if we wanted to (and I definitely don't want to). Use at your own risk...for entertainment purposes only...etc. While Red's Android release date isn't known for sure, you're almost certainly better off waiting for that...or even learning how to work with their experimental branch in whatever state it's in. – HostileFork says dont trust SE Oct 23 '17 at 23:07
  • 1
    Possible duplicate of [Rebol GUI on Android Displays Too Small](https://stackoverflow.com/questions/32378994/rebol-gui-on-android-displays-too-small) – sqlab Oct 24 '17 at 06:55

1 Answers1

0

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.)

GordR
  • 91
  • 8