I can't set background in Midlet - java-me

Some people say you can't set background in Midlet and use canvas. I used canvas mode and search for add TextFiled I can't do it because canvas is low level UI and drawing textfield
Can help me for set background in Midlet without Canvas?

You can't set Background in Midlet. The reason behind this Midlet is not an Compoment it-self. Midlet is a framework that allows to code for J2ME/Java ME Applications. A Midlet it self holds the the project components like Forms, Canvas TextBox etc.
You can not set background in Midlet, but you can assign a canvas or form to it and set its background.
A Canvas comes in Low level UI, while TextFied is higher level UI, which requires a component like Form for hold it. So you can not draw/put TextField on Canvas.

Related

How to properly display a focus rectangle in a compact SplitView menu item

I'm building my first Universal Windows Platform (UWP) App and am trying to implement the popular "Hamburger Menu" using the SplitView class.
Inspired by many samples, the items hosted on the SplitView pane are re-styled RadioButton controls, with a vertical highlight-rectangle, an icon and a text. The appearance is similar to that of the Groove app.
I'm now trying to implement navigation and selection using the keyboard, and this now bring a little focus-rect around the items in the SplitView pane. However, since the pane clips its contents when its DisplayMode is either CompactInline or CompactOverlay, the focus rectangle is also clipped, which is not the behavior a user would expect.
Please, can anyone advise on how to property display the focus rectangle in this situation ?
Just an idea, what if you set the width of all radio button's to be same as the CompactPaneLength property of SplitView. The default is 48 DIPs.

How can I give focus to a grid in a Windows 10 UWP app?

How can I give focus to a grid in a Windows 10 UWP app? It seems like it does not have a focus member.
Layout controls don't provide a focus method.
Only controls deriving from the Control class have a Focus method.
Layout controls (e.g. Grid, StackPanel or Canvas) derive from the Panel class. This class doesn't provide the capability to "focus" something, because the control itself just layouts its child elements.
You could also say, only an UIElement that is also a TabStop can be focused.

JavaFX 2 Titlebar color

How can I change the color of the title bar in javafx 2 desktop app?
Area of the window there title is written is controlled by OS. OS manages it's color, active/passive state, close-minimize buttons, etc. and FX has no API to handle that.
You may opt to create your own titlebar by using Stage with StageStyle.UNDECORATED and draw any decoration you like for such window.

Android wallpaper also sliding left and right when we swipe the home screen

I want to develop a new home screen application for android. I saw the default home screen in my android 2.3.3 device, when ever I swipe the home screen left and right, the background wallpaper also sliding left and right. What is that view? How to get the same effect in an app?
Is it ViewPager? I checked the ViewPager class, but I didn't found any common background image for all views in that.
You probably want to use a canvas with a draw-able, then detect the users swiping and animate it in the background. It is likely that the default android backgrounds are doing the same. You wont be drawing the unseen portions of the view.
http://developer.android.com/guide/topics/graphics/2d-graphics.html
I suggest doing their lunar lander tutorial to learn how to use the canvas first.
You will make a canvas the background to your app and then lay your other ui elements on top of it unless you make the ui based inside the canvas.

Textbox on canvas in j2me

I am going to make application on j2me using canvas. I want to take textbox or textfield on my canvas.
You can draw a basic textbox and display a string , and when it receives focus, you can switch the view to that particular textbox ,something like this
textBox = new TextBox(....);
Midlet.display.setCurrent(textBox);
This would create your data entry more robust and save you from the pain of implementing various keyboard issues yourselves
These items are only available for adding to Forms. Canvas is a class for handling lower-level events.
You have to implement your own textbox, and that isn't easy.Basic textbox would be a rectangle (drawRect) with text (drawString) inside of it.

Resources