-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from HanRiverMeetup/issue-44
#44 add mypage tab2 applied meeting
- Loading branch information
Showing
13 changed files
with
355 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 92 additions & 1 deletion
93
.../main/java/com/depromeet/hanriver/hanrivermeetup/fragment/mypage/Adapter/Tab2Adapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,95 @@ | ||
package com.depromeet.hanriver.hanrivermeetup.fragment.mypage.Adapter; | ||
|
||
public class Tab2Adapter { | ||
import android.content.Context; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.BaseAdapter; | ||
import android.widget.ImageView; | ||
import android.widget.TextView; | ||
|
||
import com.depromeet.hanriver.hanrivermeetup.R; | ||
import com.depromeet.hanriver.hanrivermeetup.model.mypage.Tab2VO; | ||
|
||
import org.w3c.dom.Text; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class Tab2Adapter extends BaseAdapter{ | ||
private LayoutInflater inflater; | ||
ArrayList<Tab2VO> mItems; | ||
private Context mContext; | ||
|
||
|
||
public Tab2Adapter (ArrayList<Tab2VO> items) { | ||
super(); | ||
mItems = items; | ||
} | ||
|
||
|
||
|
||
@Override | ||
public int getCount() { | ||
return mItems.size(); | ||
} | ||
|
||
@Override | ||
public Object getItem(int i) { | ||
return mItems.get(i); | ||
} | ||
|
||
@Override | ||
public long getItemId(int i) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public View getView(int i, View view, ViewGroup viewGroup) { | ||
|
||
ViewHolder holder = new ViewHolder(); | ||
|
||
if(view == null) { | ||
LayoutInflater inflater = (LayoutInflater)viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); | ||
view = inflater.inflate(R.layout.mypage_tab2_item, viewGroup, false); | ||
|
||
holder.mTitle = (TextView) view.findViewById(R.id.title); | ||
holder.mLocation = (TextView)view.findViewById(R.id.location); | ||
holder.mTime = (TextView)view.findViewById(R.id.meeting_time); | ||
holder.mCost = (TextView)view.findViewById(R.id.expected_cost); | ||
holder.mParticipants=(TextView)view.findViewById(R.id.participants_cnt); | ||
|
||
view.setTag(holder); | ||
} else { | ||
holder = (ViewHolder)view.getTag(); | ||
} | ||
|
||
holder.mTitle.setText(mItems.get(i).getTitle()); | ||
holder.mLocation.setText(mItems.get(i).getLocation()); | ||
holder.mTime.setText(mItems.get(i).getMeeting_time()); | ||
holder.mCost.setText(String.valueOf(mItems.get(i).getExpected_cost())); | ||
holder.mParticipants.setText(String.valueOf(mItems.get(i).getParticipants_cnt())); | ||
|
||
|
||
return view; | ||
} | ||
|
||
public void addItem(String mIcon, String mStr) { | ||
// Tab2VO item = new Tab2VO(); | ||
// | ||
// item.set(mIcon); | ||
// item.setStr(mStr); | ||
|
||
// mItems.add(item); | ||
} | ||
|
||
|
||
public class ViewHolder { | ||
private TextView mTitle; | ||
private TextView mLocation; | ||
private TextView mTime; | ||
private TextView mCost; | ||
private TextView mParticipants; | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/depromeet/hanriver/hanrivermeetup/fragment/mypage/CustomViewpager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.depromeet.hanriver.hanrivermeetup.fragment.mypage; | ||
|
||
import android.content.Context; | ||
import android.support.v4.view.ViewPager; | ||
import android.util.AttributeSet; | ||
import android.view.MotionEvent; | ||
|
||
public class CustomViewpager extends ViewPager{ | ||
public CustomViewpager(Context context) { | ||
super(context); | ||
} | ||
|
||
public CustomViewpager(Context context, AttributeSet attrs) { | ||
super(context, attrs); | ||
} | ||
|
||
@Override | ||
public boolean onInterceptTouchEvent(MotionEvent event) { | ||
// 스와이핑되서 페이지가 바뀌는것을 막는다. | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean onTouchEvent(MotionEvent event) { | ||
//스와이핑되서 페이가 바뀌는 것을 막는다. | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector android:height="24dp" android:viewportHeight="16" | ||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#00000000" android:fillType="evenOdd" | ||
android:pathData="M2.838,1.474L13.914,12.55l-1.145,1.145L1.693,2.619l1.145,-1.145z" | ||
android:strokeColor="#FFF" android:strokeWidth="2"/> | ||
<path android:fillColor="#00000000" android:fillType="evenOdd" | ||
android:pathData="M13.901,2.619L2.825,13.695 1.68,12.551 12.756,1.474l1.145,1.145z" | ||
android:strokeColor="#FFF" android:strokeWidth="2"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<vector android:height="24dp" android:viewportHeight="16" | ||
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#00000000" | ||
android:pathData="M7.93,1.58a6,6 0,1 1,0 12,6 6,0 0,1 0,-12z" | ||
android:strokeColor="#FFF" android:strokeWidth="2"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.