This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PruebaFor { | |
| public static void main(String[] args) { | |
| for(int i=1; i<=100;i++){ | |
| if(i%3 == 0 && i%5 == 0){ | |
| System.out.println("PumasUNAM,"); | |
| }else if(i%3 == 0){ | |
| System.out.println("Pumas,"); | |
| }else if(i%5 == 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <TextView xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" | |
| android:typeface="monospace" | |
| android:text="Esta es mi etiqueta al estilo Androideity" | |
| android:textColor="#A4C639" | |
| android:textStyle="bold" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected Button btn; | |
| btn = (Button)findViewById(R.id.btn); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <RadioGroup xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent" | |
| android:orientation="vertical" > | |
| <RadioButton | |
| android:id="@+id/rb_01" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String[] datos = {"uno", "dos", "tres", "cuatro"}; | |
| new ArrayAdapter(this, android.R.layout.simple_list_item_1, datos); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public View getView(int position, View convertView, ViewGroup parent){ | |
| if(convertView==null){ | |
| convertView = new TextView(this); | |
| } | |
| convertView.setText(buildStringFor(position)); | |
| return(convertView); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Adapter con un layout del framework de Android | |
| lv.setAdapter(new ArrayAdapter(this,android.R.layout.simple_list_item_1,datos)); | |
| //Adapter con un layout propio | |
| lv.setAdapter(new ArrayAdapter(this,R.layout.list_item,datos)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.os.Handler; | |
| import android.os.Message; | |
| import android.widget.ProgressBar; | |
| public class ThreadTestActivity extends Activity { | |
| ProgressBar bar; | |
| Handler handler = new Handler(){ | |
| @Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.os.Handler; | |
| import android.widget.Toast; | |
| import android.widget.Button; | |
| import android.view.View; | |
| import android.view.View.OnClickListener;; | |
| public class RunnableTestActivity extends Activity { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.net.Uri; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.Toast; | |
| public class IntentTestActivity extends Activity { | |
| /** Called when the activity is first created. */ |
OlderNewer