Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - connect XML to java?

connect XML to java?

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

connect XML to java?

Postby Ansem » Sat Mar 10, 2012 11:32 am

Hi, i create an object that open a link in the broswer when i tap on the button.
The problem is that when i tap on the button on the emulator nothing append :(
For the problem is that i don't use the right name for the object :/
this is the XML code:
Code: Select all
<Button
        android:id="@+id/btnRegistrazione"
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="@string/Registrati" />


and this is the java code:
Code: Select all
public class EasyParkingActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    public class Registrazione extends Activity implements View.OnClickListener{
            private Button btnRegistrazione;
             
            @Override
            public void onCreate(Bundle b){
            super.onCreate(b);
             
            btnRegistrazione = new Button(this);
            btnRegistrazione.setOnClickListener(this);
             
            aprilink("http://www.google.it");
             
            setContentView(btnRegistrazione);
            }
             
            public void onClick(View v){
            aprilink("http://www.google.it");
            }
           
            private void aprilink( String string ){
                    Intent browse = new Intent( Intent.ACTION_VIEW, Uri.parse(string) );

                startActivity( browse );
                }
            };
Ansem
Freshman
Freshman
 
Posts: 2
Joined: Thu Mar 08, 2012 4:23 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 12 guests