personal viewpager update third

ongbodev
ongbo 6 years ago
parent 68abe66553
commit 48545bca10

@ -68,8 +68,18 @@ dependencies {
implementation "com.hanks:htextview-base:0.1.6"
implementation "com.hanks:htextview-scale:0.1.6"
implementation "com.hanks:htextview-rainbow:0.1.6"
//
implementation 'devlight.io:navigationtabbar:1.2.5'
//Canlendar
implementation 'com.github.prolificinteractive:material-calendarview:1.6.0'
implementation 'jp.wasabeef:glide-transformations:4.1.0'
compileOnly "jp.co.cyberagent.android:gpuimage:2.0.3"
//
// implementation 'com.squareup.picasso:picasso:2.71828'
}

@ -1,41 +0,0 @@
package com.example.HomeContent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import com.example.cmknowledgegraph.R;
public class MainContent extends Fragment {
protected int res;
private RecyclerView rvFeed;
AppCompatActivity appCompatActivity;
public AppCompatActivity getAppCompatActivity() {
return appCompatActivity;
}
public void setAppCompatActivity(AppCompatActivity appCompatActivity) {
this.appCompatActivity = appCompatActivity;
}
//创建视图
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate( R.layout.activity_home, container, false ); //要加载的layout文件
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
}

