@ -0,0 +1,166 @@
|
||||
package com.example.ChatContentPkg;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.cmknowledgegraph.R;
|
||||
import com.loopeer.cardstack.CardStackView;
|
||||
import com.loopeer.cardstack.StackAdapter;
|
||||
|
||||
public class DrugFriendsCardAdapter extends StackAdapter<Integer> {
|
||||
AppCompatActivity appCompatActivity;
|
||||
|
||||
public void setAppCompatActivity(AppCompatActivity appCompatActivity) {
|
||||
this.appCompatActivity = appCompatActivity;
|
||||
}
|
||||
|
||||
public DrugFriendsCardAdapter(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindView(Integer data, int position, CardStackView.ViewHolder holder) {
|
||||
if (holder instanceof ColorItemLargeHeaderViewHolder) {
|
||||
ColorItemLargeHeaderViewHolder h = (ColorItemLargeHeaderViewHolder) holder;
|
||||
h.onBind(data, position);
|
||||
}
|
||||
if (holder instanceof ColorItemWithNoHeaderViewHolder) {
|
||||
ColorItemWithNoHeaderViewHolder h = (ColorItemWithNoHeaderViewHolder) holder;
|
||||
h.onBind(data, position);
|
||||
}
|
||||
if (holder instanceof ColorItemViewHolder) {
|
||||
ColorItemViewHolder h = (ColorItemViewHolder) holder;
|
||||
h.onBind(data, position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CardStackView.ViewHolder onCreateView(ViewGroup parent, int viewType) {
|
||||
View view;
|
||||
switch (viewType) {
|
||||
case R.layout.list_card_item_larger_header:
|
||||
view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_card_item_larger_header, parent, false);
|
||||
// view = getLayoutInflater().inflate(R.layout.list_card_item_larger_header, parent, false);
|
||||
return new ColorItemLargeHeaderViewHolder(view);
|
||||
case R.layout.list_card_item_with_no_header:
|
||||
view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_card_item_with_no_header, parent, false);
|
||||
// view = getLayoutInflater().inflate(R.layout.list_card_item_with_no_header, parent, false);
|
||||
return new ColorItemWithNoHeaderViewHolder(view);
|
||||
default:
|
||||
view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_card_item, parent, false);
|
||||
// view = getLayoutInflater().inflate(R.layout.list_card_item, parent, false);
|
||||
return new ColorItemViewHolder(view);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
// if (position == 6) {//TODO TEST LARGER ITEM
|
||||
// return R.layout.list_card_item_larger_header;
|
||||
// } else if (position == 10) {
|
||||
// return R.layout.list_card_item_with_no_header;
|
||||
// }else {
|
||||
return R.layout.list_card_item;
|
||||
// }
|
||||
}
|
||||
|
||||
//三种ViewHolder
|
||||
public class ColorItemViewHolder extends CardStackView.ViewHolder {
|
||||
View mLayout;
|
||||
View mContainerContent;
|
||||
TextView mTextTitle;
|
||||
|
||||
public ColorItemViewHolder(View view) {
|
||||
super(view);
|
||||
mLayout = view.findViewById(R.id.frame_list_card_item);
|
||||
mContainerContent = view.findViewById(R.id.container_list_content);
|
||||
mTextTitle = (TextView) view.findViewById(R.id.text_list_card_title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemExpand(boolean b) {
|
||||
mContainerContent.setVisibility(b ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void onBind(Integer data, int position) {
|
||||
|
||||
mLayout.getBackground().setColorFilter(ContextCompat.getColor(appCompatActivity, data), PorterDuff.Mode.SRC_IN);
|
||||
mTextTitle.setText("这是分组");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ColorItemWithNoHeaderViewHolder extends CardStackView.ViewHolder {
|
||||
View mLayout;
|
||||
TextView mTextTitle;
|
||||
|
||||
public ColorItemWithNoHeaderViewHolder(View view) {
|
||||
super(view);
|
||||
mLayout = view.findViewById(R.id.frame_list_card_item);
|
||||
mTextTitle = (TextView) view.findViewById(R.id.text_list_card_title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemExpand(boolean b) {
|
||||
}
|
||||
|
||||
public void onBind(Integer data, int position) {
|
||||
mLayout.getBackground().setColorFilter(ContextCompat.getColor(getContext(), data), PorterDuff.Mode.SRC_IN);
|
||||
mTextTitle.setText(String.valueOf(position));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ColorItemLargeHeaderViewHolder extends CardStackView.ViewHolder {
|
||||
View mLayout;
|
||||
View mContainerContent;
|
||||
TextView mTextTitle;
|
||||
|
||||
public ColorItemLargeHeaderViewHolder(View view) {
|
||||
super(view);
|
||||
mLayout = view.findViewById(R.id.frame_list_card_item);
|
||||
mContainerContent = view.findViewById(R.id.container_list_content);
|
||||
mTextTitle = (TextView) view.findViewById(R.id.text_list_card_title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemExpand(boolean b) {
|
||||
mContainerContent.setVisibility(b ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAnimationStateChange(int state, boolean willBeSelect) {
|
||||
super.onAnimationStateChange(state, willBeSelect);
|
||||
if (state == CardStackView.ANIMATION_STATE_START && willBeSelect) {
|
||||
onItemExpand(true);
|
||||
}
|
||||
if (state == CardStackView.ANIMATION_STATE_END && !willBeSelect) {
|
||||
onItemExpand(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void onBind(Integer data, int position) {
|
||||
mLayout.getBackground().setColorFilter(ContextCompat.getColor(getContext(), data), PorterDuff.Mode.SRC_IN);
|
||||
mTextTitle.setText(String.valueOf(position));
|
||||
|
||||
itemView.findViewById(R.id.text_view).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
((CardStackView) itemView.getParent()).performItemClick(ColorItemLargeHeaderViewHolder.this);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.ChatContentPkg;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.example.cmknowledgegraph.R;
|
||||
import com.ramotion.foldingcell.FoldingCell;
|
||||
|
||||
public class internetforum_fragment extends Fragment {
|
||||
public static Fragment newInstance(){return new internetforum_fragment();}
|
||||
FoldingCell foldingCell;
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.internetforumfragment, container, false);
|
||||
foldingCell = view.findViewById(R.id.folding_cell);
|
||||
foldingCell.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
foldingCell.toggle(false);
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.example.HomeContent;
|
||||
|
||||
public class TweetsBean {
|
||||
private int mItemBg;
|
||||
private String mTitle;
|
||||
private int mUserIcon;
|
||||
private String mUserSay;
|
||||
public TweetsBean(int mItemBg, String mTitle, int mUserIcon, String mUserSay){
|
||||
this.mItemBg = mItemBg;//截取图片
|
||||
this.mTitle = mTitle;//标题
|
||||
this.mUserIcon = mUserIcon;
|
||||
this.mUserSay = mUserSay;//摘要
|
||||
}
|
||||
public int getItemBg() {
|
||||
return mItemBg;
|
||||
}
|
||||
|
||||
public void setItemBg(int mItemBg) {
|
||||
this.mItemBg = mItemBg;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return mTitle;
|
||||
}
|
||||
|
||||
public void setTitle(String mTitle) {
|
||||
this.mTitle = mTitle;
|
||||
}
|
||||
|
||||
public int getUserIcon() {
|
||||
return mUserIcon;
|
||||
}
|
||||
|
||||
public void setUserIcon(int mUserIcon) {
|
||||
this.mUserIcon = mUserIcon;
|
||||
}
|
||||
|
||||
public String getUserSay() {
|
||||
return mUserSay;
|
||||
}
|
||||
|
||||
public void setUserSay(String mUserSay) {
|
||||
this.mUserSay = mUserSay;
|
||||
}
|
||||
}
|
@ -1,178 +0,0 @@
|
||||
package com.example.cmknowledgegraph;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
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.ChatContentPkg.RecyclerViewFragment;
|
||||
import com.github.florent37.materialviewpager.MaterialViewPager;
|
||||
import com.github.florent37.materialviewpager.header.HeaderDesign;
|
||||
|
||||
public class tt extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_chat);
|
||||
// Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
// setSupportActionBar(toolbar);
|
||||
//
|
||||
// FloatingActionButton fab = findViewById(R.id.fab);
|
||||
// fab.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View view) {
|
||||
// Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
|
||||
// .setAction("Action", null).show();
|
||||
// }
|
||||
// });
|
||||
// BoomMenuButton bmb = findViewById(R.id.bmb);
|
||||
// for (int i=0;i<bmb.getPiecePlaceEnum().pieceNumber();i++){
|
||||
// SimpleCircleButton.Builder builder = new SimpleCircleButton.Builder()
|
||||
// .normalImageRes(R.drawable.draw1)//设置点开的图片
|
||||
// // 设置阴影
|
||||
//// .shadowEffect(true)
|
||||
//// .shadowOffsetX(20).shadowOffsetY(0)
|
||||
//// .shadowRadius(Util.dp2px(20))
|
||||
//// .shadowCornerRadius(Util.dp2px(20))
|
||||
//// .shadowColor(Color.parseColor("#ee000000"))
|
||||
//// 设置图片
|
||||
//
|
||||
// .highlightedImageRes(R.drawable.draw3)//点开某个按钮后突变的图片
|
||||
// .unableImageRes(R.drawable.draw3)//unable时候的图片
|
||||
// .imageRect(new Rect(Util.dp2px(10), Util.dp2px(10), Util.dp2px(70), Util.dp2px(70)))
|
||||
// .imagePadding(new Rect(0, 0, 0, 0))
|
||||
// .buttonCornerRadius(Util.dp2px(20))
|
||||
//// .unable(true),默认是假的
|
||||
//// 设置按钮样式
|
||||
// ;
|
||||
// bmb.addBuilder(builder);
|
||||
// }
|
||||
// final NavigationTabBar navigationTabBar = (NavigationTabBar) findViewById(R.id.ntb);
|
||||
// final ArrayList<NavigationTabBar.Model> models = new ArrayList<>();
|
||||
// models.add(
|
||||
// new NavigationTabBar.Model.Builder(
|
||||
// getResources().getDrawable(R.drawable.draw3),
|
||||
// Color.parseColor("red")
|
||||
// ).title("论坛").badgeTitle("NTB").build());
|
||||
// models.add(
|
||||
// new NavigationTabBar.Model.Builder(
|
||||
// getResources().getDrawable(R.drawable.draw1),
|
||||
// Color.parseColor("blue")
|
||||
// ).title("drug").badgeTitle("drug").build()
|
||||
// );
|
||||
// navigationTabBar.setModels(models);
|
||||
// ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
|
||||
// viewPager.setAdapter(new PagerAdapter() {
|
||||
// @Override
|
||||
// public int getCount() {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
// navigationTabBar.setViewPager(viewPager,2);
|
||||
// navigationTabBar.setTitleMode(NavigationTabBar.TitleMode.ACTIVE);
|
||||
// navigationTabBar.setBadgeGravity(NavigationTabBar.BadgeGravity.BOTTOM);
|
||||
// navigationTabBar.setBadgePosition(NavigationTabBar.BadgePosition.CENTER);
|
||||
//
|
||||
// navigationTabBar.setIsBadged(true);
|
||||
// navigationTabBar.setIsTitled(true);
|
||||
// navigationTabBar.setIsTinted(true);
|
||||
// navigationTabBar.setIsBadgeUseTypeface(true);
|
||||
// navigationTabBar.setBadgeBgColor(Color.RED);
|
||||
// navigationTabBar.setBadgeTitleColor(Color.WHITE);
|
||||
// navigationTabBar.setIsSwiped(true);
|
||||
// navigationTabBar.setBgColor(Color.BLACK);
|
||||
// navigationTabBar.setBadgeSize(10);
|
||||
// navigationTabBar.setTitleSize(10);
|
||||
// navigationTabBar.setIconSizeFraction((float) 0.5);
|
||||
//得到MaterviewPager实例
|
||||
MaterialViewPager materialViewPager = (MaterialViewPager) findViewById(R.id.materialViewPager);
|
||||
//为MaterialViewPager添加监听
|
||||
materialViewPager.setMaterialViewPagerListener(new MaterialViewPager.Listener() {
|
||||
@Override
|
||||
public HeaderDesign getHeaderDesign(int page) {
|
||||
switch (page){
|
||||
case 0:
|
||||
return HeaderDesign.fromColorResAndUrl(
|
||||
R.color.blue,
|
||||
getResources().getDrawable(R.drawable.draw1).toString()
|
||||
);
|
||||
case 1:
|
||||
return HeaderDesign.fromColorResAndUrl(
|
||||
R.color.green,
|
||||
getResources().getDrawable(R.drawable.draw2).toString()
|
||||
);
|
||||
case 2:
|
||||
return HeaderDesign.fromColorResAndUrl(
|
||||
R.color.cyan,
|
||||
getResources().getDrawable(R.drawable.draw3).toString()
|
||||
);
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
//设置Toolbar
|
||||
Toolbar toolbar = materialViewPager.getToolbar();
|
||||
if(toolbar!=null){
|
||||
setSupportActionBar(toolbar);
|
||||
ActionBar actionBar = 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(getSupportFragmentManager()) {
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
switch (position % 3){
|
||||
case 0:
|
||||
return RecyclerViewFragment.newInstance();
|
||||
default:
|
||||
return RecyclerViewFragment.newInstance();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
switch (position % 3){
|
||||
case 0:
|
||||
return "TAP1";
|
||||
default:
|
||||
return "TAPN";
|
||||
}
|
||||
}
|
||||
});
|
||||
materialViewPager.getViewPager().setOffscreenPageLimit(materialViewPager
|
||||
.getViewPager().getAdapter().getCount());
|
||||
materialViewPager.getPagerTitleStrip().setViewPager(materialViewPager.getViewPager());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="800"
|
||||
android:fromDegrees="0.0"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:pivotX="50.0%"
|
||||
android:pivotY="50.0%"
|
||||
|
||||
android:repeatCount="infinite"
|
||||
android:toDegrees="-360.0" />
|
||||
<!-- // 设置动画持续时间-->
|
||||
<!-- // 设置动画开始时的角度-->
|
||||
<!-- // 设置动画相对于控件的x坐标的位置-->
|
||||
<!-- 设置动画相对于控件的y坐标的位置-->
|
||||
<!-- 设置无线循环-->
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="800"
|
||||
android:fromDegrees="0.0"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:pivotX="50.0%"
|
||||
android:pivotY="50.0%"
|
||||
|
||||
android:repeatCount="infinite"
|
||||
android:toDegrees="360.0" />
|
||||
<!-- // 设置动画持续时间-->
|
||||
<!-- // 设置动画开始时的角度-->
|
||||
<!-- // 设置动画相对于控件的x坐标的位置-->
|
||||
<!-- 设置动画相对于控件的y坐标的位置-->
|
||||
<!-- 设置无线循环-->
|
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 217 KiB |
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="20dp"/>
|
||||
|
||||
<solid android:color="@android:color/holo_blue_bright"/>
|
||||
|
||||
</shape>
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--对应于CardView的每个Item-->
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_list_card_item"
|
||||
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="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:stackHeaderHeight="100dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_list_card_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:background="@drawable/van">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_list_card_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:textColor="#fff"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="12"/>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_list_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -1,6 +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="match_parent"
|
||||
/>
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
@ -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="match_parent">
|
||||
<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/draw7"/>
|
||||
<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,96 @@
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="260dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="5dp"
|
||||
app:elevation="10dp"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
//文章截取图片
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/img_bg_Cadview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/rela_bottom"
|
||||
app:cardCornerRadius="7dp">
|
||||
<ImageView
|
||||
android:id="@+id/img_bg"
|
||||
android:layout_width="200dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_above="@+id/rela_bottom"
|
||||
/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
//文字部分
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="jaja\n这个是文字部分"
|
||||
android:layout_toRightOf="@+id/img_bg_Cadview"
|
||||
android:layout_marginBottom="56dp"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:textColor="@color/colorPrimaryDark"
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
|
||||
//底部头像部分,还有个性签名吧
|
||||
<RelativeLayout
|
||||
android:id="@+id/rela_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@android:color/white"
|
||||
>
|
||||
<!-- 头像-->
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/img_user"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
app:civ_border_overlay="true"
|
||||
|
||||
android:elevation="3dp"
|
||||
|
||||
/>
|
||||
|
||||
<!-- 标题-->
|
||||
<TextView
|
||||
android:id="@+id/text_item_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/darker_gray"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textSize="30sp"
|
||||
android:text="Title"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/img_user"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
|
||||
<!-- 菜单-->
|
||||
</RelativeLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="#b2b2b2"
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_list_card_item"
|
||||
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="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:stackHeaderHeight="90dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_list_card_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/shape_rectangle_with_radius">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_list_card_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="12"/>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_list_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:text="Every corner must (initially) be provided a corner radius greater than 1, or else no corners are rounded. If you want specific corners to not be rounded, a work-around is to use android:radius to set a default corner radius greater than 1, but then override each and every corner with the values you really want, providing zero (0dp) where you don't want rounded corners."
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_list_card_item"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:stackHeaderHeight="70dp"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_list_card_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/shape_rectangle_with_radius">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_list_card_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="12"
|
||||
android:textSize="40sp"
|
||||
android:layout_margin="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/white"/>
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/container_list_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="60dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:text="kdi"
|
||||
/>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_list_card_item"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_list_card_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/shape_rectangle_with_radius">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_list_card_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="12"/>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,34 @@
|
||||
<RelativeLayout android:layout_width="match_parent"
|
||||
android:layout_height="280dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_below="@+id/scrolling_background_home"
|
||||
android:layout_marginTop="3dp"
|
||||
|
||||
android:background="@android:color/white"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardCornerRadius="7dp"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
app:cardBackgroundColor="#e0e0e0">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<!-- 喜欢或者不喜欢-->
|
||||
|
||||
<com.example.HomeContent.SmileView
|
||||
android:id="@+id/smile_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="-41dp"/>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</RelativeLayout>
|