Skip to content

Commit 8fea660

Browse files
authored
Removed unused images from the developer guide (#4063)
Also unified directories
1 parent 60060aa commit 8fea660

File tree

765 files changed

+573
-573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

765 files changed

+573
-573
lines changed

docs/developer-guide/Advanced-Theming.asciidoc

Lines changed: 37 additions & 37 deletions
Large diffs are not rendered by default.

docs/developer-guide/Advanced-Topics-Under-The-Hood.asciidoc

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ These hints are often referred to as "build hints" or "build arguments", they ar
99
You can set these hints by right clicking the project in the IDE and selecting #Codename One# -> #Codename One Settings# -> #Build Hints#. The hints use the `key=value` style of data.
1010

1111
.The build hints UI in Codename One Settings
12-
image::img/developer-guide/build-hints-codenameone-settings.png[The build hints UI in Codename One Settings,scaledwidth=50%]
12+
image::img/build-hints-codenameone-settings.png[The build hints UI in Codename One Settings,scaledwidth=50%]
1313

1414
You can set the build hints in the `codenameone_settings.properties` file directly notice that when you do that all settings need to start with the `codename1.arg.` prefix. When editing the properties file directly we would need to define something like `android.debug=true` as `codename1.arg.android.debug=true`.
1515

@@ -545,30 +545,30 @@ f.show();
545545
If you explicitly lower the target SDK (e.g. `android.targetSDKVersion=21`) and install this app on an Android 6 device you will still see the legacy install prompt with all permissions listed up front:
546546

547547
.Install UI when using the old permissions system
548-
image::img/developer-guide/marshmallow-permissions-level21.png[Install UI when using the old permissions system,scaledwidth=20%]
548+
image::img/marshmallow-permissions-level21.png[Install UI when using the old permissions system,scaledwidth=20%]
549549

550550
When you keep the default target (API 33+) the installer defers to the runtime permission flow and the install UI looks like this instead:
551551

552552
.Install UI when using the new permissions system
553-
image::img/developer-guide/marshmallow-permissions-level23.png[Install UI when using the new permissions system,scaledwidth=20%]
553+
image::img/marshmallow-permissions-level23.png[Install UI when using the new permissions system,scaledwidth=20%]
554554

555555
When we launch the UI under the old permissions system we see the contacts instantly. In the new system we are presented with this UI:
556556

557557
.Native permission prompt first time
558-
image::img/developer-guide/marshmallow-permissions-first-request.png[Native permission prompt first time,scaledwidth=20%]
558+
image::img/marshmallow-permissions-first-request.png[Native permission prompt first time,scaledwidth=20%]
559559

560560
If we accept and allow all is good and the app loads as usual but if we deny then Codename One gives the user another chance to request the permission. Notice that in this case you can customize the prompt string as explained below.
561561

562562
.Codename One permission prompt
563-
image::img/developer-guide/marshmallow-permissions-codenameone-prompt.png[Codename One permission prompt,scaledwidth=20%]
563+
image::img/marshmallow-permissions-codenameone-prompt.png[Codename One permission prompt,scaledwidth=20%]
564564

565565
If we select don't ask then you will get a blank screen since the contacts will return as a 0 length array. This makes
566566
sense as the user is aware he denied permission and the app will still function as expected on a device where
567567
no contacts are available. However, if the user realizes his mistake he can double back and ask to re-prompt for
568568
permission in which case he will see this native prompt:
569569

570570
.Native permission prompt second time
571-
image::img/developer-guide/marshmallow-permissions-second-request.png[Native permission prompt second time,scaledwidth=20%]
571+
image::img/marshmallow-permissions-second-request.png[Native permission prompt second time,scaledwidth=20%]
572572

573573
Notice that denying this second request will not trigger another Codename One prompt.
574574

@@ -600,7 +600,7 @@ The following permission keys are supported: "android.permission.READ_PHONE_STAT
600600
You can simulate permission prompts by checking that option in the simulator menu.
601601

602602
.Simulate permission prompts menu item in the simulator
603-
image::img/developer-guide/simulate-permission-prompts.png[Simulate permission prompts menu item in the simulator,scaledwidth=10%]
603+
image::img/simulate-permission-prompts.png[Simulate permission prompts menu item in the simulator,scaledwidth=10%]
604604

605605
This will produce a dialog to the user whenever this happens in Android and will try to act in a similar way to the device. Notice that you can test it in the iOS simulator too.
606606

@@ -640,7 +640,7 @@ With Android Studio this is sometimes as very easy task as it is possible to act
640640
By default you should be able to open the gradle project in Android Studio and just run it. To get this to work open the Android Studio #Setting# and select gradle *2.11*.
641641

642642
.Gradle settings UI in Android Studio (notice you need gradle 2.11 and not 2.8 as pictured here)
643-
image::img/developer-guide/gradle-settings.png[Gradle settings UI in Android Studio,scaledwidth=50%]
643+
image::img/gradle-settings.png[Gradle settings UI in Android Studio,scaledwidth=50%]
644644

645645
If this works for you then you can ignore the section below.
646646

@@ -702,22 +702,22 @@ public interface MyNative extends NativeInterface {
702702
We now need to right click the class in the IDE and select the #Generate Native Access# menu item:
703703

704704
.Generating the native code
705-
image::img/developer-guide/native-interfaces-generate-menu.png[Generating the native code,scaledwidth=20%]
705+
image::img/native-interfaces-generate-menu.png[Generating the native code,scaledwidth=20%]
706706

707707
.Once generated we are prompted that the native code is in the "native" directory
708-
image::img/developer-guide/native-interfaces-generated.png[Once generated we are prompted that the native code is in the "native" directory,scaledwidth=40%]
708+
image::img/native-interfaces-generated.png[Once generated we are prompted that the native code is in the "native" directory,scaledwidth=40%]
709709

710710
We can now look int the #native# directory in the project root (in NetBeans you can see that in the #Files# tab) and you can see something that looks like this:
711711

712712
.Native directory structure containing stubs for the various platforms
713-
image::img/developer-guide/native-interfaces-native-hierarchy.png[Native directory structure containing stubs for the various platforms,scaledwidth=30%]
713+
image::img/native-interfaces-native-hierarchy.png[Native directory structure containing stubs for the various platforms,scaledwidth=30%]
714714

715715
These are effectively stubs you can edit to implement the methods in native code.
716716

717717
TIP: If you re-run the #Generate Native Access# tool you will get this dialog, if you answer yes all the files will be overwritten, if you answer no only files you deleted/renamed will be recreated
718718

719719
.Running "Generate Native Access" when some/all of the native files exist already
720-
image::img/developer-guide/native-interfaces-generated-existing.png[Running "Generate Native Access" when some/all of the native files exist already,scaledwidth=40%]
720+
image::img/native-interfaces-generated-existing.png[Running "Generate Native Access" when some/all of the native files exist already,scaledwidth=40%]
721721

722722
For now lets leave the stubs and come back to them soon. From the Codename One Java code we can call the implementation of this native interface using:
723723

@@ -1686,7 +1686,7 @@ Support for JAR files in Codename One has been a source of confusion so its prob
16861686
The first source of confusion is changing the classpath. You should NEVER change the classpath or add an external JAR via the IDE classpath UI. The reasoning here is very simple, these IDE's don't package the JAR's into the final executable and even if they did these JAR's would probably use features unavailable or inappropriate for the device (e.g. `java.io.File` etc.).
16871687

16881688
.Don't change the classpath, this is how it should look for a typical Java 8 Codename One application
1689-
image::img/developer-guide/cn1libs-dont-change-classpath.png[Don't change the classpath, this is how it should look for a typical Java 8 Codename One application,scaledwidth=40%]
1689+
image::img/cn1libs-dont-change-classpath.png[Don't change the classpath, this is how it should look for a typical Java 8 Codename One application,scaledwidth=40%]
16901690

16911691
Cn1libs are Codename One's file format for 3rd party extensions. It's physicially a zip file containing other zip files and some meta-data.
16921692

@@ -1711,7 +1711,7 @@ Cn1lib’s address the modularity aspect allowing you to break that down. Existi
17111711
Codename One has a large repository of https://www.codenameone.com/cn1libs.html[3rd party cn1libs], you can install a cn1lib by placing it in the lib directory of your project then right clicking the project and selecting #Codename One# -> #Refresh cn1lib files#.
17121712

17131713
.Refresh cn1lib files menu option
1714-
image::img/developer-guide/cn1libs-refresh.png[Refresh cn1lib files menu option,scaledwidth=40%]
1714+
image::img/cn1libs-refresh.png[Refresh cn1lib files menu option,scaledwidth=40%]
17151715

17161716
Once refreshed the content of the cn1lib will be available to code completion and you could just use it.
17171717

@@ -1731,10 +1731,10 @@ The native files are extracted to `lib/impl/native`. The classpath for the main
17311731
Creating a cn1lib is trivial, we will get into more elaborate uses soon enough but for a hello world cn1lib we can just use this 2 step process:
17321732

17331733
.Select the CodenameOne Library Option
1734-
image::img/developer-guide/cn1lib-create-step1.png[Select the CodenameOne Library Option,scaledwidth=30%]
1734+
image::img/cn1lib-create-step1.png[Select the CodenameOne Library Option,scaledwidth=30%]
17351735

17361736
.Select the file name/destination. Notice that a Java 8 cn1lib requires Java 8 support in the parent project!
1737-
image::img/developer-guide/cn1lib-create-step2.png[Select the file name/destination. Notice that a Java 8 cn1lib requires Java 8 support in the parent project!,scaledwidth=30%]
1737+
image::img/cn1lib-create-step2.png[Select the file name/destination. Notice that a Java 8 cn1lib requires Java 8 support in the parent project!,scaledwidth=30%]
17381738

17391739
Once we go thru these steps we can define any source file within the library and it will be accessible to the users of the library.
17401740

@@ -1964,7 +1964,7 @@ hi.show();
19641964
----
19651965

19661966
.Drag and drop demo
1967-
image::img/developer-guide/draganddrop-rearrange-game.png[Drag and drop demo,scaledwidth=20%]
1967+
image::img/draganddrop-rearrange-game.png[Drag and drop demo,scaledwidth=20%]
19681968

19691969

19701970
To enable dragging a component it must be flagged as draggable using `setDraggable(true)`, to allow dropping the component onto another component you must first enable the drop target with `setDropTarget(true)` and override some methods (more on that later).
@@ -2178,13 +2178,13 @@ The following diagram shows the dependencies in a native library:
21782178

21792179
[[fc8a77d2-61e0-11e5-9ecf-bf381d4ac966]]
21802180
.Relationship between native & Codename One API UML Diagram
2181-
image::img/developer-guide/fc8a77d2-61e0-11e5-9ecf-bf381d4ac966.png[Relationship between native and Codename One API UML Diagram,scaledwidth=50%]
2181+
image::img/fc8a77d2-61e0-11e5-9ecf-bf381d4ac966.png[Relationship between native and Codename One API UML Diagram,scaledwidth=50%]
21822182

21832183
In the specific case of our FreshDesk API, the public API and classes will look like:
21842184

21852185
[[a5fe88406-61e4-11e5-951e-e09bd28a93c9]]
21862186
.Freshdesk API Integration
2187-
image::img/developer-guide/5fe88406-61e4-11e5-951e-e09bd28a93c9.png[Freshdesk API Integration,scaledwidth=30%]
2187+
image::img/5fe88406-61e4-11e5-951e-e09bd28a93c9.png[Freshdesk API Integration,scaledwidth=30%]
21882188

21892189
===== Things to Notice
21902190

@@ -2692,13 +2692,13 @@ Now that we have set up our public API and our native interface, it is time to w
26922692

26932693
[[c9d4b9cc-61f6-11e5-8b67-4691600188cd]]
26942694
.Generate Native Access Menu Item
2695-
image::img/developer-guide/c9d4b9cc-61f6-11e5-8b67-4691600188cd.png[Generate Native Access Menu Item,scaledwidth=20%]
2695+
image::img/c9d4b9cc-61f6-11e5-8b67-4691600188cd.png[Generate Native Access Menu Item,scaledwidth=20%]
26962696

26972697
This will generate a separate directory for each platform inside your project's `native` directory:
26982698

26992699
[[eef6d078-61f6-11e5-91cd-2e1836916359]]
27002700
.Native generated sources directory view
2701-
image::img/developer-guide/eef6d078-61f6-11e5-91cd-2e1836916359.png[Native generated sources directory view,scaledwidth=15%]
2701+
image::img/eef6d078-61f6-11e5-91cd-2e1836916359.png[Native generated sources directory view,scaledwidth=15%]
27022702

27032703
Inside the `android` directory, this generates a `com/codename1/freshdesk/MobihelpNativeImpl` class with stubs for each method.
27042704

@@ -3074,13 +3074,13 @@ The iOS integration guide for the FreshDesk SDK lists the following core framewo
30743074

30753075
[[IOSlinkoptions]]
30763076
.IOS link options
3077-
image::img/developer-guide/12c5303e-620c-11e5-9dbb-bcb4bebc0c87.png[iOS link options,scaledwidth=35%]
3077+
image::img/12c5303e-620c-11e5-9dbb-bcb4bebc0c87.png[iOS link options,scaledwidth=35%]
30783078

30793079
We can add these dependencies to our project using the `ios.add_libs` build hint. E.g.
30803080

30813081
[[a65e31df8-620c-11e5-87ff-6b926a3f2090]]
30823082
.iOS's "add libs" build hint
3083-
image::img/developer-guide/65e31df8-620c-11e5-87ff-6b926a3f2090.png[iOS's "add libs" build hint,scaledwidth=30%]
3083+
image::img/65e31df8-620c-11e5-87ff-6b926a3f2090.png[iOS's "add libs" build hint,scaledwidth=30%]
30843084

30853085
I.e. we just list the framework names separated by semicolons. Notice that my list in the above image doesn't include all of the frameworks that they list because many of the frameworks are already included by default (I obtained the default list by simply building the project with "include sources" checked, then looked at the frameworks that were included).
30863086

@@ -3168,7 +3168,7 @@ hi.show();
31683168
----
31693169

31703170
.Center layout staircase effect with margin
3171-
image::img/developer-guide/center-layout.png[Center layout staircase effect with margin,scaledwidth=20%]
3171+
image::img/center-layout.png[Center layout staircase effect with margin,scaledwidth=20%]
31723172

31733173
==== Porting a Swing/AWT Layout Manager
31743174

docs/developer-guide/Animations.asciidoc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ There are a couple of things that you should notice about this example:
5858

5959
This results in:
6060

61-
image:img/developer-guide/layout-animation-1.png[Frame 1]
62-
image:img/developer-guide/layout-animation-2.png[Frame 2]
63-
image:img/developer-guide/layout-animation-3.png[Frame 3]
64-
image:img/developer-guide/layout-animation-4.png[Frame 4]
65-
image:img/developer-guide/layout-animation-5.png[Frame 5]
66-
image:img/developer-guide/layout-animation-6.png[Frame 6]
67-
image:img/developer-guide/layout-animation-7.png[Frame 7]
61+
image:img/layout-animation-1.png[Frame 1]
62+
image:img/layout-animation-2.png[Frame 2]
63+
image:img/layout-animation-3.png[Frame 3]
64+
image:img/layout-animation-4.png[Frame 4]
65+
image:img/layout-animation-5.png[Frame 5]
66+
image:img/layout-animation-6.png[Frame 6]
67+
image:img/layout-animation-7.png[Frame 7]
6868

6969

7070
==== Unlayout Animations
@@ -456,36 +456,36 @@ hi.show();
456456

457457

458458
.The slide transition moves both incoming and outgoing forms together
459-
image::img/developer-guide/transition-slide.jpg[The slide transition moves both incoming and outgoing forms together,scaledwidth=70%]
459+
image::img/transition-slide.jpg[The slide transition moves both incoming and outgoing forms together,scaledwidth=70%]
460460

461461
.The slide transition can be applied vertically as well
462-
image::img/developer-guide/transition-slide-vertical.jpg[The slide transition can be applied vertically as well,scaledwidth=70%]
462+
image::img/transition-slide-vertical.jpg[The slide transition can be applied vertically as well,scaledwidth=70%]
463463

464464
.Slide fade fades in the destination title while sliding the content pane it is the default on iOS
465-
image::img/developer-guide/transition-slide-fade.jpg[Slide fade fades in the destination title while sliding the content pane its the default on iOS,scaledwidth=70%]
465+
image::img/transition-slide-fade.jpg[Slide fade fades in the destination title while sliding the content pane its the default on iOS,scaledwidth=70%]
466466

467467
TIP: `SlideFade` is problematic without a title area. If you have a `Form` that lacks a title area we would recommend to disable `SlideFade` at least for that `Form`.
468468

469469
.With cover transitions the source form stays in place as it is covered by the destination. This transition can be played both horizontally and vertically
470-
image::img/developer-guide/transition-cover.jpg[With cover transitions the source form stays in place as it is covered by the destination. This transition can be played both horizontally and vertically,scaledwidth=70%]
470+
image::img/transition-cover.jpg[With cover transitions the source form stays in place as it is covered by the destination. This transition can be played both horizontally and vertically,scaledwidth=70%]
471471

472472

473473
.Uncover is the inverse of cover. The destination form stays in place while the departing form moves away
474-
image::img/developer-guide/transition-uncover.jpg[Uncover is the inverse of cover. The destination form stays in place while the departing form moves away,scaledwidth=70%]
474+
image::img/transition-uncover.jpg[Uncover is the inverse of cover. The destination form stays in place while the departing form moves away,scaledwidth=70%]
475475

476476
==== Fade and Flip Transitions
477477

478478
The fade transition is pretty trivial and only accepts a time value since it has no directional context.
479479

480480
.Fade transition is probably the simplest one around
481-
image::img/developer-guide/transition-fade.jpg[Fade transition is probably the simplest one around,scaledwidth=70%]
481+
image::img/transition-fade.jpg[Fade transition is probably the simplest one around,scaledwidth=70%]
482482

483483
The https://www.codenameone.com/javadoc/com/codename1/ui/animations/FlipTransition.html[FlipTransition] is also pretty simple but unlike the others it isn't a part of the `CommonTransitions`. It has its own `FlipTransition` class.
484484

485485
IMPORTANT: This transition looks very different on devices as it uses native perspective transforms available only there
486486

487487
.Fade transition is probably the simplest one around
488-
image::img/developer-guide/transition-flip.jpg[Fade transition is probably the simplest one around,scaledwidth=70%]
488+
image::img/transition-flip.jpg[Fade transition is probably the simplest one around,scaledwidth=70%]
489489

490490
==== Bubble Transition
491491

@@ -546,7 +546,7 @@ hi.show();
546546
----
547547

548548
.Bubble transition converting a circular button to a Dialog
549-
image::img/developer-guide/transition-bubble.png[Bubble transition converting a circular button to a Dialog,scaledwidth=12%]
549+
image::img/transition-bubble.png[Bubble transition converting a circular button to a Dialog,scaledwidth=12%]
550550

551551

552552

@@ -561,7 +561,7 @@ once.
561561

562562
[[mighty-morphing-components-1]]
563563
.Morph Transition
564-
image::img/developer-guide/mighty-morphing-components-1.png[Morph Transition,scaledwidth=15%]
564+
image::img/mighty-morphing-components-1.png[Morph Transition,scaledwidth=15%]
565565

566566
To support this behavior we have the https://www.codenameone.com/javadoc/com/codename1/ui/animations/MorphTransition.html[MorphTransition] class that provides this same effect coupled with a fade to
567567
the rest of the UI (see <<mighty-morphing-components-1>>).

docs/developer-guide/Casual-Game-Programming.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The first step is creating the splash animation as you can see in the screenshot
5050

5151
[[game-figure-2]]
5252
.Animation stages for the splash screen opening animation
53-
image::img/developer-guide/gaming-fig2.png[Figure 2,scaledwidth=40%]
53+
image::img/gaming-fig2.png[Figure 2,scaledwidth=40%]
5454

5555
The animation in the splash screen and most of the following animations are achieved using the simple tool of layout animations. In Codename One components are automatically arranged into position using layout managers, however this isn’t implicit unless the device is rotated. A layout animation relies on this fact, it allows you to place components in a position (whether by using a layout manager or by using `setX`/`setY`) then invoke the layout animation code so they will slide into their “proper” position based on the layout manager rules.
5656

@@ -66,7 +66,7 @@ Initially when entering the game form we have another animation where all the ca
6666

6767
[[game-figure-3]]
6868
.Game form startup animation and deal animation
69-
image::img/developer-guide/game-figure-3.png[Game UI,scaledwidth=40%]
69+
image::img/game-figure-3.png[Game UI,scaledwidth=40%]
7070

7171

7272
This animation is really easy to accomplish although it does have several stages. In the first stage we layout the cards within a grid layout (13x4), then when the animation starts (see the https://www.codenameone.com/javadoc/com/codename1/ui/util/UITimer.html[UITimer] code within `showGameUI()`) we just change the layout to a layered layout, add the back card (so it will come out on top based on z-ordering) and invoke animate layout.

0 commit comments

Comments
 (0)