home and chat personal_activity update frame ongbo

ongbodev
ongbo 6 years ago
parent 5b89bc21a5
commit 93d6ab44d4

@ -80,8 +80,8 @@ public class SlideFragment extends Fragment {
listData = new ArrayList<TweetsBean>(); listData = new ArrayList<TweetsBean>();
//最上面的滚动动画 //最上面的滚动动画
//初始化header //初始化header
ScrollingImageView scrollingImageView = (ScrollingImageView) rootView.findViewById(R.id.scrolling_background); // ScrollingImageView scrollingImageView = (ScrollingImageView) rootView.findViewById(R.id.scrolling_background);
scrollingImageView.start(); // scrollingImageView.start();
//表情那一块最热门推送top6 //表情那一块最热门推送top6
xRecyclerView_home = (XRecyclerView) rootView.findViewById(R.id.home_XRecyclerView); xRecyclerView_home = (XRecyclerView) rootView.findViewById(R.id.home_XRecyclerView);
@ -206,12 +206,12 @@ public class SlideFragment extends Fragment {
"Whatever is worth doing is worth doing well.", "Whatever is worth doing is worth doing well.",
}; };
int[] bgs = { int[] bgs = {
R.mipmap.img_slide_1, R.drawable.draw9,
R.mipmap.img_slide_2, R.drawable.draw10,
R.mipmap.img_slide_3, R.drawable.draw6,
R.mipmap.img_slide_4, R.drawable.draw7,
R.mipmap.img_slide_5, R.drawable.draw7,
R.mipmap.img_slide_6 R.drawable.draw12
}; };
if(flag==1||flag==2) if(flag==1||flag==2)
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {

@ -23,10 +23,10 @@
<com.google.android.material.bottomnavigation.BottomNavigationView <com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view" android:id="@+id/nav_view"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="40dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginEnd="0dp" android:layout_marginEnd="0dp"
android:background="#c0c0c0" android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"

@ -27,35 +27,37 @@
android:id="@+id/person_relativeLayout" android:id="@+id/person_relativeLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/white"> android:background="@color/white"
>
<!-- 将整个背景作为背景--> <!-- 将整个背景作为背景-->
<!-- <ImageView--> <!-- <ImageView-->
<!-- android:id="@+id/iv_blur"--> <!-- android:id="@+id/iv_blur"-->
<!-- android:layout_width="match_parent"--> <!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"--> <!-- android:layout_height="match_parent"-->
<!-- android:scaleType="fitXY"--> <!-- android:scaleType="fitXY"-->
<!-- app:layout_anchorGravity="center" />--> <!-- app:layout_anchorGravity="center"-->
<!-- android:background="@drawable/draw12"/>-->
<com.skyfishjy.library.RippleBackground <com.skyfishjy.library.RippleBackground
android:id="@+id/linearcontent" android:id="@+id/linearcontent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="450dp" android:layout_height="260dp"
android:background="@drawable/draw12"
app:rb_color="#808080" app:rb_color="#808080"
app:rb_duration="6000" app:rb_duration="6000"
app:rb_radius="60dp" app:rb_radius="60dp"
app:rb_rippleAmount="6" app:rb_rippleAmount="6"
app:rb_type="strokeRipple" app:rb_type="strokeRipple"
android:background="@drawable/draw12"
app:rb_scale="6"> app:rb_scale="6">
//头像 //头像
<de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto" <de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/iv_avatar" android:id="@+id/iv_avatar"
android:layout_width="180dp" android:layout_width="120dp"
android:layout_height="180dp" android:layout_height="120dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
app:civ_border_color="#FF000000" app:civ_border_color="#d0d0d0"
app:civ_border_width="2dp" /> app:civ_border_width="1dp" />
//用户名 //用户名
<TextView <TextView
@ -67,55 +69,7 @@
android:layout_marginTop="-30dp" android:layout_marginTop="-30dp"
android:text="未登录" android:text="未登录"
android:textSize="20sp" /> android:textSize="20sp" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/user_name_person"
android:layout_marginTop="90dp"
android:layout_marginLeft="20dp"
android:background="@color/colorTransparent">
<ImageView
android:id="@+id/sex_personimg"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/boy"/>
<ImageView
android:id="@+id/age_personimg"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignTop="@+id/sex_personimg"
android:layout_marginTop="40dp"
android:src="@drawable/child"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="16岁"
android:layout_alignLeft="@+id/age_personimg"
android:layout_marginLeft="40dp"
android:layout_alignTop="@+id/sex_persontext"
android:layout_marginTop="44dp"
android:textSize="18dp"
android:id="@+id/age_persontext"/>
<ImageView
android:id="@+id/address_personimg"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignTop="@+id/age_personimg"
android:layout_marginTop="40dp"
android:src="@drawable/region"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/address_personimg"
android:layout_marginLeft="40dp"
android:layout_alignTop="@+id/sex_persontext"
android:layout_marginTop="85dp"
android:textSize="18dp"
android:text="湖南省"
android:id="@+id/address_persontext"/>
</RelativeLayout>
<de.hdodenhof.circleimageview.CircleImageView <de.hdodenhof.circleimageview.CircleImageView
android:layout_width="65dp" android:layout_width="65dp"
android:layout_height="65dp" android:layout_height="65dp"
@ -131,32 +85,36 @@
</com.skyfishjy.library.RippleBackground> </com.skyfishjy.library.RippleBackground>
<ImageView <ImageView
android:id="@+id/person_gexingqianming" android:id="@+id/person_gexingqianming"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_alignBottom="@+id/linearcontent" android:layout_alignBottom="@+id/linearcontent"
android:layout_marginBottom="80dp" android:layout_marginBottom="40dp"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:src="@drawable/draw13"/> android:src="@drawable/draw13"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/gexingqianming"
android:layout_alignLeft="@+id/person_gexingqianming" android:layout_alignLeft="@+id/person_gexingqianming"
android:layout_marginLeft="60dp" android:layout_marginLeft="60dp"
android:layout_alignBottom="@+id/linearcontent" android:layout_alignBottom="@+id/linearcontent"
android:textSize="14dp" android:textSize="14dp"
android:layout_marginBottom="86dp" android:layout_marginBottom="46dp"
android:text="改写写什么呢???"/> android:text="改写写什么呢???"/>
<!-- 设置几个选项-->
设置几个选项
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/person_cardview" android:id="@+id/person_cardview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:cardBackgroundColor="#d0d0d0" app:cardBackgroundColor="@color/white"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginTop="-70dp" android:layout_marginTop="-40dp"
app:cardCornerRadius="10dp" app:cardCornerRadius="10dp"
app:cardElevation="20dp" app:cardElevation="20dp"
app:cardMaxElevation="20dp" app:cardMaxElevation="20dp"
@ -178,6 +136,7 @@
android:id="@+id/diet_hobby" android:id="@+id/diet_hobby"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp"
android:src="@drawable/mushroom" android:src="@drawable/mushroom"
app:civ_border_width="0dp" /> app:civ_border_width="0dp" />
<TextView <TextView

@ -7,42 +7,47 @@
android:background="#e0e0e0" android:background="#e0e0e0"
xmlns:blurkit="http://schemas.android.com/apk/res-auto"> xmlns:blurkit="http://schemas.android.com/apk/res-auto">
<!-- health is running 图标 --> <!-- health is running 图标 这是一个滚动动画,暂时不要了 -->
<FrameLayout <!-- <FrameLayout-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="70dp" <!-- android:layout_height="70dp"-->
android:background="#808080" <!-- android:background="#808080"-->
android:id="@+id/scrolling_background_home" <!-- android:id="@+id/scrolling_background_home"-->
> <!-- >-->
<com.q42.android.scrollingimageview.ScrollingImageView
android:id="@+id/scrolling_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:background="#808080"
scrolling_image_view:speed="1dp"
scrolling_image_view:src="@drawable/scrolling_background" />
<com.q42.android.scrollingimageview.ScrollingImageView <!-- <com.q42.android.scrollingimageview.ScrollingImageView-->
android:id="@+id/scrolling_foreground" <!-- android:id="@+id/scrolling_background"-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_marginTop="15dp" <!-- android:layout_height="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_marginTop="15dp"-->
android:background="#808080" <!-- android:background="#808080"-->
scrolling_image_view:speed="2.5dp" <!-- scrolling_image_view:speed="1dp"-->
scrolling_image_view:src="@drawable/scrolling_foreground" /> <!-- scrolling_image_view:src="@drawable/scrolling_background" />-->
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:background="#808080"
android:layout_marginTop="40dp"
android:src="@drawable/van"/>
</FrameLayout>
<!-- <com.q42.android.scrollingimageview.ScrollingImageView-->
<!-- android:id="@+id/scrolling_foreground"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_marginTop="15dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:background="#808080"-->
<!-- scrolling_image_view:speed="2.5dp"-->
<!-- scrolling_image_view:src="@drawable/scrolling_foreground" />-->
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="0dp"-->
<!-- android:background="#808080"-->
<!-- android:layout_marginTop="40dp"-->
<!-- android:src="@drawable/van"/>-->
<!-- </FrameLayout>-->
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="57dp"
android:id="@+id/scrolling_background_home"
scrolling_image_view:cardElevation="10dp"
/>
<com.jcodecraeer.xrecyclerview.XRecyclerView <com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/home_XRecyclerView" android:id="@+id/home_XRecyclerView"

@ -1,15 +1,24 @@
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="260dp" android:layout_height="260dp"
android:layout_marginLeft="5dp" android:layout_marginLeft="1dp"
android:layout_marginRight="5dp" android:layout_marginRight="1dp"
android:layout_marginTop="10dp" android:layout_marginTop="5dp"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
app:cardCornerRadius="10dp" app:cardCornerRadius="5dp"
app:cardElevation="5dp" app:cardElevation="4dp"
app:elevation="10dp" app:elevation="10dp"
> >
<!--
*****
***
这个是控制首页推文的一些布局文件
****
**
-->
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">

@ -2,7 +2,7 @@
android:layout_height="280dp" android:layout_height="280dp"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_below="@+id/scrolling_background_home" android:layout_below="@+id/scrolling_background_home"
android:layout_marginTop="3dp" android:layout_marginTop="1dp"
android:background="@android:color/white" android:background="@android:color/white"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
@ -27,7 +27,7 @@
android:id="@+id/smile_view" android:id="@+id/smile_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginBottom="-41dp"/> android:layout_marginBottom="-67dp"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

Loading…
Cancel
Save