@ -23,7 +23,7 @@ import com.example.cmknowledgegraph.R;
import java.util.ArrayList;
import java.util.List;
//这个是home的Fragment
public class SlideFragment extends Fragment {
private static final String TAG = "SlideFragment";
private RecyclerView mRecyclerView;

@ -18,17 +18,29 @@ import android.widget.LinearLayout;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
/**
* Created by mxn on 2016/12/13.
*
* MenuListFragment
* FragmentFragment
*/
public class MenuListFragment extends Fragment {
private ImageView ivMenuUserProfilePhoto;
public AppCompatActivity appCompatActivity;
public void setAppCompatActivity(AppCompatActivity appCompatActivity) {
this.appCompatActivity = appCompatActivity;
}
public AppCompatActivity getAppCompatActivity() {
return appCompatActivity;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -37,14 +49,23 @@ public class MenuListFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_menu, container,
false);
View view = inflater.inflate(R.layout.fragment_menu, container,false);
Log.i("view==","=="+view.toString()+"==");
NavigationView linearLayout = view.findViewById(R.id.vNavigation);
View frameLayout = linearLayout.inflateHeaderView(R.layout.view_global_menu_header);
ivMenuUserProfilePhoto = (ImageView) frameLayout.findViewById(R.id.ivMenuUserProfilePhoto);
//获取基本的菜单xml
NavigationView linearLayout = (NavigationView) view.findViewById(R.id.vNavigation);
View headview = linearLayout.getHeaderView(0);
//获取菜单头
//获取菜单头
//获取用户的头像
ivMenuUserProfilePhoto = (ImageView) headview.findViewById(R.id.ivMenuUserProfilePhoto);
Log.i("ismenu---===","====)"+ivMenuUserProfilePhoto.toString());
NavigationView vNavigation = (NavigationView) view.findViewById(R.id.vNavigation);
//设置某个菜单呗选中
vNavigation.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
@ -58,19 +79,16 @@ public class MenuListFragment extends Fragment {
private void setupHeader() {
int avatarSize = getResources().getDimensionPixelSize(R.dimen.global_menu_avatar_size);
String profilePhoto = getResources().getString(R.string.user_profile_photo);
//在这里加载对应的图片信息
// Picasso.with(getActivity())
// .load(R.drawable.draw1)
// .placeholder(R.drawable.img_circle_placeholder)
// .resize(avatarSize, avatarSize)
// .centerCrop()
// .transform(new CircleTransformation())
// .into(ivMenuUserProfilePhoto);
Picasso.with(getActivity())
/*
*
* */
Picasso.with(getAppCompatActivity())
.load(R.drawable.draw1)
.placeholder(R.drawable.img_circle_placeholder)
// .placeholder(R.drawable.img_circle_placeholder)
.into(ivMenuUserProfilePhoto);
avatarOnclickListener headerListener = new avatarOnclickListener(getAppCompatActivity(),this);
ivMenuUserProfilePhoto.setOnClickListener(headerListener);
}
}

@ -26,16 +26,24 @@ import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.example.PersonalCenter.FeedAdapter;
import com.example.PersonalCenter.MenuListFragment;
import com.example.cmknowledgegraph.MainActivity;
import com.example.cmknowledgegraph.R;
import com.hanks.htextview.rainbow.RainbowTextView;
import com.mxn.soul.flowingdrawer_core.ElasticDrawer;
import com.mxn.soul.flowingdrawer_core.FlowingDrawer;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Request;
import org.w3c.dom.Text;
import java.util.ArrayList;
import devlight.io.library.ntb.NavigationTabBar;
import jp.wasabeef.glide.transformations.BlurTransformation;
import yalantis.com.sidemenu.interfaces.Resourceble;
import yalantis.com.sidemenu.interfaces.ScreenShotable;
import yalantis.com.sidemenu.util.ViewAnimator;
@ -79,61 +87,111 @@ public class PersonContent extends Fragment {
mDrawer = (FlowingDrawer) appCompatActivity.findViewById(R.id.drawerlayout);
mDrawer.setTouchMode(ElasticDrawer.TOUCH_MODE_BEZEL);
//设置工具栏
setupToolbar();
// setupToolbar();
setuptoolbar();
//设置直接页面
// setupFeed();
setupViewpager();
//设置侧滑菜单
setupMenu();
}
protected void setupToolbar() {
Toolbar toolbar = (Toolbar) appCompatActivity.findViewById(R.id.toolbar);
appCompatActivity.setSupportActionBar(toolbar);
//这里是图片,可以将其动态加载用户图片,如果没有登录就改成别的。
toolbar.setNavigationIcon(R.drawable.ic_menu_white);
//点击了就开始侧滑
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
protected void setuptoolbar(){
//分别设置背景和头像
ImageView blurimageView = (ImageView) appCompatActivity.findViewById(R.id.iv_blur);
ImageView avatarImageView = (ImageView) appCompatActivity.findViewById(R.id.iv_avatar);
Glide.with(appCompatActivity).load(R.drawable.draw7)
.apply(RequestOptions.bitmapTransform(new BlurTransformation(25,3))).into(blurimageView);
Glide.with(appCompatActivity).load(R.drawable.draw6).into(avatarImageView);
//用户名
final TextView rainbowTextView = (TextView) appCompatActivity.findViewById(R.id.user_name_person);
rainbowTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mDrawer.toggleMenu();
}
});
avatarOnclickListener avatarOnclickListener = new avatarOnclickListener(getAppCompatActivity(),this);
avatarImageView.setOnClickListener(avatarOnclickListener);
}
//
//设置没有侧滑之前的状态页面
//在这里将东西其改成几个按钮
private void setupViewpager(){
/*
*
* */
viewPager.setAdapter(new PagerAdapter() {
//设置菜单栏个数
@Override
public int getCount() {
return 8;
return 5;
}
@Override
public boolean isViewFromObject(final View view, final Object object) {
return view.equals(object);
}
//移除某一个
@Override
public void destroyItem(final View container, final int position, final Object object) {
((ViewPager) container).removeView((View) object);
}
/*
*
*
* */
@Override
public Object instantiateItem(final ViewGroup container, final int position) {
//每个position代表一个菜单根据position来设置不同视图
//
switch (position){
case 0:
//饮食爱好
case 1:
//日历
View view = setCanlendar();
container.addView(view);
return view;
case 2:
//消息通知
case 3:
//我的文章
case 4:
//养生推荐
}
//这是默认的,不要管,因为上面必须有个返回值
final View view = LayoutInflater.from(
appCompatActivity.getBaseContext()).inflate(R.layout.item_vp, null, false);
final TextView txtPage = (TextView) view.findViewById(R.id.txt_vp_item_page);
txtPage.setText(String.format("Page #%d", position));
container.addView(view);
return view;
}
//设置日历
public View setCanlendar(){
final View view = LayoutInflater.from(
appCompatActivity.getBaseContext()
).inflate(R.layout.canlendar_layout, null, false);
return view;
}
//设置饮食爱好
public View setfoodhobby(){
return null;
}
});
/*
*
* */
//每个菜单选取了不同的颜色
final String[] colors = getResources().getStringArray(R.array.vertical_ntb);
//这里菜单栏选取的是NavigationTabBar
final NavigationTabBar navigationTabBar = (NavigationTabBar) appCompatActivity.findViewById(R.id.ntb_vertical);
//这里用来加载每个model可以设置几个菜单
final ArrayList<NavigationTabBar.Model> models = new ArrayList<>();
models.add(
new NavigationTabBar.Model.Builder(
@ -175,53 +233,45 @@ public class PersonContent extends Fragment {
.title("ic_fifth")
.build()
);
models.add(
new NavigationTabBar.Model.Builder(
getResources().getDrawable(R.drawable.ic_sixth),
Color.parseColor(colors[5]))
.selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
.title("ic_sixth")
.build()
);
models.add(
new NavigationTabBar.Model.Builder(
getResources().getDrawable(R.drawable.ic_seventh),
Color.parseColor(colors[6]))
.selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
.title("ic_seventh")
.build()
);
models.add(
new NavigationTabBar.Model.Builder(
getResources().getDrawable(R.drawable.ic_eighth),
Color.parseColor(colors[7]))
.selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
.title("ic_eighth")
.build()
);
// models.add(
// new NavigationTabBar.Model.Builder(
// getResources().getDrawable(R.drawable.ic_sixth),
// Color.parseColor(colors[5]))
// .selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
// .title("ic_sixth")
// .build()
// );
// models.add(
// new NavigationTabBar.Model.Builder(
// getResources().getDrawable(R.drawable.ic_seventh),
// Color.parseColor(colors[6]))
// .selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
// .title("ic_seventh")
// .build()
// );
// models.add(
// new NavigationTabBar.Model.Builder(
// getResources().getDrawable(R.drawable.ic_eighth),
// Color.parseColor(colors[7]))
// .selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
// .title("ic_eighth")
// .build()
// );
//设置菜单
navigationTabBar.setModels(models);
navigationTabBar.setViewPager(viewPager, 4);
//设置每个子菜单对一个的viewpager
navigationTabBar.setViewPager(viewPager, 0);
}
// private void setupFeed() {
// LinearLayoutManager linearLayoutManager = new LinearLayoutManager(appCompatActivity) {
// @Override
// protected int getExtraLayoutSpace(RecyclerView.State state) {
// return 300;
// }
// };
// rvFeed.setLayoutManager(linearLayoutManager);
// FeedAdapter feedAdapter = new FeedAdapter(appCompatActivity);
// rvFeed.setAdapter(feedAdapter);
// feedAdapter.updateItems();
// }
//设置菜单
private void setupMenu() {
FragmentManager fm = appCompatActivity.getSupportFragmentManager();//获取Fragment管理器
MenuListFragment mMenuFragment = (MenuListFragment) fm.findFragmentById(R.id.id_container_menu);
if (mMenuFragment == null) {
mMenuFragment = new MenuListFragment();
mMenuFragment.setAppCompatActivity(getAppCompatActivity());
fm.beginTransaction().add(R.id.id_container_menu, mMenuFragment).commit();
//向activity添加一个布局
}
@ -241,29 +291,5 @@ public class PersonContent extends Fragment {
// });
}
//
// public void onActivityCreated(Bundle savedInstanceState) {
// // TODO Auto-generated method stub
// super.onActivityCreated(savedInstanceState);
//
// Button login_pc_btn = (Button) getActivity().findViewById(R.id.login_pc_button);
// login_pc_btn.setOnClickListener(new View.OnClickListener() {
// public void onClick(View v) {
//
// Intent intent=new Intent();
// intent.setClass(getActivity(),LoginActivity.class);
// startActivity(intent);
// }
// });
// }
// @Override
// public void onResume() {
// super.onResume();
// if(LoginActivity.isLogin){
// Button longin_pc_btn=(Button) getActivity().findViewById(R.id.login_pc_button);
// longin_pc_btn.setText("Hello"+LoginActivity.username);
// }
//
////高血压
// }
}

@ -14,12 +14,10 @@ public class User {
private String avatar_url;
private String sex;
private Long age;
public static boolean isLogin;//是否登录
public static boolean isLogin = false;//是否登录
private User(){}
public static synchronized User getUser(){
if(user == null){
user = new User();
}
return user;
}

@ -0,0 +1,32 @@
package com.example.PersonalCenter;
import android.content.Intent;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import com.example.cmknowledgegraph.LoginActivity;
public class avatarOnclickListener implements View.OnClickListener {
AppCompatActivity appCompatActivity;
Fragment personFragment;
public avatarOnclickListener(AppCompatActivity appCompatActivity,Fragment fragment){
this.personFragment = fragment;
this.appCompatActivity = appCompatActivity;
}
@Override
public void onClick(View v) {
//这里监听就是如果未登录就跳到登录界面
if(User.isLogin()){
//登陆了
}else{
//没有登录
//跳转到登录界面
Intent intent=new Intent();
intent.setClass(appCompatActivity, LoginActivity.class);
personFragment.startActivity(intent);
}
//如果登录了就跳到个人信息界面
}
}

@ -1,4 +1,8 @@
<?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"

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home_back_1"
tools:context=".MainActivity">
</LinearLayout>

@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:background="#7adfb8"
tools:context=".LoginActivity" >
<!--登录的页面-->
<include
android:id="@+id/main_title"
layout="@layout/title_layout" />

@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
这是
-->
<androidx.constraintlayout.widget.ConstraintLayout 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"

@ -19,13 +19,6 @@
android:orientation="vertical">
>
<!-- 主要页面的内容也就是在person直接能看到的-->
<!-- <androidx.recyclerview.widget.RecyclerView-->
<!-- android:id="@+id/rvFeed"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:scrollbars="none"-->
<!-- app:layout_behavior="@string/appbar_scrolling_view_behavior"/>-->
<!-- 在这里添加自定义主页面 可支持自定义背景图还有头像然后几个cardview-->
<LinearLayout
android:layout_width="match_parent"
@ -33,46 +26,74 @@
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@drawable/draw7"/>
<LinearLayout
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="match_parent"
android:orientation="horizontal"
android:background="#423752">
<devlight.io.library.ntb.NavigationTabBar
app:ntb_title_mode="all"
app:ntb_titled="true"
app:ntb_title_size="14sp"
android:id="@+id/ntb_vertical"
android:layout_width="50dp"
android:layout_height="match_parent"
app:ntb_preview_colors="@array/vertical_ntb"/>
<androidx.viewpager.widget.ViewPager
android:id="@+id/vp_vertical_ntb"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
android:layout_height="300dp"
android:background="@drawable/draw1"/>
<LinearLayout
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="440dp"
android:orientation="horizontal"
android:background="#423752">
<devlight.io.library.ntb.NavigationTabBar
app:ntb_title_mode="all"
app:ntb_titled="true"
app:ntb_title_size="14sp"
android:id="@+id/ntb_vertical"
android:layout_width="50dp"
android:layout_height="match_parent"
app:ntb_preview_colors="@array/vertical_ntb"/>
<androidx.viewpager.widget.ViewPager
android:id="@+id/vp_vertical_ntb"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
//最上面的菜单栏
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/toolbar"
layout="@layout/view_feed_toolbar"/>
</com.google.android.material.appbar.AppBarLayout>
<ImageView android:id="@+id/iv_blur"
android:layout_width="match_parent"
android:layout_height="300dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_centerInParent="true">
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/iv_avatar"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/draw1"
app:civ_border_width="2dp"
app:civ_border_color="#FF000000"
/>
<TextView
android:id="@+id/user_name_person"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="未登录"
android:textSize="20sp"
android:layout_marginTop="30dp"
/>
</LinearLayout>
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@ -92,215 +113,3 @@
</com.mxn.soul.flowingdrawer_core.FlowingMenuLayout>
</com.mxn.soul.flowingdrawer_core.FlowingDrawer>
<!--<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"-->
<!-- xmlns:tools="http://schemas.android.com/tools"-->
<!-- android:orientation="vertical"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- tools:context=".PersonalityCenterActivity">-->
<!-- <ImageView-->
<!-- android:id="@+id/head_picture"-->
<!-- android:layout_width="110dp"-->
<!-- android:layout_height="110dp"-->
<!-- android:layout_marginTop="20dp"-->
<!-- android:layout_marginLeft="150dp"-->
<!-- android:layout_centerInParent="true"-->
<!-- android:src="@mipmap/picture"/>-->
<!-- <Button-->
<!-- android:id="@+id/login_pc_button"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:text="登录"-->
<!-- android:textSize="20sp"-->
<!-- android:background="#FFDAB9"-->
<!-- android:layout_marginLeft="157dp"-->
<!-- android:visibility="visible"/>-->
<!-- <Button-->
<!-- android:id="@+id/welcom_btn"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:text="欢迎"-->
<!-- android:textSize="20sp"-->
<!-- android:background="#FFDAB9"-->
<!-- android:layout_marginLeft="157dp"-->
<!-- android:visibility="gone"/>-->
<!-- <View-->
<!-- android:layout_marginTop="20dp"-->
<!-- android:layout_height="1px"-->
<!-- android:background="#000000"-->
<!-- android:layout_width="fill_parent"/>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal">-->
<!-- <ImageView-->
<!-- android:id="@+id/yellow_star1"-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_marginLeft="2dp"-->
<!-- android:src="@mipmap/star"/>-->
<!-- <TextView-->
<!-- android:id="@+id/personal"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:text="个性推荐"-->
<!-- android:textSize="18sp"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginLeft="16dp"/>-->
<!-- </LinearLayout>-->
<!-- <View-->
<!-- android:layout_height="1px"-->
<!-- android:background="#000000"-->
<!-- android:layout_width="fill_parent"/>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal">-->
<!-- <ImageView-->
<!-- android:id="@+id/yellow_star2"-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_marginLeft="2dp"-->
<!-- android:src="@mipmap/star"/>-->
<!-- <TextView-->
<!-- android:id="@+id/diet_hobby"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:text="饮食爱好"-->
<!-- android:textSize="18sp"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginLeft="16dp"/>-->
<!-- </LinearLayout>-->
<!-- <View-->
<!-- android:layout_height="1px"-->
<!-- android:background="#000000"-->
<!-- android:layout_width="fill_parent"/>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal">-->
<!-- <ImageView-->
<!-- android:id="@+id/yellow_star3"-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_marginLeft="2dp"-->
<!-- android:src="@mipmap/star"/>-->
<!-- <TextView-->
<!-- android:id="@+id/regimen"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:text="养生方案"-->
<!-- android:textSize="18sp"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginLeft="16dp"/>-->
<!-- </LinearLayout>-->
<!-- <View-->
<!-- android:layout_height="1px"-->
<!-- android:background="#000000"-->
<!-- android:layout_width="fill_parent"/>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal">-->
<!-- <ImageView-->
<!-- android:id="@+id/yellow_star4"-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_marginLeft="2dp"-->
<!-- android:src="@mipmap/star"/>-->
<!-- <TextView-->
<!-- android:id="@+id/history"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:text="浏览记录"-->
<!-- android:textSize="18sp"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginLeft="16dp"/>-->
<!-- </LinearLayout>-->
<!-- <View-->
<!-- android:layout_height="1px"-->
<!-- android:background="#000000"-->
<!-- android:layout_width="fill_parent"/>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal">-->
<!-- <ImageView-->
<!-- android:id="@+id/yellow_star5"-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_marginLeft="2dp"-->
<!-- android:src="@mipmap/star"/>-->
<!-- <TextView-->
<!-- android:id="@+id/message"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:text="消息通知"-->
<!-- android:textSize="18sp"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginLeft="16dp"/>-->
<!-- </LinearLayout>-->
<!-- <View-->
<!-- android:layout_height="1px"-->
<!-- android:background="#000000"-->
<!-- android:layout_width="fill_parent"/>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal">-->
<!-- <ImageView-->
<!-- android:id="@+id/yellow_star6"-->
<!-- android:layout_width="50dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_marginLeft="2dp"-->
<!-- android:src="@mipmap/star"/>-->
<!-- <TextView-->
<!-- android:id="@+id/setting"-->
<!-- android:layout_width="100dp"-->
<!-- android:layout_height="40dp"-->
<!-- android:text="设置"-->
<!-- android:textSize="18sp"-->
<!-- android:layout_marginTop="12dp"-->
<!-- android:layout_marginLeft="16dp"/>-->
<!-- </LinearLayout>-->
<!-- <View-->
<!-- android:layout_height="1px"-->
<!-- android:background="#000000"-->
<!-- android:layout_width="fill_parent"/>-->
<!--</LinearLayout>-->

@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".RegisterActivity">
<!--注册Layout-->
<GridLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"

@ -7,7 +7,7 @@
android:orientation="vertical"
tools:context=".SearchActivity">
<!--搜索区域Layout-->
<com.yalantis.jellytoolbar.widget.JellyToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--在个人中心的第二个菜单日历Layout-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.prolificinteractive.materialcalendarview.MaterialCalendarView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/calendarView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:mcv_showOtherDates="all"
app:mcv_selectionColor="#a9a"
/>
</LinearLayout>

@ -11,7 +11,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/transparent"
android:background="#4b405c"
app:headerLayout="@layout/view_global_menu_header"
app:itemIconTint="#8b8b8b"
app:itemTextColor="#666666"

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--这是home的-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--这是chat区配置上面logo区域这里默认是Health isEverything-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/logo_white"
android:layout_width="wrap_content"

@ -1,4 +1,5 @@
<?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"
@ -29,7 +30,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:background="#00000000"
android:hint="账号/用户名/邮箱"
android:hint="请输入手机号"
android:textColor="@color/cyan"
android:padding="5dip"
android:textSize="16sp" />

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--个人中心的toolbar
-->
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"

@ -8,14 +8,24 @@
android:id="@+id/vGlobalMenuHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
<!-- 头像-->
<!-- <ImageView-->
<!-- android:id="@+id/ivMenuUserProfilePhoto"-->
<!-- android:layout_width="@dimen/global_menu_avatar_size"-->
<!-- android:layout_height="@dimen/global_menu_avatar_size"-->
<!-- android:layout_margin="12dp" />-->
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ivMenuUserProfilePhoto"
android:layout_width="@dimen/global_menu_avatar_size"
android:layout_height="@dimen/global_menu_avatar_size"
android:layout_margin="12dp" />
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/draw1"
app:civ_border_width="2dp"
app:civ_border_color="#FF000000"
/>
<!-- 用户名-->
<TextView
android:id="@+id/user_name_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
@ -25,13 +35,6 @@
android:textSize="16sp"
android:textStyle="bold" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="16dp"
android:background="@android:color/transparent"
android:src="@drawable/ic_global_menu_search" />
</LinearLayout>

@ -3,27 +3,27 @@
<item
android:id="@+id/menu_feed"
android:icon="@drawable/ic_global_menu_feed"
android:title="My Feed" />
android:title="我的收藏" />
<item
android:id="@+id/menu_direct"
android:icon="@drawable/ic_global_menu_direct"
android:title="Instagram Direct" />
android:title="浏览记录" />
<item
android:id="@+id/menu_news"
android:icon="@drawable/ic_global_menu_news"
android:title="News" />
android:title="个人信息" />
<item
android:id="@+id/menu_popular"
android:icon="@drawable/ic_global_menu_popular"
android:title="Popular" />
android:title="账号与安全" />
<item
android:id="@+id/menu_photos_nearby"
android:icon="@drawable/ic_global_menu_nearby"
android:title="Photos Nearby" />
android:title="产品反馈" />
<item
android:id="@+id/menu_photo_you_liked"
android:icon="@drawable/ic_global_menu_likes"
android:title="Photos You've Liked" />
android:title="版本" />
</group>
<group android:id="@+id/menu_group_2">
<item

Loading…
Cancel
Save