Skip to content

Commit

Permalink
mydiarydetail 홈, 백버튼 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jangwonseo committed Oct 26, 2015
1 parent f2d4fe6 commit 9368b69
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.util.ArrayList;

import vivz.slidenerd.agriculture.R;
import vivz.slidenerd.agriculture.home.HomeActivity;
import vivz.slidenerd.agriculture.list.Item;
import vivz.slidenerd.agriculture.list.ListDetailActivity;
import vivz.slidenerd.agriculture.recruit.*;
Expand All @@ -47,7 +48,7 @@ public class MyDiaryActivity__ extends ActionBarActivity {

private LinearLayout recruitListLayout,interestedListLayout;
private Button recruitListButton, interestedListButton;
private Button mydiarybackbutton;
private Button mydiarybackbutton, mydiaryMoveToHomeButton;

//sharedPreference 선언부
public SharedPreferences setting;
Expand Down Expand Up @@ -121,6 +122,9 @@ protected void onCreate(Bundle savedInstanceState) {
mydiarybackbutton = (Button)findViewById(R.id.mydiarybackbutton);
mydiarybackbutton.setOnClickListener(mClickListener);

mydiaryMoveToHomeButton = (Button)findViewById(R.id.mydiary_movetohome);
mydiaryMoveToHomeButton.setOnClickListener(mClickListener);


recruitListButton = (Button)findViewById(R.id.recruitlistbutton);//신청체험버튼
interestedListButton = (Button)findViewById(R.id.interestedlistbutton);//관심체험버튼
Expand Down Expand Up @@ -223,11 +227,16 @@ public void onClick(View v) {
recruitListLayout.setVisibility(LinearLayout.GONE);
interestedListLayout.setVisibility(LinearLayout.VISIBLE);
break;

//뒤로가기버튼
case R.id.mydiarybackbutton:
Log.d("seojang", "heheheheheihihi");
onBackPressed();
break;

case R.id.mydiary_movetohome:
Intent moveToHomeIntent = new Intent(getApplicationContext(), HomeActivity.class);
moveToHomeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(moveToHomeIntent);
break;
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Calendar;

import vivz.slidenerd.agriculture.R;
import vivz.slidenerd.agriculture.home.HomeActivity;
import vivz.slidenerd.agriculture.recruit.RecruitListItem;
import vivz.slidenerd.agriculture.recruit.MissionItem;

Expand All @@ -41,6 +42,7 @@ public class MyDiaryDetailActivity extends ActionBarActivity {
TextView missionName;
Button phoneNum;
Button btnMydiaryDetailCancel;
Button backButton, moveToHomeButton;

getRecruit getRecruit;

Expand Down Expand Up @@ -141,6 +143,23 @@ public void onClick(View v) {
}
});

backButton = (Button)findViewById(R.id.mydiarydetail_backbutton);
backButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onBackPressed();
}
});
moveToHomeButton = (Button)findViewById(R.id.mydiarydetail_movetohomebutton);
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);
}
});


}

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_mydiary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
>

<Button
android:id="@+id/mydiary_movetohome"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_movetohome"/>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/activity_mydiarydetail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
android:layout_weight="70"
>
<Button
android:id="@+id/mydiarydetail_backbutton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_pressback"/>
Expand All @@ -35,6 +36,7 @@
android:layout_weight="81"
>
<Button
android:id="@+id/mydiarydetail_movetohomebutton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/btn_movetohome"/>
Expand Down

0 comments on commit 9368b69

Please sign in to comment.