personalcenter update2

master
ongbo 6 years ago
parent c7f1d9b13b
commit 48b8ee3b02

@ -160,5 +160,6 @@
<orderEntry type="library" name="Gradle: com.github.open-android:WheelPicker:v1.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.github.open-android:WheelPicker:v1.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: cn.aigestudio.wheelpicker:WheelPicker:1.1.3@aar" level="project" /> <orderEntry type="library" name="Gradle: cn.aigestudio.wheelpicker:WheelPicker:1.1.3@aar" level="project" />
<orderEntry type="library" name="Gradle: de.hdodenhof:circleimageview:2.2.0@aar" level="project" /> <orderEntry type="library" name="Gradle: de.hdodenhof:circleimageview:2.2.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.github.ybq:Android-SpinKit:1.4.0@aar" level="project" />
</component> </component>
</module> </module>

@ -55,4 +55,5 @@ dependencies {
implementation 'com.github.florent37:materialviewpager:1.2.3' implementation 'com.github.florent37:materialviewpager:1.2.3'
implementation 'com.ramotion.foldingcell:folding-cell:1.2.3' implementation 'com.ramotion.foldingcell:folding-cell:1.2.3'
implementation 'de.hdodenhof:circleimageview:2.2.0' implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
} }

@ -72,17 +72,17 @@ public class MyPersonCenter extends Fragment {
case 0: case 0:
return HeaderDesign.fromColorResAndDrawable( return HeaderDesign.fromColorResAndDrawable(
R.color.blue, R.color.blue,
getResources().getDrawable(R.drawable.home_back) getResources().getDrawable(R.drawable.xiha1)
); );
case 1: case 1:
return HeaderDesign.fromColorResAndDrawable( return HeaderDesign.fromColorResAndDrawable(
R.color.green, R.color.green,
getResources().getDrawable(R.drawable.home_back) getResources().getDrawable(R.drawable.xiha2)
); );
case 2: case 2:
return HeaderDesign.fromColorResAndDrawable( return HeaderDesign.fromColorResAndDrawable(
R.color.cyan, R.color.cyan,
getResources().getDrawable(R.drawable.home_back) getResources().getDrawable(R.drawable.xiha3)
); );
} }
@ -110,7 +110,7 @@ public class MyPersonCenter extends Fragment {
case 0: case 0:
return RecyclerViewFragment.newInstance(0,mainActivity); return RecyclerViewFragment.newInstance(0,mainActivity);
case 1: case 1:
return RecyclerViewFragment.newInstance(1,mainActivity); return RecyclerViewFragmentINFO.newInstance(1,mainActivity);
case 2: case 2:
return RecyclerViewFragment.newInstance(1,mainActivity); return RecyclerViewFragment.newInstance(1,mainActivity);
default: default:
@ -129,9 +129,9 @@ public class MyPersonCenter extends Fragment {
public CharSequence getPageTitle(int position) { public CharSequence getPageTitle(int position) {
switch (position % 3){ switch (position % 3){
case 0: case 0:
return "jil"; return "DYNAMIC";
case 1: case 1:
return "drug"; return "INFO";
case 2: case 2:
return "药友"; return "药友";
default: default:

@ -0,0 +1,81 @@
package com.example.PersonalCenter;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.example.cmknowledgegraph.R;
import com.github.florent37.materialviewpager.header.MaterialViewPagerHeaderDecorator;
import java.util.ArrayList;
import java.util.List;
public class RecyclerViewFragmentINFO extends Fragment{
int flag;
AppCompatActivity appCompatActivity;
public void setAppCompatActivity(AppCompatActivity appCompatActivity) {
this.appCompatActivity = appCompatActivity;
}
public void setFlag(int flag) {
this.flag = flag;
}
public static Fragment newInstance(int flag, AppCompatActivity appCompatActivity){
RecyclerViewFragmentINFO recyclerViewFragmentinfo = new RecyclerViewFragmentINFO();
recyclerViewFragmentinfo.setFlag(flag);
recyclerViewFragmentinfo.setAppCompatActivity(appCompatActivity);
return recyclerViewFragmentinfo;
}
final List<Object> items = new ArrayList<>();
static final int ITEMS = 1;
RecyclerView mRecyclerView;
CardView mCardView;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_recyclerview, container, false);
}
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mRecyclerView=view.findViewById(R.id.recyclerView);
// mCardView = view.findViewById();
//需要根据网路请求发送数据来请求一个页可以有多少文章条目而且针对每一个tab都要有不同的显示方式
for (int i=0;i<ITEMS;i++){
items.add(new Object());
}
Log.i("jk==",""+ITEMS);
//设置布局
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.canScrollVertically();
mRecyclerView.setLayoutManager(linearLayoutManager);
mRecyclerView.setHasFixedSize(true);
//设置分割线
mRecyclerView.addItemDecoration(new MaterialViewPagerHeaderDecorator());
//设置适配器
RecyclerViewPagerAdapter recyclerViewPagerAdapter = new RecyclerViewPagerAdapter(items,flag);
recyclerViewPagerAdapter.setAppCompatActivity(appCompatActivity);
mRecyclerView.setAdapter(recyclerViewPagerAdapter);
}
public void initdata(){
//初始化数据类,请求网络
}
}

@ -40,10 +40,10 @@ public class RecyclerViewPagerAdapter extends RecyclerView.Adapter<RecyclerView.
switch (flag){ switch (flag){
case 0://论坛 case 0://论坛
view = LayoutInflater.from(parent.getContext()) view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.internetforumfragment, parent, false); .inflate(R.layout.cell, parent, false);
// //
// view = LayoutInflater.from(parent.getContext()).inflate(R.layout.drug_friends,parent,false); // view = LayoutInflater.from(parent.getContext()).inflate(R.layout.drug_friends,parent,false);
FoldingCell foldingCell = view.findViewById(R.id.folding_cell); FoldingCell foldingCell = view.findViewById(R.id.folding_cell_new);
foldingCell.setOnClickListener(new View.OnClickListener() { foldingCell.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -56,9 +56,11 @@ public class RecyclerViewPagerAdapter extends RecyclerView.Adapter<RecyclerView.
case 1://动态 case 1://动态
view = LayoutInflater.from(parent.getContext()) view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.content_cardview, parent, false); .inflate(R.layout.personinfomain, parent, false);
return new RecyclerView.ViewHolder(view) { return new RecyclerView.ViewHolder(view) {
}; };
case 2://好友列表 case 2://好友列表
@ -67,58 +69,7 @@ public class RecyclerViewPagerAdapter extends RecyclerView.Adapter<RecyclerView.
return new RecyclerView.ViewHolder(view) { return new RecyclerView.ViewHolder(view) {
}; };
// view = LayoutInflater.from(parent.getContext())
// .inflate(R.layout.drug_friends,parent,false);
// CardStackView cardStackView = view.findViewById(R.id.stackview);
// Integer[] item = new Integer[]{R.color.color_1,
// R.color.color_2,
// R.color.color_3,
// R.color.color_4,
// R.color.color_5,
// R.color.color_6,
// R.color.color_7,
// R.color.color_8,
// R.color.color_9,
// R.color.color_10,
// R.color.color_11,
// R.color.color_12,
// R.color.color_13,
// R.color.color_14,
// R.color.color_15,
// R.color.color_16,
// R.color.color_17,
// R.color.color_18,
// R.color.color_19,
// R.color.color_20,
// R.color.color_21,
// R.color.color_22,
// R.color.color_23,
// R.color.color_24,
// R.color.color_25,
// R.color.color_26};
// DrugFriendsCardAdapter drugFriendsCardAdapter = new DrugFriendsCardAdapter(parent.getContext());
// drugFriendsCardAdapter.setAppCompatActivity(appCompatActivity);
//
// cardStackView.setAdapter(drugFriendsCardAdapter);
// cardStackView.setItemExpendListener(new CardStackView.ItemExpendListener() {
// @Override
// public void onItemExpend(boolean expend) {
// //
// }
// });
// cardStackView.setAnimatorAdapter(new AllMoveDownAnimatorAdapter(cardStackView));
// new Handler().postDelayed(new Runnable() {
// @Override
// public void run() {
// drugFriendsCardAdapter.updateData(Arrays.asList(item));
// }
// },200);
// return new RecyclerView.ViewHolder(view) {
// @Override
// public String toString() {
// return super.toString();
// }
// };
} }
return null; return null;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<com.ramotion.foldingcell.FoldingCell xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:folding-cell="http://schemas.android.com/apk/res-auto"
android:id="@+id/folding_cell_new"
android:layout_width="match_parent"
android:layout_height="wrap_content"
folding-cell:additionalFlipsCount="6"
folding-cell:animationDuration="1300"
folding-cell:backSideColor="@color/bgBackSideColor"
folding-cell:cameraHeight="30">
<!-- CONTENT (UNFOLDED) LAYOUT (MUST BE AT LEAST 2x times BIGGER than content layout bellow)-->
<include layout="@layout/cell_content_listview" />
<!-- TITLE (FOLDED) LAYOUT (MUST BE AT LEAST 2x times SMALLER than content layout above) -->
<include layout="@layout/cell_title_listview" />
</com.ramotion.foldingcell.FoldingCell>

@ -0,0 +1,429 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<!-- content header line -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bgContentTop"
android:paddingBottom="7dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingTop="7dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/order_id_mock"
android:textColor="@android:color/white"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="@string/price_mock"
android:textColor="@android:color/white"
android:textSize="20sp"
android:textStyle="bold" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/favoriteslist" />
</RelativeLayout>
<!-- content header image -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 展开之后的背景图片-->
<ImageView
android:id="@+id/head_image"
android:layout_width="match_parent"
android:layout_height="100dp"
android:scaleType="centerCrop"
android:src="@drawable/xiha4" />
<TextView
android:id="@+id/head_image_left_text"
style="@style/ContentImageBadgeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/head_image"
android:layout_alignLeft="@id/head_image"
android:layout_alignStart="@id/head_image"
android:paddingBottom="10dp"
android:paddingLeft="20dp"
android:paddingStart="20dp"
android:text="@string/requests_count_mock" />
<TextView
style="@style/ContentImageBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/head_image_left_text"
android:layout_alignLeft="@id/head_image_left_text"
android:layout_alignStart="@id/head_image_left_text"
android:paddingLeft="20dp"
android:paddingStart="20dp"
android:text="@string/requests_count_badge" />
<TextView
android:id="@+id/head_image_right_text"
style="@style/ContentImageBadgeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/head_image"
android:layout_alignEnd="@id/head_image"
android:layout_alignRight="@id/head_image"
android:paddingBottom="10dp"
android:paddingEnd="20dp"
android:paddingRight="20dp"
android:text="@string/weight_mock" />
<TextView
style="@style/ContentImageBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/head_image_right_text"
android:layout_alignLeft="@id/head_image_right_text"
android:layout_alignStart="@id/head_image_right_text"
android:text="@string/weight_badge" />
<TextView
android:id="@+id/head_image_center_text"
style="@style/ContentImageBadgeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/head_image"
android:layout_centerHorizontal="true"
android:paddingBottom="10dp"
android:text="@string/pledge_mock" />
<TextView
style="@style/ContentImageBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/head_image_center_text"
android:layout_alignLeft="@id/head_image_center_text"
android:layout_alignStart="@id/head_image_center_text"
android:text="@string/pledge_badge" />
</RelativeLayout>
<!-- content body layout -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/bgContent"
android:orientation="vertical"
android:paddingBottom="6dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="9dp">
<!-- avatar and name part -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:id="@+id/content_avatar_title"
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="5dp"
android:text="@string/sender_badge" />
<!-- 头像-->
<ImageView
android:id="@+id/content_avatar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/content_avatar_title"
android:scaleType="centerCrop"
android:src="@drawable/katong1" />
<!--用户名文章-->
<TextView
android:id="@+id/content_name_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/content_avatar"
android:layout_marginBottom="2dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="@id/content_avatar"
android:layout_toRightOf="@id/content_avatar"
android:text="@string/client_name_mock"
android:textColor="@color/mainTextColor"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/content_rating_stars"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_name_view"
android:layout_alignStart="@id/content_name_view"
android:layout_below="@id/content_name_view"
android:src="@drawable/collection" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/content_rating_stars"
android:layout_marginBottom="-2dp"
android:layout_marginLeft="3dp"
android:layout_marginStart="3dp"
android:layout_toEndOf="@id/content_rating_stars"
android:layout_toRightOf="@id/content_rating_stars"
android:text="@string/rating_mock"
android:textColor="@color/contentBadgeTitle"
android:textSize="12sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/next" />
</RelativeLayout>
<!-- divider line -->
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="6dp"
android:layout_marginTop="9dp"
android:src="@color/contentDividerLine" />
<!-- addresses part -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/content_from_badge"
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/from_badge" />
<TextView
android:id="@+id/content_from_address_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_from_badge"
android:layout_alignStart="@id/content_from_badge"
android:layout_below="@id/content_from_badge"
android:text="@string/content_from1_mock"
android:textColor="@color/mainTextColor"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/content_from_address_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_from_address_1"
android:layout_alignStart="@id/content_from_address_1"
android:layout_below="@id/content_from_address_1"
android:text="@string/content_from2_mock"
android:textColor="@color/mainTextColor"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/content_to_badge"
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/to_badge" />
<TextView
android:id="@+id/content_to_address_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_to_badge"
android:layout_alignStart="@id/content_to_badge"
android:layout_below="@id/content_to_badge"
android:text="@string/content_to1_mock"
android:textColor="@color/mainTextColor"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/content_to_address_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_to_address_1"
android:layout_alignStart="@id/content_to_address_1"
android:layout_below="@id/content_to_address_1"
android:text="@string/content_to2_mock"
android:textColor="@color/mainTextColor"
android:textSize="14sp" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/next" />
</RelativeLayout>
</LinearLayout>
<!-- divider line -->
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="6dp"
android:layout_marginTop="7dp"
android:src="@color/contentDividerLine" />
<!-- dates part -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/content_delivery_date_badge"
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/delivery_date_badge" />
<TextView
android:id="@+id/content_delivery_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_delivery_date_badge"
android:layout_alignStart="@id/content_delivery_date_badge"
android:layout_below="@id/content_delivery_date_badge"
android:text="@string/delivery_time_mock"
android:textColor="@color/mainTextColor"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/content_delivery_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_delivery_time"
android:layout_alignStart="@id/content_delivery_time"
android:layout_below="@id/content_delivery_time"
android:text="@string/delivery_date_mock"
android:textColor="@color/mainTextColor"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/content_deadline_badge"
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/deadline_badge" />
<TextView
android:id="@+id/content_deadline_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_deadline_badge"
android:layout_alignStart="@id/content_deadline_badge"
android:layout_below="@id/content_deadline_badge"
android:text="@string/deadline_time_mock"
android:textColor="@color/mainTextColor"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/content_deadline_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_deadline_time"
android:layout_alignStart="@id/content_deadline_time"
android:layout_below="@id/content_deadline_time"
android:text=""
android:textColor="@color/mainTextColor"
android:textSize="14sp" />
</RelativeLayout>
</LinearLayout>
<!-- request button -->
<TextView
android:id="@+id/content_request_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@color/btnRequest"
android:padding="10dp"
android:text="@string/request_btn_text"
android:textAlignment="center"
android:textColor="@color/mainTextColor"
android:textSize="20sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/btn_annotation_mock"
android:textAlignment="center"
android:textColor="@color/contentBadgeTitle"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/bgContent"
android:baselineAligned="false"
android:orientation="horizontal">
<!-- LEFT TITLE PART -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="155dp"
android:layout_weight="3"
android:background="@color/bgTitleLeft"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="20dp">
<TextView
android:id="@+id/title_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="@android:color/white"
android:textSize="26sp" />
<TextView
android:id="@+id/title_time_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="@android:color/white"
android:textSize="14sp" />
<TextView
android:id="@+id/title_date_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_time_label"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="@android:color/white"
android:textSize="12sp" />
</RelativeLayout>
<!-- RIGHT TITLE PART -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/bgTitleRight"
android:paddingBottom="20dp"
android:paddingEnd="20dp"
android:paddingLeft="15dp"
android:paddingRight="20dp"
android:paddingStart="15dp"
android:paddingTop="20dp">
<ImageView
android:id="@+id/title_from_to_dots"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:src="@drawable/bg_draw13" />
<TextView
android:id="@+id/title_from_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/title_from_to_dots"
android:layout_marginTop="-5dp"
android:layout_toEndOf="@+id/title_from_to_dots"
android:layout_toRightOf="@+id/title_from_to_dots"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:textColor="@android:color/black"
android:textSize="16sp" />
<ImageView
android:id="@+id/title_from_to_dots_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/title_from_address"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_toEndOf="@+id/title_from_to_dots"
android:layout_toRightOf="@+id/title_from_to_dots"
android:src="@color/contentDividerLine" />
<TextView
android:id="@+id/title_to_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title_from_to_dots_divider"
android:layout_toEndOf="@id/title_from_to_dots"
android:layout_toRightOf="@id/title_from_to_dots"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:textColor="@android:color/black"
android:textSize="16sp" />
<TextView
android:id="@+id/title_requests_count"
style="@style/TitleBadgeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
style="@style/TitleBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_requests_count"
android:layout_alignLeft="@id/title_requests_count"
android:layout_alignStart="@id/title_requests_count"
android:text="@string/requests_count_badge" />
<TextView
android:id="@+id/title_weight"
style="@style/TitleBadgeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="@string/weight_mock" />
<TextView
style="@style/TitleBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_weight"
android:layout_alignLeft="@id/title_weight"
android:layout_alignStart="@id/title_weight"
android:text="@string/weight_badge" />
<TextView
android:id="@+id/title_pledge"
style="@style/TitleBadgeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" />
<TextView
style="@style/TitleBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_pledge"
android:layout_alignLeft="@id/title_pledge"
android:layout_alignStart="@id/title_pledge"
android:text="@string/pledge_badge" />
</RelativeLayout>
</LinearLayout>

@ -10,17 +10,17 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view" android:id="@+id/card_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" android:layout_height="400dp"
android:layout_marginBottom="@dimen/cardMarginVertical" android:layout_marginBottom="@dimen/cardMarginVertical"
android:layout_marginLeft="@dimen/cardMarginHorizontal" android:layout_marginLeft="@dimen/cardMarginHorizontal"
android:layout_marginRight="@dimen/cardMarginHorizontal" android:layout_marginRight="@dimen/cardMarginHorizontal"
android:layout_marginTop="@dimen/cardMarginVertical" android:layout_marginTop="@dimen/cardMarginVertical"
app:cardBackgroundColor="#000000"
app:cardCornerRadius="2dp" app:cardCornerRadius="2dp"
app:cardElevation="2dp" app:cardElevation="2dp"
app:cardPreventCornerOverlap="false" app:cardPreventCornerOverlap="false"
android:clickable="true" android:clickable="true"
app:contentPadding="0dp"> app:contentPadding="0dp">
android:foreground="?android:attr/selectableItemBackgroundBorderless"
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

@ -2,5 +2,5 @@
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recyclerView" android:id="@+id/recyclerView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
/> />

@ -13,8 +13,8 @@
<de.hdodenhof.circleimageview.CircleImageView <de.hdodenhof.circleimageview.CircleImageView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/iv_avatar" android:id="@+id/iv_avatar"
android:layout_width="45dp" android:layout_width="65dp"
android:layout_height="45dp" android:layout_height="65dp"
android:src="@drawable/th" android:src="@drawable/th"
/> />
<TextView <TextView
@ -24,6 +24,7 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_below="@id/iv_avatar" android:layout_below="@id/iv_avatar"
android:text="未登录" android:text="未登录"
android:textStyle="bold"
android:textSize="20dp" android:textSize="20dp"
android:textColor="#1f330f"/> android:textColor="#1f330f"/>

@ -3,7 +3,7 @@
xmlns:folding-cell="http://schemas.android.com/apk/res-auto" xmlns:folding-cell="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<com.ramotion.foldingcell.FoldingCell <com.ramotion.foldingcell.FoldingCell
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/folding_cell" android:id="@+id/folding_cell"

@ -0,0 +1,311 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="400dp"
android:layout_marginBottom="@dimen/cardMarginVertical"
android:layout_marginLeft="@dimen/cardMarginHorizontal"
android:layout_marginRight="@dimen/cardMarginHorizontal"
android:layout_marginTop="@dimen/cardMarginVertical"
app:cardBackgroundColor="#ffffff"
app:cardCornerRadius="2dp"
app:cardElevation="2dp"
app:cardPreventCornerOverlap="false"
android:clickable="true"
app:contentPadding="0dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.cardview.widget.CardView
android:id="@+id/more_person_info"
android:layout_width="match_parent"
app:cardElevation="0dp"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Anums"
android:textSize="23dp"
android:textStyle="bold"
android:layout_marginLeft="20dp"
android:typeface="monospace"/>
<TextView
android:id="@+id/personmain_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="more"
android:textSize="18dp"
android:textStyle="italic"
android:layout_alignParentRight="true"
android:layout_marginRight="40dp"
android:typeface="monospace"/>
<ImageView
android:id="@+id/personmain_more_img"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginTop="8dp"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:src="@drawable/next"/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/essay"
android:layout_width="120dp"
android:layout_height="150dp"
app:cardCornerRadius="14dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
app:cardElevation="3dp"
android:outlineSpotShadowColor="#000080"
app:cardBackgroundColor="#000080"
android:outlineAmbientShadowColor="#000080">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Essay"
android:textSize="20dp"
android:textStyle="italic"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:textColor="#ffffff"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Open your"
android:textSize="15dp"
android:layout_marginLeft="8dp"
android:textColor="#c0c0c0"
android:layout_alignParentBottom="true"
android:layout_marginBottom="30dp"/>
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/llist"
android:layout_marginTop="46dp"
android:layout_centerHorizontal="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="beautiful essay"
android:textSize="15dp"
android:layout_marginLeft="15dp"
android:textColor="#c0c0c0"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/drug_collection"
android:layout_width="120dp"
android:layout_height="150dp"
app:cardCornerRadius="14dp"
android:layout_marginTop="40dp"
android:layout_marginLeft="10dp"
app:cardBackgroundColor="#6A5ACD"
android:outlineSpotShadowColor="#6A5ACD"
android:outlineAmbientShadowColor="#6A5ACD">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My drug"
android:textSize="20dp"
android:textStyle="italic"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:textColor="#ffffff"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Collect your"
android:textSize="15dp"
android:layout_marginLeft="8dp"
android:textColor="#c0c0c0"
android:layout_alignParentBottom="true"
android:layout_marginBottom="30dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Process Drug"
android:textSize="15dp"
android:layout_marginLeft="15dp"
android:textColor="#c0c0c0"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"/>
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/like"
android:layout_marginTop="46dp"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/health_num"
android:layout_width="120dp"
android:layout_height="150dp"
app:cardCornerRadius="14dp"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginTop="40dp"
android:outlineAmbientShadowColor="#363636"
android:outlineSpotShadowColor="#363636"
app:cardBackgroundColor="#363636">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="My Health"
android:textSize="20dp"
android:textStyle="italic"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:textColor="#ffffff"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Inten your"
android:textSize="15dp"
android:layout_marginLeft="8dp"
android:textColor="#c0c0c0"
android:layout_alignParentBottom="true"
android:layout_marginBottom="30dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Health number"
android:textSize="15dp"
android:layout_marginLeft="15dp"
android:textColor="#c0c0c0"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"/>
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/birday"
android:layout_marginTop="46dp"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginBottom="-10dp"
android:layout_below="@+id/health_num"
app:cardElevation="10dp"
app:cardBackgroundColor="#e0e0e0"
app:cardCornerRadius="10dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Earnings"
android:textStyle="bold"
android:textSize="24dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Total Balance"
android:textStyle="italic"
android:textColor="@color/holo_blue_bright"
android:textSize="16dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="49dp"/>
<TextView
android:id="@+id/money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="$38,473,000.00"
android:textSize="18dp"
android:textStyle="bold"
android:layout_marginTop="49dp"
android:layout_alignParentRight="true"
android:layout_marginRight="4dp"/>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="15dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="80dp"
android:layout_marginBottom="17dp"
app:cardBackgroundColor="#ffffff">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Today Your Earnings"
android:textSize="18dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"/>
<TextView
android:id="@+id/today_earnings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="49dp"
android:layout_marginLeft="15dp"
android:textSize="28dp"
android:textStyle="bold"
android:text="$1,234.00"/>
<com.github.ybq.android.spinkit.SpinKitView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/spin_kit"
style="@style/SpinKitView.Wave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:layout_marginTop="25dp"
app:SpinKit_Color="@color/colorAccent" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>

@ -37,4 +37,20 @@
<color name="my_color_green_light">#3CB371</color> <color name="my_color_green_light">#3CB371</color>
<color name="my_color_dark_yellow">#FFD700</color> <color name="my_color_dark_yellow">#FFD700</color>
<color name="bgBackSideColor">#f4f0ff</color>
<color name="bgTitleLeft">#594691</color>
<color name="bgTitleRight">#ffffff</color>
<color name="bgContentTop">#594691</color>
<color name="bgContent">#ffffff</color>
<color name="contentDividerLine">#e0e0e0</color>
<color name="contentBadgeTitle">#a9a9a9</color>
<color name="titleBadgeTitle">#adafb1</color>
<color name="titleBadgeText">#adafb1</color>
<color name="mainTextColor">#343d43</color>
<color name="btnRequest">#ffbf12</color>
<color name="black_overlay">#66000000</color>
</resources> </resources>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

@ -1,4 +1,29 @@
<resources> <resources>
<!-- <string name="app_name">CMKnowledgeGraph</string>--> <!-- <string name="app_name">CMKnowledgeGraph</string>-->
<!-- <string name="Sign"--> <!-- <string name="Sign"-->
<string name="order_id_mock" translatable="false"># 12345678</string>
<string name="price_mock" translatable="false">$25</string>
<string name="requests_count_mock" translatable="false">5</string>
<string name="requests_count_badge" translatable="false">REQUESTS</string>
<string name="weight_mock" translatable="false">50 oz</string>
<string name="weight_badge" translatable="false">WEIGHT</string>
<string name="pledge_mock" translatable="false">$150</string>
<string name="pledge_badge" translatable="false">PLEDGE</string>
<string name="sender_badge" translatable="false">SENDER</string>
<string name="client_name_mock" translatable="false">Edward Norton</string>
<string name="rating_mock" translatable="false">(26)</string>
<string name="from_badge" translatable="false">FROM</string>
<string name="to_badge" translatable="false">TO</string>
<string name="delivery_date_badge" translatable="false">DELIVERY DATE</string>
<string name="delivery_time_mock" translatable="false">6:30 pm</string>
<string name="delivery_date_mock" translatable="false">May 16, 2016</string>
<string name="deadline_badge" translatable="false">REQUEST DEADLINE</string>
<string name="deadline_time_mock" translatable="false">24 minutes</string>
<string name="request_btn_text" translatable="false">REQUEST</string>
<string name="btn_annotation_mock" translatable="false">5 people have sent a request</string>
<string name="content_from1_mock">W 90th St</string>
<string name="content_from2_mock">New York, NY 10025</string>
<string name="content_to1_mock">46th Ave</string>
<string name="content_to2_mock">Woodside, NY 11101</string>
<string name="title_activity_main2">Main2Activity</string>
</resources> </resources>

@ -53,4 +53,32 @@
<item name="android:textColor">@color/text_black</item> <item name="android:textColor">@color/text_black</item>
</style> </style>
<style name="ContentImageBadgeTitle" parent="AppTheme">
<item name="android:alpha">0.5</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">12dp</item>
</style>
<style name="ContentImageBadgeText" parent="AppTheme">
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">20dp</item>
<item name="android:textStyle">bold</item>
</style>
<style name="ContentMainBadgeTitle" parent="AppTheme">
<item name="android:textColor">@color/contentBadgeTitle</item>
<item name="android:textSize">12dp</item>
</style>
<style name="TitleBadgeText" parent="AppTheme">
<item name="android:textColor">@color/titleBadgeText</item>
<item name="android:textSize">20dp</item>
</style>
<style name="TitleBadgeTitle" parent="AppTheme">
<item name="android:textColor">@color/titleBadgeTitle</item>
<item name="android:textSize">12dp</item>
</style>
</resources> </resources>
Loading…
Cancel
Save