



Slideshow on main page. Add all of images into drawable folder. and
int imgid[]={R.drawable.s1,R.drawable.s2,R.drawable.s3,R.drawable.s4};
Make array like this, and copy below code into your activity.
public static final String KEY_MY_PREFERENCE = "my_preference";
int fontsize;
public void onCreate(Bundle savedInstanceState)
{
SharedPreferences prefs = getSharedPreferences("fontsize", MODE_PRIVATE);
fontsize = prefs.getInt(KEY_MY_PREFERENCE, fontsize);
}
protected void onStop() {
super.onStop();
SharedPreferences prefs = getSharedPreferences("fontsize", MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
editor.putInt(KEY_MY_PREFERENCE, fontsize);
editor.commit();
}

package Byung_Yong.sample.mapView;
import java.util.List;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.os.Bundle;
import android.util.Log;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.Projection;
public class Map extends MapActivity{
MapView mapview;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapview = (MapView) findViewById(R.id.mapview);
mapview.setBuiltInZoomControls(true);
mapview.setSatellite(false);
GeoPoint gpoint = new GeoPoint(12345678,12345678);
MapController controller = mapview.getController();
controller.animateTo(gpoint);
controller.setZoom(16);
Bitmap image =
BitmapFactory.decodeResource(getResources(), R.drawable.place);
MyOverlay myoverlay = new MyOverlay(image);
List overlayList = mapview.getOverlays();
overlayList.add(myoverlay);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
class MyOverlay extends Overlay {
Bitmap bitmap;
public MyOverlay(Bitmap bitmap){
this.bitmap = bitmap;
}
@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow) {
super.draw(canvas, mapView, shadow);
Log.d("BB", "overlay");
Paint paint1 = new Paint();
Paint paint2 = new Paint();
paint2.setARGB(255, 0, 0, 0);
GeoPoint geopoint = new GeoPoint(12345678,12345678);
Point geopix = new Point();
Projection project = mapView.getProjection();
project.toPixels(geopoint, geopix);
canvas.drawBitmap(bitmap, geopix.x-50, geopix.y, paint1);
canvas.drawText("My Church", geopix.x-50, geopix.y+80, paint2);
}
}

package ByungYong.library.webView;
import android.app.*;
import android.os.*;
import android.view.*;
import android.webkit.*;
import android.widget.*;
public class WebViewActivity extends Activity {
WebView mWeb;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWeb = (WebView)findViewById(R.id.web);
mWeb.loadUrl("file:///android_asset/test.html");
mWeb.getSettings().setJavaScriptEnabled(true);
mWeb.getSettings().setSaveFormData(true);
mWeb.getSettings().setBuiltInZoomControls(true);
mWeb.setWebViewClient(new MyWebClient());
}
class MyWebClient extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
}
layout can be like this.import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.TextView;
public class Introduce extends Activity implements OnTouchListener{
final static float STEP = 200;
TextView mtxtRatio1,mtxtRatio2,mtxtRatio3,mtxtRatio4;
float mRatio = 1.0f;
int mBaseDist;
float mBaseRatio;
float fontsize = 13;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.introduce);
mtxtRatio1 = (TextView)findViewById(R.id.intro1);
mtxtRatio1.setTextSize(mRatio+13);
}
public boolean onTouchEvent(MotionEvent event) {
if (event.getPointerCount() == 2) {
int action = event.getAction();
int pureaction = action & MotionEvent.ACTION_MASK;
if (pureaction == MotionEvent.ACTION_POINTER_DOWN) {
mBaseDist = getDistance(event);
mBaseRatio = mRatio;
} else {
float delta = (getDistance(event) - mBaseDist) / STEP;
float multi = (float)Math.pow(2, delta);
mRatio = Math.min(1024.0f, Math.max(0.1f, mBaseRatio * multi));
mtxtRatio1.setTextSize(mRatio+13);
}
}
return true;
}
int getDistance(MotionEvent event) {
int dx = (int)(event.getX(0) - event.getX(1));
int dy = (int)(event.getY(0) - event.getY(1));
return (int)(Math.sqrt(dx * dx + dy * dy));
}
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
return false;
}
}
package ByungYong.sample.tableView;
import android.app.Activity;
import android.os.Bundle;
public class TableViewActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}