Android Open Source - AndroidStudioProjects My Activity






From Project

Back to project page AndroidStudioProjects.

License

The source code is released under:

GNU General Public License

If you think the Android project AndroidStudioProjects listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.buttoms.cfgs.aplicationwithbuttoms;
/*from w w  w. j ava2s . c  o m*/
import android.app.Activity;
import android.app.ActionBar;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.net.Uri;
import android.os.Bundle;

import java.net.URL;
import java.util.jar.Attributes;


public class MyActivity extends Activity {

    private View view;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);
    }

    private void getUrl(String myUrl) {
        Uri uriUrl = Uri.parse(myUrl);
        Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
        startActivity(launchBrowser);
    }

    public void goToUrl(View view)
    {
        EditText link = (EditText) findViewById(R.id.editTextUrl);
        String myUrl = link.getText().toString();
        getUrl(myUrl);
    }

    public void buttonImageClick(View view) {
        ImageView imageview = (ImageView) findViewById(R.id.imageView);
        imageview.setVisibility(View.VISIBLE);
    }

    public void buttonTextClick(View view) {
        TextView textview = (TextView) findViewById(R.id.textViewButton);
        textview.setVisibility(View.VISIBLE);
    }
}




Java Source Code List

com.buttoms.cfgs.aplicationwithbuttoms.ApplicationTest.java
com.buttoms.cfgs.aplicationwithbuttoms.MyActivity.java
com.perritos.perritos.ApplicationTest.java
com.perritos.perritos.MyActivity.java
com.smashkun.myfirstapplication.BuildConfig.java
com.tictactoe.smashkun.tictacandroid.ApplicationTest.java
com.tictactoe.smashkun.tictacandroid.MyActivity.java