Latest messages

725 topics, 2270 messages
Kuix bug report » ListItem bug when Screen Transaction!

   Fixing Bug: displaying a new screen, with transition effect, that has an initial focus on a Text doing slide animation causes the screen to not be rendered correctly:

Cause:

While the transition between the two screens is rendered the slideTextWorkerTask of the Text widget will shrink the repaint area of the canvas to the size of the Text widget, this happens as following:

slideTextWorkerTask ->  invalidateAppearance() -> Widget. invalidateAppearanceRegion(0, 0, width, height) -> Desktop.invalidateAppearanceRegion(..) -> canvas. repaintNextFrame(x, y, width, height)

Solution:

Disable the function of slideTextWorkerTask while rendering transition between screens

In Text.java:

 

if (isVisible()&& !Kuix.getCanvas().isTransitionRunning()) {

if (textX < minOffset || textX > maxOffset) {

                  slideTextIncrement *= -1;

      }

      textX += slideTextIncrement;

      invalidateAppearance();

}

In KuixCanvas.java add the following function:

public boolean isTransitionRunning(){
        return transitionRunning;
}

 

  Fixing Bug: Displaying an old (was displayed before) screen that has an initial focus on a TextWidget (that has slide animation) doesn’t trigger the slide animation of that TextWidget:

Cause:

While slideTextWorkerTask will be terminated when the container screen is not the current screen, this termination is cause by the following line of code in the task:

return !isInWidgetTree();

The task is not called again because the doLayout() is called only for the first time when creating the screen and adding widgets to it.

Solution:

When displaying a screen trigger all focused child Text widgets inside the screen, to start the slideTextWorkerTask.

 

In Desktop.java:

if (screen != null) {

                              super.add(screen);

            //By Wamsoft: triger text slid animation should be called here

            triggerSlideAnimation(this);

}

 

void triggerSlideAnimation(Widget widget) {

        for (widget = widget.getChild(); widget != null; widget = widget.next) {

            if (widget instanceof Text &&  widget.isFocusWidgetChild()){

                ((Text)widget).triggerSlideAnimation();

            }

if (widget instanceof Ticker) // Ticker is a custom widget

                      ((Ticker)widget).triggerSlideAnimation();

            if (widget.getChild()!=null)

                triggerSlideAnimation(widget);

        }

}

 

 

In  Text.java:

public void triggerSlideAnimation(){

       if (slideTextWorkerTask != null) {

                              Worker.instance.removeTask(slideTextWorkerTask);

            textX = originalTextX;

                              slideTextIncrement = 1;

                              Worker.instance.pushTask(slideTextWorkerTask);

                  }

}

 

ramezs@gmail.com

 

Kuix general board » Not to show scrollpanescrollbar if height of screen is long enough

Making ScrollBar invisible when no need to scroll inside ScrollPane:

In ScrollBar.java  the code of setSelection(int selection) method should be modified to include the following line:

this.setVisible(!barHidden);

 

So the whole code of setSelection(int selection) will be:

 

public void setSelection(int selection) {

              int lastSelection = this.selection;

              this.selection = Math.min(MathFP.ONE, Math.max(0, selection));

              if (this.selection != lastSelection) {

                     if (horizontal) {

                           barLayoutData.width = this.selection;

                           barLayoutData.height = -1;

                     } else {

                           barLayoutData.width = -1;

                            barLayoutData.height = this.selection;

                     }

                     barHidden = this.selection == MathFP.ONE || this.selection == 0;

                     bar.invalidate();

            this.setVisible(!barHidden);

              }

       }

 

ramezs@gmail.com

 

Kuix technical support » Persian or Arabic input in textfield

Hi To All

Does textfield support Persian Or Arabic input?

It's so kind of you if give me a tutorial about it?

Kuix general board » Not to show scrollpanescrollbar if height of screen is long enough

is it possible do not show scrollpanescrollbar if height  of screen is long enough. if it's possible show/hide when flipping from portrait to landscape view of screen on device?

Thanks!!!

Kuix technical support » setAttributeBindInstruction function, Help!

Hi,

How can I use this function?  >> "setAttributeBindInstruction". I want to fasten label of TabPage with Dataprovider. I can fasten in xml, but I want to fasten code behind.

tab.setAttributeBindInstruction("label",null,"@{name}"); > dont work

OR

tab.setAttributeBindInstruction("_label",null,"@{name}"); > dont work ....

 

Thanks.

Kuix technical support » Where is Vibration Function and Lighting Function in Kuix?

Hi,

 I saw  Vibration and Lighting Functions  in Kuix. I can remember  but Now I can not find it. Did you use it?  Do you know, how I can use these functions?

Kuix technical support » Text Wrap

Hi,

You must use "<textarea>" control for wrapped.  And you can use "<b>, <u>, <i>...."  in text area for format.

 

<textarea id="txtContent" styled="true"></textarea>

 

after

 TextArea txtExtra = (TextArea) Kuix.getCanvas().getDesktop().getCurrentScreen().getWidget("txtExtra");

 txtExtra.setText("kadir <b><u>AKIN</u></b>, <u>test</u> project");

 

Kuix general board » Gmail like UI

but this library also lack some components !

Editable TextArea

Inline editing

Kuix general board » Gmail like UI

Yes ! it can be done i had designed a similer UI  for my application .

Kuix general board » Fixed TextField Size

Hello,

I need to add a TextField with a fixed size, but when I add a TextField the size change when I type something. How could I do that?

Thanks ;)

Kuix general board » How to get the values of all widgets from screen?
Hello, I need to capture the values of all widgets in a screen in order to be stored in a vector or array. there is a method to get those values automatically or which classess/methods we can use in order to do that

Thanks
Kuix general board » my topic

hey tofu, long time :)

I was trying to get to a snippet that you referred to, about finding the selected index of a list.  the snippet pages are all broken, would you mind posting some literal code example to show what you were talking about?

thanks!

Kuix technical support » Text Wrap

I am using XML file for user interface.like text  can i wrap data in the text.please help me

Kuix technical support » Minimun requirements

Hey Jorge,

I don't know of a readily available list but if you visit DeviceAtlas.com and search for devices that support at least MIDP2.0 and at least CLDC 1.0 it will return a list of handsets.

I have found that my Kuix apps are between 240KB on average. Therefore you need to ensure you develop for devices that allows a MAX-JAR-SIZE of >250KB.

Else Kuix works perfectly fine.

Klickr

Kuix general board » IS THIS PROJECT DEAD?

Hey Talavang

Keep the faith buddy. Keep developing in Java, but don't neglect to keep researching new software languages. Objective C is not a bad one to know - for whatever Apple might get up to in the years to come. I would have been worried if I was a Microsoft Developer - specially guys with pre-C# skills. Eish.

Klickr.