Posts

Showing posts from January, 2013

Android - Pass Parameter to the other activity

Use "intent.putExtra()" to pass the parameter to the next activity. Example: EditText _search_text = (EditText) findViewById(R.id.editTextSearchText);             Intent _intent = new Intent(this, SearchResult.class); _intent.putExtra("search", _search_text.getText().toString().trim()); startActivity(_intent); this.finish(); And on the "onCreate()" function of the receive activity, receive parameter by: Example: String _search_text; Bundle extras = getIntent().getExtras(); if (extras != null) {      _search_text = extras.getString("search"); }

Android - onKeyListener

EditText _search_text = (EditText) findViewById(R.id.editTextSearchText); _search_text Text . setOnKeyListener ( new OnKeyListener () { public boolean onKey ( View v , int keyCode , KeyEvent event ) { if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_ENTER: this.goToSearchResultPage(); return true; default: break; } } return false; } });

HTML - jquery datepicker wiht .NET

<asp:TextBox ID="TextBoxCloseDate" runat="server" CssClass="textEntry"></asp:TextBox> <script type="text/javascript">      $(document).ready(function () {            $("#<%=TextBoxCloseDate.ClientID %>").datepicker({                   dateFormat: 'dd-mm-yy',                   changeMonth: true,                   changeYear: true,                   showOn: 'button',                   buttonImageOnly: true,            ...

PHP - Set GET/POST Encoding

#This example is convert UTF-8 Unicode to Thai Unicode #GET $input =iconv("UTF-8","TIS-620",$_REQUEST['input_text']);