Skip to content

Commit

Permalink
먹거리 숙소 부분 뒤로가기, 홈버튼 완성
Browse files Browse the repository at this point in the history
  • Loading branch information
jangwonseo committed Oct 26, 2015
1 parent 4e5b60a commit e3d7419
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.ArrayList;

import vivz.slidenerd.agriculture.R;
import vivz.slidenerd.agriculture.home.HomeActivity;

public class NavigateSearch extends Activity {
private ListView listView2;
Expand All @@ -37,6 +38,8 @@ public class NavigateSearch extends Activity {
private TMapView mMapView = null;
private Typeface yunGothicFont;

private Button backButton,moveToHomeButton;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -61,6 +64,25 @@ protected void onCreate(Bundle savedInstanceState) {
final int height = displaymetrics.heightPixels;
int width = displaymetrics.widthPixels;


backButton = (Button)findViewById(R.id.navigatesearchbackbutton);
backButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onBackPressed();
}
});

moveToHomeButton = (Button)findViewById(R.id.navigatesearch_menubutton);
moveToHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent moveToHomeIntent = new Intent(getApplicationContext(), HomeActivity.class);
moveToHomeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(moveToHomeIntent);
}
});

navigateText.setOnKeyListener(new View.OnKeyListener()
{
public boolean onKey(View v, int keyCode, KeyEvent event)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_navigate_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
>

<Button
android:id="@+id/back"
android:id="@+id/navigatesearchbackbutton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_pressback"/>
Expand All @@ -37,7 +37,7 @@
>

<Button
android:id="@+id/myPage"
android:id="@+id/navigatesearch_menubutton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_movetohome"/>
Expand Down

0 comments on commit e3d7419

Please sign in to comment.