findViewById(R.id.btn4).setOnClickListener(
new Button.OnClickListener() {
public void onClick(View v) {
//imageview에 열기
Intent intent = new Intent(getApplicationContext(), Web.class);
intent.putExtra("target", "http://www.ifull.co.kr/m_index.html");
startActivity(intent);
//익스플로러로 바로 열기
//url = "http://www.ifull.co.kr/m_index.html";
//startActivity( new Intent( Intent.ACTION_VIEW, Uri.parse(url)));
//finish();
}
});
=== xml ===
<LinearLayout
android:id="@+id/l_btn_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:layout_gravity="bottom|center_horizontal">
<ImageButton
android:id="@+id/btn4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="@drawable/btn_searchlist"
android:padding="0sp"
android:scaleType="centerCrop" />
</LinearLayout>
=== btn_searchlist.xml ===
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_pressed="true" android:drawable="@drawable/a8bt2_2"/>
<item android:drawable="@drawable/a8bt2"/>
</selector>