Skip to content

Commit

Permalink
Merge pull request #82 from HanRiverMeetup/issue-76
Browse files Browse the repository at this point in the history
#76 modify layout and setting userID
  • Loading branch information
chad1994 authored Aug 4, 2018
2 parents a5b06c2 + 567db96 commit c2c88e7
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 17 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dependencies {
implementation 'com.google.code.gson:gson:2.6.1'
implementation "com.squareup.retrofit2:adapter-rxjava2:2.4.0"


//Permission
implementation 'gun0912.ted:tedpermission:2.0.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.airbnb.lottie.LottieAnimationView;
import com.depromeet.hanriver.hanrivermeetup.R;
Expand Down Expand Up @@ -87,6 +88,8 @@ public void onClick(View view) {
.observeOn(AndroidSchedulers.mainThread())
.subscribe());

Toast.makeText(getContext(), "매칭 되셨습니다!", Toast.LENGTH_LONG).show();

dismiss();

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;

import com.depromeet.hanriver.hanrivermeetup.HanRiverMeetupApplication;
Expand Down Expand Up @@ -62,6 +63,7 @@ public class MyPageFragment extends Fragment{
private TextView tab2_count,tab2_tab;
private TextView tab3_count,tab3_tab;
private TextView main_text;
private ScrollView scrollView;

private View tabView1;
private View tabView2;
Expand All @@ -73,6 +75,10 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c

LinearLayout view = (LinearLayout) inflater.inflate(R.layout.fragment_mypage, container, false);

// scrollView = (ScrollView)view.findViewById(R.id.mypage_scroll);
// scrollView.setOverScrollMode(View.OVER_SCROLL_NEVER);


main_text = view.findViewById(R.id.mypage_main_text);
main_text.setText("안녕하세요\n"+LoginFragment.getNick_name()+" 님 반가워요");

Expand Down Expand Up @@ -120,6 +126,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
@Override
public void onTabSelected(TabLayout.Tab tab) {
viewPager.setCurrentItem(tab.getPosition());
bind();
if(tab.getPosition()==0){
tab1_count.setTypeface(null, Typeface.BOLD);
tab1_tab.setTypeface(null, Typeface.BOLD);
Expand Down Expand Up @@ -179,17 +186,17 @@ public void onPause() {
private void bind() {
mCompositeDisposable = new CompositeDisposable();

mCompositeDisposable.add(MyPageService.getInstance().getMyMeeting("1320458764757184")
mCompositeDisposable.add(MyPageService.getInstance().getMyMeeting(LoginFragment.getUser_id())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::setTab1Count));

mCompositeDisposable.add(MyPageService.getInstance().getAppliedMeeting("1320458764757184")
mCompositeDisposable.add(MyPageService.getInstance().getAppliedMeeting(LoginFragment.getUser_id())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::setTab2Count));

mCompositeDisposable.add(MyPageService.getInstance().getMathcedMeeting("1320458764757184")
mCompositeDisposable.add(MyPageService.getInstance().getMathcedMeeting(LoginFragment.getUser_id())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::setTab3Count));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import com.depromeet.hanriver.hanrivermeetup.HanRiverMeetupApplication;
import com.depromeet.hanriver.hanrivermeetup.R;
import com.depromeet.hanriver.hanrivermeetup.fragment.login.LoginFragment;
import com.depromeet.hanriver.hanrivermeetup.fragment.mypage.Adapter.Tab1Adapter;
import com.depromeet.hanriver.hanrivermeetup.fragment.mypage.ViewModel.Tab1ViewModel;
import com.depromeet.hanriver.hanrivermeetup.model.mypage.Tab1VO;
Expand Down Expand Up @@ -82,7 +83,7 @@ public void onPause() {
private void bind() {
mCompositeDisposable = new CompositeDisposable();

mCompositeDisposable.add(MyPageService.getInstance().getMyMeeting("1320458764757184")
mCompositeDisposable.add(MyPageService.getInstance().getMyMeeting(LoginFragment.getUser_id())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::setTab1VOs));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.baoyz.swipemenulistview.SwipeMenuListView;
import com.depromeet.hanriver.hanrivermeetup.HanRiverMeetupApplication;
import com.depromeet.hanriver.hanrivermeetup.R;
import com.depromeet.hanriver.hanrivermeetup.fragment.login.LoginFragment;
import com.depromeet.hanriver.hanrivermeetup.fragment.mypage.Adapter.Tab2Adapter;
import com.depromeet.hanriver.hanrivermeetup.fragment.mypage.Adapter.Tab3Adapter;
import com.depromeet.hanriver.hanrivermeetup.fragment.mypage.ViewModel.Tab3ViewModel;
Expand Down Expand Up @@ -139,7 +140,7 @@ public void onPause() {
private void bind() {
mCompositeDisposable = new CompositeDisposable();

mCompositeDisposable.add(MyPageService.getInstance().getAppliedMeeting("1320458764757184")
mCompositeDisposable.add(MyPageService.getInstance().getAppliedMeeting(LoginFragment.getUser_id())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::setTab2VOs));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import com.depromeet.hanriver.hanrivermeetup.HanRiverMeetupApplication;
import com.depromeet.hanriver.hanrivermeetup.R;
import com.depromeet.hanriver.hanrivermeetup.fragment.login.LoginFragment;
import com.depromeet.hanriver.hanrivermeetup.fragment.mypage.Adapter.Tab3Adapter;
import com.depromeet.hanriver.hanrivermeetup.fragment.mypage.ViewModel.Tab3ViewModel;
import com.depromeet.hanriver.hanrivermeetup.fragment.timeline.TestFragment;
Expand Down Expand Up @@ -101,7 +102,7 @@ private void bind() {
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(this::setTab3VOs));

mCompositeDisposable.add(MyPageService.getInstance().getMathcedMeeting("1320458764757184")
mCompositeDisposable.add(MyPageService.getInstance().getMathcedMeeting(LoginFragment.getUser_id())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::setTab3VOs));
Expand Down
19 changes: 9 additions & 10 deletions app/src/main/res/layout/fragment_mypage.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand All @@ -17,12 +18,11 @@
android:layout_height="wrap_content"
android:layout_marginLeft="24dp"
android:layout_marginTop="38dp"
android:textSize="22sp"
android:textColor="@color/black"
android:lineSpacingExtra="10sp"
android:lineHeight="32sp"
android:lineSpacingExtra="10sp"
android:text="안녕하세요\n김주현님 반가워요"
/>
android:textColor="@color/black"
android:textSize="22sp" />

<ImageView
android:id="@+id/profile_img"
Expand All @@ -37,12 +37,12 @@
android:id="@+id/user_name"
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_marginTop="190dp"
android:layout_marginLeft="158dp"
android:textSize="22sp"
android:layout_marginTop="190dp"
android:lineHeight="8sp"
android:text="김태성"
android:textColor="#333333"
android:text="김태성"/>
android:textSize="22sp" />

</FrameLayout>

Expand All @@ -51,14 +51,13 @@
android:id="@+id/tablayout2"
android:layout_width="295dp"
android:layout_height="58dp"
app:tabIndicatorHeight="0dp"
/>
app:tabIndicatorHeight="0dp" />

<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_centerInParent="true"
android:background="#dcdcdc"/>
android:background="#dcdcdc" />

<com.depromeet.hanriver.hanrivermeetup.fragment.mypage.CustomViewpager
android:id="@+id/viewpager2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:layout_width="44dp"
android:layout_height="15dp"
android:layout_marginTop="72dp"
android:layout_marginLeft="12dp"
android:layout_marginLeft="7dp"
android:textAlignment="center"/>
</FrameLayout>

Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/layout/mypage_tab1_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,11 @@
android:divider="#2186f8"
android:dividerHeight="1dp"/>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#dcdcdc"
android:layout_marginTop="214dp"></View>


</FrameLayout>

0 comments on commit c2c88e7

Please sign in to comment.