Android - On Screen Notification
In the C# Wolrd, we always use "MessageBox.Show (String)" to generate on screen notification (Pop-Up Message Box). In the Android, it has a similar thing calls toast. That is a small square box on the screen. Well, this is not just a single line of code, like Toast.Show(string). But that is just a few lines of codes more.
Code
| Context context = getApplicationContext(); | |
| CharSequence msgText= "Test"; | |
| Toast toast = Toast.makeText(context,msgText, Toast.LENGTH_LONG); | |
| toast.show(); | 
Android 4.0
Apple has announced iPhone 4S and iOS 5 update. I need Google to response this news too! Last week, they has announced Galaxy Nexus and Android 4.0. That is the new generation of Google Phone! Moreover, that is the first Android which can use in Tablet and Phone! I hope we can get a Galaxy Nexus soon too!
Reference:
Android Blog
JSON View in Joomla
I have tried to call the json view in the controll, like this:
Code:
Code
| $view = &$this->getView('view','json','prefix');   | |
| $view->display(); | 
But that is still with the default html template, even I have used, json_encode.
I have found out I have to put "format=json" in the request url.
How to pass the value from the controller to a view
I am implementing a MVC component. I wish to pass a value from the controller to the view for displaying. This is very easy. You need to assign the value from the controller. 
Code
| $view = &$this->getView('viewname','fromat','prefix');   | |
| $view->assign('ids','1,2,4'); | 
Then in the view:
Code
| $ids=$this->get('ids'); | 
That is easy.
Not Displaying Template in Joomla Component.
Joomla is using the MVC Pattern. There is another feature. You can override display function in controller to trigger whether the controller will display the template. In the following example, I will not display the template when the form is submitted.
Code
| function display(){ | |
|   $task = JRequest::getVar('task'); | |
|   if( $task != 'enter' ){ | |
|     parent::display(); | |
|   } | |
| } | 

