PROGRAM 1
package [Link];
import [Link];
import [Link];
import [Link].*;
import [Link].*;
public class MainActivity extends Activity
{
ImageView image;
EditText e1,e2;
RadioGroup rg;
Button b1;
TextView t1;
@Override
protected void onCreate(Bundle savedInstanceState)
{
[Link](savedInstanceState);
setContentView([Link].activity_main);
image=(ImageView)findViewById([Link].imageView1);
e1=(EditText)findViewById([Link].editText1);
e2=(EditText)findViewById([Link].editText2);
rg=(RadioGroup)findViewById([Link].radioGroup1);
b1=(Button)findViewById([Link].button1);
t1=(TextView)findViewById([Link].textView1);
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
String s1=[Link]().toString();
String s2=[Link]().toString();
int rid=[Link]();
RadioButton
rb=(RadioButton)findViewById(rid);
String gender=[Link]().toString();
[Link](s1+" "+s2+" "+gender);
}
});
}
}
PROGRAM 2
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends Activity
{
EditText e1,e2;
Button b1;
@Override
protected void onCreate(Bundle savedInstanceState)
{
[Link](savedInstanceState);
setContentView([Link].activity_main);
e1=(EditText)findViewById([Link].editText1);
e2=(EditText)findViewById([Link].editText2);
b1=(Button)findViewById([Link].button1);
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
Double
cm=[Link]([Link]().toString());
Double inch=cm*0.393700787;
[Link]([Link](inch));
}
});
}
}
PROGRAM 3
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends Activity
{
EditText e1,e2,e3;
Button b1,b2,b3,b4;
@Override
protected void onCreate(Bundle savedInstanceState)
{
[Link](savedInstanceState);
setContentView([Link].activity_main);
e1=(EditText)findViewById([Link].editText1);
e2=(EditText)findViewById([Link].editText2);
e3=(EditText)findViewById([Link].editText3);
b1=(Button)findViewById([Link].button1);
b2=(Button)findViewById([Link].button2);
b3=(Button)findViewById([Link].button3);
b4=(Button)findViewById([Link].button4);
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
String a=[Link]().toString();
String b=[Link]().toString();
Integer i=[Link](a);
Integer j=[Link](b);
Integer res=i+j;
[Link]([Link]());
}
});
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
String a=[Link]().toString();
String b=[Link]().toString();
Integer i=[Link](a);
Integer j=[Link](b);
Integer res=i-j;
[Link]([Link]());
}
});
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
String a=[Link]().toString();
String b=[Link]().toString();
Integer i=[Link](a);
Integer j=[Link](b);
Integer res=i*j;
[Link]([Link]());
}
});
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
String a=[Link]().toString();
String b=[Link]().toString();
Integer i=[Link](a);
Integer j=[Link](b);
Integer res=i/j;
[Link]([Link]());
}
});
}
}
PROGRAM 4
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends Activity
{
Button b1;
@Override
protected void onCreate(Bundle savedInstanceState)
{
[Link](savedInstanceState);
setContentView([Link].activity_main);
b1=(Button)findViewById([Link].button1);
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
Intent in=new
Intent([Link].ACTION_IMAGE_CAPTURE)
;
startActivityForResult(in,0);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar
if it is present.
getMenuInflater().inflate([Link], menu);
return true;
}
}
PROGRAM 5
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class MainActivity extends Activity
{
EditText e1,e2;
Button b1;
@Override
protected void onCreate(Bundle savedInstanceState)
{
[Link](savedInstanceState);
setContentView([Link].activity_main);
e1=(EditText)findViewById([Link].editText1);
e2=(EditText)findViewById([Link].editText2);
b1=(Button)findViewById([Link].button1);
[Link](new [Link]()
{
@Override
public void onClick(View v)
{
String num=[Link]().toString();
String msg=[Link]().toString();
sendsms(num,msg);
}
private void sendsms(String num, String msg)
{
[Link]
sm=[Link]();
sm=sendTextMessage(num,null,msg,null,null);
[Link](getApplicationContext(), "Message Sent",
0).show();
}
private SmsManager sendTextMessage(String
num, Object object,
String msg, Object object2, Object
object3) {
// TODO Auto-generated method stub
return null;
}
});
}
}