@ -0,0 +1,155 @@
|
||||
package com.example.PersonalCenter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.example.PersonalCenter.Login_Register.LoginActivity;
|
||||
import com.example.Util.User;
|
||||
import com.example.cmknowledgegraph.MainActivity;
|
||||
import com.example.cmknowledgegraph.R;
|
||||
import com.github.florent37.materialviewpager.MaterialViewPager;
|
||||
import com.github.florent37.materialviewpager.header.HeaderDesign;
|
||||
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
|
||||
public class MyPersonCenter extends Fragment {
|
||||
private CircleImageView iv_avatar;
|
||||
private TextView iv_avatar_username;
|
||||
|
||||
|
||||
MainActivity mainActivity;
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
this.mainActivity = (MainActivity) context;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.chat_content, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
//包装处理逻辑
|
||||
//得到MaterViewPager实例
|
||||
iv_avatar = mainActivity.findViewById(R.id.iv_avatar);
|
||||
iv_avatar_username = mainActivity.findViewById(R.id.iv_avatar_username);
|
||||
iv_avatar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(!User.isLogin){
|
||||
Intent intent=new Intent();
|
||||
intent.setClass(getActivity(), LoginActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
MaterialViewPager materialViewPager = (MaterialViewPager) getActivity().findViewById(R.id.materialViewPager);
|
||||
//为MaterialViewPager添加监听
|
||||
materialViewPager.setMaterialViewPagerListener(new MaterialViewPager.Listener() {
|
||||
@Override
|
||||
//设置转换动画和图片,颜色
|
||||
public HeaderDesign getHeaderDesign(int page) {
|
||||
switch (page){
|
||||
case 0:
|
||||
return HeaderDesign.fromColorResAndDrawable(
|
||||
R.color.blue,
|
||||
getResources().getDrawable(R.drawable.xiha1)
|
||||
);
|
||||
case 1:
|
||||
return HeaderDesign.fromColorResAndDrawable(
|
||||
R.color.green,
|
||||
getResources().getDrawable(R.drawable.xiha2)
|
||||
);
|
||||
case 2:
|
||||
return HeaderDesign.fromColorResAndDrawable(
|
||||
R.color.cyan,
|
||||
getResources().getDrawable(R.drawable.xiha3)
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
//设置Toolbar
|
||||
Toolbar toolbar = materialViewPager.getToolbar();
|
||||
if(toolbar!=null){
|
||||
mainActivity.setSupportActionBar(toolbar);
|
||||
ActionBar actionBar = mainActivity.getSupportActionBar();
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setDisplayShowHomeEnabled(true);
|
||||
actionBar.setDisplayShowTitleEnabled(true);
|
||||
actionBar.setDisplayUseLogoEnabled(false);
|
||||
actionBar.setHomeButtonEnabled(true);
|
||||
}
|
||||
//为Viewpager设置适配器
|
||||
ViewPager viewPager = materialViewPager.getViewPager();
|
||||
viewPager.setAdapter(new FragmentStatePagerAdapter(getChildFragmentManager()) {
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
switch (position % 3){
|
||||
case 0:
|
||||
return RecyclerViewFragment.newInstance(0,mainActivity);
|
||||
case 1:
|
||||
return RecyclerViewFragmentINFO.newInstance(1,mainActivity);
|
||||
case 2:
|
||||
return RecyclerViewFragment.newInstance(1,mainActivity);
|
||||
default:
|
||||
return RecyclerViewFragment.newInstance(1,mainActivity);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
switch (position % 3){
|
||||
case 0:
|
||||
return "DYNAMIC";
|
||||
case 1:
|
||||
return "INFO";
|
||||
case 2:
|
||||
return "药友";
|
||||
default:
|
||||
return "TAPN";
|
||||
}
|
||||
}
|
||||
});
|
||||
materialViewPager.getViewPager().setOffscreenPageLimit(materialViewPager
|
||||
.getViewPager().getAdapter().getCount());
|
||||
materialViewPager.getPagerTitleStrip().setViewPager(materialViewPager.getViewPager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if(User.isLogin){
|
||||
|
||||
iv_avatar_username.setText("Hello"+User.getUser().getUsername());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package com.example.PersonalCenter;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.cmknowledgegraph.R;
|
||||
import com.loopeer.cardstack.CardStackView;
|
||||
import com.ramotion.foldingcell.FoldingCell;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class RecyclerViewPagerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
List<Object> contents;
|
||||
int flag;
|
||||
AppCompatActivity appCompatActivity;
|
||||
|
||||
public void setAppCompatActivity(AppCompatActivity appCompatActivity) {
|
||||
this.appCompatActivity = appCompatActivity;
|
||||
}
|
||||
|
||||
public RecyclerViewPagerAdapter(List<Object> contents, int flag)
|
||||
{
|
||||
this.flag = flag;
|
||||
this.contents = contents;
|
||||
}
|
||||
public int getItemCount() {
|
||||
return contents.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
|
||||
View view = null;
|
||||
switch (flag){
|
||||
case 0://论坛
|
||||
view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.cell, parent, false);
|
||||
//
|
||||
// view = LayoutInflater.from(parent.getContext()).inflate(R.layout.drug_friends,parent,false);
|
||||
FoldingCell foldingCell = view.findViewById(R.id.folding_cell_new);
|
||||
foldingCell.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
foldingCell.toggle(false);
|
||||
}
|
||||
});
|
||||
return new RecyclerView.ViewHolder(view) {
|
||||
};
|
||||
|
||||
|
||||
case 1://动态
|
||||
view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.personinfomain, parent, false);
|
||||
|
||||
return new RecyclerView.ViewHolder(view) {
|
||||
|
||||
|
||||
};
|
||||
|
||||
case 2://好友列表
|
||||
view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.content_cardview, parent, false);
|
||||
|
||||
return new RecyclerView.ViewHolder(view) {
|
||||
};
|
||||
//
|
||||
|
||||
}
|
||||
return null;
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
|
||||
//在这里设置某一个条目的监听
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1011 B |
After Width: | Height: | Size: 614 B |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 6.4 KiB |
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>
|
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
这个xml文件是chat区的总体页面
|
||||
-->
|
||||
<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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".MainActivity"
|
||||
tools:showIn="@layout/activity_main">
|
||||
<com.github.florent37.materialviewpager.MaterialViewPager
|
||||
android:id="@+id/materialViewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:viewpager_logo="@layout/header_logo"
|
||||
app:viewpager_logoMarginTop="100dp"
|
||||
app:viewpager_color="@color/colorPrimary"
|
||||
app:viewpager_headerHeight="300dp"
|
||||
app:viewpager_headerAlpha="1.0"
|
||||
app:viewpager_hideLogoWithFade="false"
|
||||
app:viewpager_hideToolbarAndTitle="true"
|
||||
app:viewpager_enableToolbarElevation="true"
|
||||
app:viewpager_parallaxHeaderFactor="1.5"
|
||||
app:viewpager_headerAdditionalHeight="20dp"
|
||||
app:viewpager_displayToolbarWhenSwipe="true"
|
||||
app:viewpager_transparentToolbar="true"
|
||||
app:viewpager_animatedHeaderImage="true"
|
||||
app:viewpager_disableToolbar="false">
|
||||
|
||||
</com.github.florent37.materialviewpager.MaterialViewPager>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,27 @@
|
||||
<?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="#000000"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
android:clickable="true"
|
||||
app:contentPadding="0dp">
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</FrameLayout>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:folding-cell="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.ramotion.foldingcell.FoldingCell
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/folding_cell"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/cardMarginVertical"
|
||||
android:layout_marginLeft="@dimen/cardMarginHorizontal"
|
||||
android:layout_marginRight="@dimen/cardMarginHorizontal"
|
||||
android:layout_marginTop="@dimen/cardMarginVertical"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:elevation="0dp"
|
||||
folding-cell:animationDuration="1000"
|
||||
folding-cell:backSideColor="@color/blue"
|
||||
folding-cell:additionalFlipsCount="15">
|
||||
|
||||
<!-- 展开后-->
|
||||
<FrameLayout
|
||||
android:id="@+id/cell_content_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/holo_green_dark"
|
||||
android:visibility="gone">
|
||||
<!-- 头像-->
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/van"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="80dp"
|
||||
android:text="这是展开后"/>
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginTop="180dp"
|
||||
android:src="@drawable/home_back_1"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1300dp"
|
||||
android:text="这是展开后"/>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="250dp"-->
|
||||
<!-- android:text="jkadiekeieii"-->
|
||||
<!-- android:textColor="@color/white"/>-->
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 展开前-->
|
||||
<FrameLayout
|
||||
android:id="@+id/cell_title_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/van"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="90dp"
|
||||
|
||||
android:text="这是未展开前"></TextView>
|
||||
</FrameLayout>
|
||||
|
||||
</com.ramotion.foldingcell.FoldingCell>
|
||||
</LinearLayout>
|
@ -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>
|
@ -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>
|