sahrear
24 messages 2009-07-21 |
Hi Tuukka,
Thank you so much for your response. screen.getFocusManager().getVirtualFocusedWidget has worked successfully!
Didn't try your second approach. Actually i'm not sure how to use the <_onfocus>selectionChanged(@{_id})</_onfocus>,actually i' not sure when and where and why to use "<_onfocus>...</_onfocus>" so can you please help or any tutorial on this?
However, please help for second approach Should i use it like below?
<tabfolder id="SSS"> <tabitem label="tab 1" id="tab1" class="tab1" onSelect="tab1">
<scrollPane id= "tab1"> <list id="tab1List"> <listitem id="listItem1" onfocus="SetFocusList">List Item 1
<_onfocus>selectionChanged(this)</_onfocus>
</listitem> </list> </scrollPane> </tabitem> </tabfolder>
And in java code:
if ("selectionChanged".equals(identifier)) { int id = Integer.parseInt((String) arguments[0]); doSomething(id); }
Thank you again.
|
|
sahrear
24 messages 2009-07-21 |
I have a tabfolder and i used 1 tab under it. My tab have listitem under list. I want to know which listitem is focused everytime i focus a list item.
My XML looks like:
<tabfolder id="SSS"> <tabitem label="tab 1" id="tab1" class="tab1" onSelect="tab1">
<scrollPane id= "tab1"> <list id="tab1List"> <listitem id="listItem1" onfocus="SetFocusList">List Item 1</listitem> </list> </scrollPane> </tabitem> </tabfolder>
It trggers on onfocus in onMessage but i still get the focusedwidget as "SSS" not "listitem1".
My java code:
if ("SetFocusList".equals(identifier)) { try { System.out.println("onfocuse called..."); screen.getWidget("listItem1").setAttribute("focused", "true"); //I tried to set the focus again System.out.println("Focused Widget ID: "+screen.getFocusManager().getFocusedWidget().getId()); //But i get "SSS" here } catch (Exception ex) { // ex.printStackTrace(); } return false; }
Can anyone please help how to get the focused widget? Or should i use getInternalChildInstance("SSS")?
Regards
Sahrear
|
|
sahrear
24 messages 2009-05-31 |
Thanks bro..it worked just GREAT!! THANKS!!
|
|
sahrear
24 messages 2009-05-30 |
I faced this problem as well.. i guess we should get a response from Kuix authors.. possiblt Tofu would be the best person to reply..
|
|
sahrear
24 messages 2009-05-30 |
Dear all,
Please look at my code below, its a long list of different button and radio groups. I just want to add a vertical scrolling in my screen when the list gets bigger. In my emulator its fine, but in my handset i can not see the cancal button.. so please help me out to add some scrollbar to scroll the screen vertically..
MY code:
<screen style="align:top-left;layout:inlinelayout(false,top-left)" title="Guess The Song"> <scrollpane showscrollbar="true"> <scrollpanecontainer>
<text style="align:left">No of Players:</text> <choice id="noOfPlayers"> <choiceRadiogroup> <radiobutton value="1">1</radiobutton> <radiobutton value="2" selected="true">2</radiobutton> <radiobutton value="3">3</radiobutton> <radiobutton value="4">4</radiobutton> <radiobutton value="5">5</radiobutton> <radiobutton value="6">6</radiobutton> </choiceRadiogroup>
</choice>
<text style="align:left">Select Part of Song To Play:</text> <choice id="playStyle"> <choiceRadiogroup> <radiobutton value="INTRO" selected="true">Intro</radiobutton> <radiobutton value="RANDOM">Random</radiobutton> </choiceRadiogroup> </choice>
<text style="align:left">Length:</text> <choice id="playDuration"> <choiceRadiogroup> <radiobutton value="5000000" selected="true">5 second</radiobutton> <radiobutton value="10000000">10 second</radiobutton> <radiobutton value="15000000">15 second</radiobutton> <radiobutton value="20000000">20 second</radiobutton> <radiobutton value="25000000">25 second</radiobutton> <radiobutton value="-1">Manual</radiobutton> </choiceRadiogroup> </choice>
<text style="align:left">Wining Score:</text> <textfield id="winingScore" constraints="numeric">10</textfield>
<button style="align:fill-center;bgcolor:green" onaction="settingsOk">OK</button> <button style="align:fill-center;bgcolor:green" onaction="settingsCancal">Cancal</button>
</scrollpanecontainer> </scrollpane> </screen>
|
|
sahrear
24 messages 2009-04-13 |
|
|
sahrear
24 messages 2009-04-05 |
Hi.. i have already developed a application which reads incoming sms. I understand that invoke the application automatically i need to sign the application. Now once i signed the application and it's invoked automatically on incoming sms, i want to show an alert in the middle of the screen keeping the phone native backgroud as it is. Once i select ok/open the alert then i go to the application or generate the full screen application. now i want to know can i show the desktop or alert in a specific size keeping the phone native backgroud as it is?
|
|
sahrear
24 messages 2009-03-21 |
Hello,
I have built a list, and adding listitem to to it dynamically. I'm addaing a Picture+Text1+Text2. No i want to show the Picture and Text1 in the first line and then want to to add Text2 in second line. I have kept the listitem as:
ListItem listitem = new ListItem(); listitem.setAttribute("style", "layout:inlinelayout(false,left)"); Text from = new Text(); Text body = new Text();
Picture picture = new Picture().setSource("sms_unread.png"); from.setText("Hello"); body.setText("world");
listitem.add(picture); listitem.add(from); >>>>>>>>>>>>>>I want to add a BREAK here/or i want to show "world" in next line<<<<<<<<<<< listitem.add(body);
can anyone please help? Any suggestion? How to add a line break in listitem item?
|
|
sahrear
24 messages 2009-03-14 |
<screen id="new_message" title="New Message"> <container style="layout:borderlayout"> <container style="layout:tablelayout"> <text style="align:left">To: </text> <break/> <textfield id ="to" maxsize="14" style="span: 2 1; weight: 1 .10;border:1;bg-color:#747170"> </textfield> <break/> <text style="align:left">Message: </text> <break/> <textfield id="message" maxsize="160" onchange="setPreview" style="span: 2 1; weight: 1 .01;border:0;bg-color:#444447"> </textfield> <break/> <textarea id="preview" style="span: 2 1; weight: 1 .75;border:1;bg-color:#2B1B17;border-color:#f19300"> </textarea> </container> </container> <screenfirstmenu>Option <menuPopup> <menu>Color <menupopup> <menuItem id="<r>" onaction="setColorFont(#<r>.focusedwidget)"> <text style="color:red" text="Red" /> </menuItem> <menuItem id="<g>" onaction="setColorFont(#<r>.focusedwidget)"> <text style="color:green" text="Green" /> </menuItem> <menuItem id="<b>" onaction="setColorFont(#<r>.focusedwidget)"> <text style="color:blue" text="Blue" /> </menuItem> <menuItem id="<w>" onaction="setColorFont(#<r>.focusedwidget)"> <text style="color:white" text="White" /> </menuItem> <menuItem id="<o>" onaction="setColorFont(#<r>.focusedwidget)"> <text style="color:#FF8040" text="Orange" /> </menuItem> <menuItem id="<p>" onaction="setColorFont(#<r>.focusedwidget)"> <text style="color:#FF0080" text="Purple" /> </menuItem> <menuItem id="<G>" onaction="setColorFont(#<r>.focusedwidget)"> <text style="color:#00FF00" text="Pastel Green" /> </menuItem> </menupopup> </menu> <menuItem onAction="setEmoticons"> Emoticons </menuItem> <menuItem onAction="exitConfirm"> Exit </menuItem> </menuPopup> </screenfirstmenu> <screensecondmenu onAction="sendText">Send</screensecondmenu> </screen>
Please look at my above xml, when i load this screen it's completely alright. But what i'm doing, whenever user writes something in textfiled 'message', i'm taking the input and showing it textarea preview with some customization. But the problem is, when i'm taking the input from textfiled and showing in textarea and then loading the screen.. then screens bottombar (screenfirstmenu and screensecondmenu) is going one step up!! can anyone help plz?
|
|
sahrear
24 messages 2009-03-13 |
I have below list (inbox.xml) and now 'onAction' in each listitem i want to retrive the text added into it. My intention is to show the texts in another screen. For example onaction to first listitem i want to show from 1 and message 1. Can anyone help me plz?
<screen title="Inbox"> <scrollPane> <list id="inboxList"> <listitem> <text>from 1</text> <text>message 1</text> </listitem> <listitem> <text>from 2</text> <text>message 2</text> </listitem> <listitem> <text>from 3</text> <text>message 3</text> </listitem> </list> </scrollPane> <screenfirstmenu>Back</screenfirstmenu> <screensecondmenu >Select</screensecondmenu> </screen>
I'm almost done with my application so plese help me to pass the last hurdle...thanks..
|
|
sahrear
24 messages 2009-03-11 |
Can you please explain how? I'm also facing this problem. thanks in advance.
|
|
sahrear
24 messages 2009-03-05 |
Hi.. i'm adding my user inputs in a textarea for user's preview... is it possible to set focus on textarea? is it focusable? If yes.. how to focus it from javacode? or XML?
Please help.
|
|
sahrear
24 messages 2009-03-04 |
i have a textarea defined in my screen like below.
<textarea id="preview" style="span: 2 1; weight: 1 .84;border:1;bg-color:#2B1B17"> </textarea>
From my java code, i'm retrving this textarea and adding Text... such as:
TextArea tr = (TextArea) screen.getWidget("preview");
Text t = new Text();
t.settxt("Hello");
tr.add(t);
Now i want to add a line break/new line after Hello.. how to do that?
|
|
sahrear
24 messages 2009-03-04 |
Hi..
I'm using a textarea to show my userinputs as 'Text'. for example:
<textarea></textarea>
I'm adding 'Text' widget in this textarea to show the inputs.. however i want to add a line break at the end of each line in the textarea.. so i want to know how to adda break? or new line?
|
|
sahrear
24 messages 2009-02-28 |
Dear Tofu.. i'm not that gud at coding.. so designed a work arround.. now i take the text input in a textfield and then "onchange" of textfield input i show the input in a textarea below with my customization :D i know thats not exactly i wanted but thats a gud alternative to me.. i will show u the codes shortly.. thanks..
|
|