Sha256: c7193df30decf5c3c8ed7984d77f1a2541d70686e14e4845dea426f01291039a

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

package com.acouchi.sample;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.view.View.OnClickListener;
import android.view.View;
import android.widget.ImageView;

public class StartupActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        TextView clickThis = (TextView)findViewById(R.id.clickThisText);
        clickThis.setOnClickListener(new OnClickListener(){
          public void onClick(View v) {
              TextView clickThis = (TextView)findViewById(R.id.clickThisText);
              clickThis.setText("WELL DONE");
          }
        });


        ImageView imageView = (ImageView)findViewById(R.id.clickThisImageView);
        imageView.setOnClickListener(new OnClickListener(){
          public void onClick(View v) {
            TextView clickThis = (TextView)findViewById(R.id.clickThisText);
            clickThis.setText("You click an ImageView");
          }
        });
    }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
acouchi-0.0.6 examples/AcouchiSample/src/com/acouchi/sample/StartupActivity.java
acouchi-0.0.5 examples/AcouchiSample/src/com/acouchi/sample/StartupActivity.java
acouchi-0.0.4 examples/AcouchiSample/src/com/acouchi/sample/StartupActivity.java
acouchi-0.0.3 examples/AcouchiSample/src/com/acouchi/sample/StartupActivity.java