-
LWUIT FORM
Hi
I have LWUIT [B]Form1 [/B]which contains titles from Rss File,if the end user clicks on the title of [B]Form1[/B],it should navigate to a [B]Form2 [/B],where i am displaying a Text area(Paragraphs of text with),if the end user scroll down the [B]form2[/B] and then the user get's navigate to [B]form1 [/B]by clicking the [B]Back[/B] Botton.After that the user clicks on another list item on [B]form1[/B],then it gets navigate to [B]form2[/B],but the problem is that time [B]form2[/B] is displayed at the end,i want to show my form2 to the user at the starting of my text area..?
My Actual Requirement is Each time if end user clicks on any title on Form1 ,i should be able to show start of my [B]form2[/B](Textarea Begin,not in the middle or not at the end) so that the user starts reading the text.for that what is the method i need to use?
thanks.....
-
Re: LWUIT FORM
[QUOTE=pavanragi;904783]Hi
I have LWUIT [B]Form1 [/B]which contains titles from Rss File,if the end user clicks on the title of [B]Form1[/B],it should navigate to a [B]Form2 [/B],where i am displaying a Text area(Paragraphs of text with),if the end user scroll down the [B]form2[/B] and then the user get's navigate to [B]form1 [/B]by clicking the [B]Back[/B] Botton.After that the user clicks on another list item on [B]form1[/B],then it gets navigate to [B]form2[/B],but the problem is that time [B]form2[/B] is displayed at the end,i want to show my form2 to the user at the starting of my text area..?
My Actual Requirement is Each time if end user clicks on any title on Form1 ,i should be able to show start of my [B]form2[/B](Textarea Begin,not in the middle or not at the end) so that the user starts reading the text.for that what is the method i need to use?
thanks.....[/QUOTE]
Not able to understand you question completely . Can you be a bit precise and clear so that anyone can help out solve your problem
-
Re: LWUIT FORM
I have a LWUIT [B]form1 [/B]and [B]form2[/B] ,form1 is displayed with list of titles from Rss File,
1)If the user clicks on any title on [B]fom1[/B],i am able to navigate to [B]form2 [/B],where i am displaying a[B] text area[/B](Contains Paragraphs of text( Description) from Rss),if suppose the user keep on reading the text and user reached at the end of a line(Cursor remains at the end)(by scroll down) on [B]form2[/B]. After that user clicks back button on form2,then user able to navigate to form1,
2)Again user clicks on any title on form1,then user should be able to see the text area(he should be able to read the description) from starting but not in the middle or end on [B]form2[/B](Beacuse in Previous case user read all the description till end on [B]form2[/B].
[B]My Problem is:[/B] Each time user clicks on any title on form1,i am able to navigate form2,but the cursor should always point to start of my text area(To allow the user start reading the description from statring)But my code is not working
How to reset form values each time it is displayed?
Here my Code:
[QUOTE] private void displayCompleteNewsScreen(News detailNews) {
//log.debug("displayCompleteNewsScreen");
form2.removeAll();
form2.repaint();
form2.addCommand(m_backCommand);
form2.addCommandListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
form1.show();
}
});
Label pubDate = new Label(detailNews.getPubDate().substring(0, 16));
pubDate.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_SMALL));
form2.addComponent(pubDate);
textarea.setText(detailNews.getDescription());
form2.addComponent(textarea);
form2.show();
}[/QUOTE]
-
Re: LWUIT FORM
Replace this line - textarea.setText(detailNews.getDescription());
by these:
textarea=null;
textarea= new textArea();
textarea.setText(detailNews.getDescription());
Also share the code of Form1, how are you calling Form2 from it ?
-
Re: LWUIT FORM
HI amit,thanks for reply
Here the code of form1:
[QUOTE] public void addSelectedTabNews(News news) {
if (Condition.equals("TopNews")) {
topstory.addElement(news);
myNewsList.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
List source = (List) ae.getSource();
News selectedNewsItem = (News) source.getSelectedItem();
if (selectedNewsItem != null) {
displayCompleteNewsScreen(selectedNewsItem);
}
}
});
form1.show();
}[/QUOTE]
you can also check this link [url]http://www.developer.nokia.com/Community/Discussion/showthread.php?237786-Issue-with-LWUIT-Tabs-Click-Event[/url] further code
thanks..
[QUOTE=im2amit;904824]Replace this line - textarea.setText(detailNews.getDescription());
by these:
textarea=null;
textarea= new textArea();
textarea.setText(detailNews.getDescription());
Also share the code of Form1, how are you calling Form2 from it ?[/QUOTE]