@ -0,0 +1,90 @@
|
||||
//package com.example.HomeContent;
|
||||
//
|
||||
//import android.content.Context;
|
||||
//import android.view.LayoutInflater;
|
||||
//import android.view.View;
|
||||
//import android.view.ViewGroup;
|
||||
//import android.widget.FrameLayout;
|
||||
//import android.widget.ImageButton;
|
||||
//import android.widget.ImageView;
|
||||
//import android.widget.TextSwitcher;
|
||||
//
|
||||
//import androidx.annotation.NonNull;
|
||||
//import androidx.recyclerview.widget.RecyclerView;
|
||||
//
|
||||
//import com.example.PersonalCenter.FeedAdapter;
|
||||
//import com.example.cmknowledgegraph.R;
|
||||
//
|
||||
//public class HomeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
// private Context context;
|
||||
// private int itemsCount = 0;
|
||||
//
|
||||
// public HomeAdapter(Context context){this.context = context;}
|
||||
//
|
||||
//
|
||||
// @NonNull
|
||||
// @Override
|
||||
// public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
// final View view = LayoutInflater.from(context).inflate(R.layout.item_feed, parent, false);
|
||||
//
|
||||
// return new HomeAdapter.CellFeedViewHolder(view);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
// final FeedAdapter.CellFeedViewHolder holder = (FeedAdapter.CellFeedViewHolder) viewHolder;
|
||||
// bindDefaultFeedItem(position, holder);
|
||||
// }
|
||||
// private void bindDefaultFeedItem(int position, FeedAdapter.CellFeedViewHolder holder) {
|
||||
// if (position % 2 == 0) {
|
||||
// holder.ivFeedCenter.setImageResource(R.drawable.img_feed_center_1);
|
||||
// holder.ivFeedBottom.setImageResource(R.drawable.img_feed_bottom_1);
|
||||
// } else {
|
||||
// holder.ivFeedCenter.setImageResource(R.drawable.img_feed_center_2);
|
||||
// holder.ivFeedBottom.setImageResource(R.drawable.img_feed_bottom_2);
|
||||
// }
|
||||
//
|
||||
// holder.btnComments.setTag(position);
|
||||
// holder.btnMore.setTag(position);
|
||||
// holder.ivFeedCenter.setTag(holder);
|
||||
// holder.btnLike.setTag(holder);
|
||||
//
|
||||
// }
|
||||
// public void updateItems() {
|
||||
// itemsCount = 10;
|
||||
// notifyDataSetChanged();
|
||||
// }
|
||||
// @Override
|
||||
// public int getItemCount() {
|
||||
// return itemsCount;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getItemViewType(int position) {
|
||||
// return 1;
|
||||
// }
|
||||
//// 在这里构建一个cell的内容
|
||||
// private static class CellFeedViewHolder extends RecyclerView.ViewHolder {
|
||||
// ImageView ivFeedCenter;
|
||||
// ImageView ivFeedBottom;
|
||||
// ImageButton btnComments;
|
||||
// ImageButton btnLike;
|
||||
// ImageButton btnMore;
|
||||
// TextSwitcher tsLikesCounter;
|
||||
// ImageView ivUserProfile;
|
||||
// FrameLayout vImageRoot;
|
||||
//
|
||||
// CellFeedViewHolder(View view) {
|
||||
// super(view);
|
||||
//
|
||||
// ivFeedCenter = (ImageView) view.findViewById(R.id.ivFeedCenter);
|
||||
// ivFeedBottom = (ImageView) view.findViewById(R.id.ivFeedBottom);
|
||||
// btnComments = (ImageButton) view.findViewById(R.id.btnComments);
|
||||
// btnLike = (ImageButton) view.findViewById(R.id.btnLike);
|
||||
// btnMore = (ImageButton) view.findViewById(R.id.btnMore);
|
||||
// tsLikesCounter = (TextSwitcher) view.findViewById(R.id.tsLikesCounter);
|
||||
// ivUserProfile = (ImageView) view.findViewById(R.id.ivUserProfile);
|
||||
// vImageRoot = (FrameLayout) view.findViewById(R.id.vImageRoot);
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -0,0 +1,56 @@
|
||||
package com.example.PersonalCenter;
|
||||
|
||||
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapShader;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
|
||||
import com.squareup.picasso.Transformation;
|
||||
|
||||
|
||||
class CircleTransformation implements Transformation {
|
||||
|
||||
private static final int STROKE_WIDTH = 6;
|
||||
|
||||
@Override
|
||||
public Bitmap transform(Bitmap source) {
|
||||
int size = Math.min(source.getWidth(), source.getHeight());
|
||||
|
||||
int x = (source.getWidth() - size) / 2;
|
||||
int y = (source.getHeight() - size) / 2;
|
||||
|
||||
Bitmap squaredBitmap = Bitmap.createBitmap(source, x, y, size, size);
|
||||
if (squaredBitmap != source) {
|
||||
source.recycle();
|
||||
}
|
||||
|
||||
Bitmap bitmap = Bitmap.createBitmap(size, size, source.getConfig());
|
||||
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
|
||||
Paint avatarPaint = new Paint();
|
||||
BitmapShader shader = new BitmapShader(squaredBitmap, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP);
|
||||
avatarPaint.setShader(shader);
|
||||
|
||||
Paint outlinePaint = new Paint();
|
||||
outlinePaint.setColor(Color.WHITE);
|
||||
outlinePaint.setStyle(Paint.Style.STROKE);
|
||||
outlinePaint.setStrokeWidth(STROKE_WIDTH);
|
||||
outlinePaint.setAntiAlias(true);
|
||||
|
||||
float r = size / 2f;
|
||||
canvas.drawCircle(r, r, r, avatarPaint);
|
||||
canvas.drawCircle(r, r, r - STROKE_WIDTH / 2, outlinePaint);
|
||||
|
||||
squaredBitmap.recycle();
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String key() {
|
||||
return "circleTransformation()";
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.example.PersonalCenter;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextSwitcher;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.cmknowledgegraph.R;
|
||||
|
||||
|
||||
public class FeedAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
||||
private Context context;
|
||||
private int itemsCount = 0;
|
||||
|
||||
public FeedAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
final View view = LayoutInflater.from(context).inflate(R.layout.item_feed, parent, false);
|
||||
|
||||
return new CellFeedViewHolder(view);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {
|
||||
final CellFeedViewHolder holder = (CellFeedViewHolder) viewHolder;
|
||||
bindDefaultFeedItem(position, holder);
|
||||
}
|
||||
|
||||
private void bindDefaultFeedItem(int position, CellFeedViewHolder holder) {
|
||||
if (position % 2 == 0) {
|
||||
holder.ivFeedCenter.setImageResource(R.drawable.img_feed_center_1);
|
||||
holder.ivFeedBottom.setImageResource(R.drawable.img_feed_bottom_1);
|
||||
} else {
|
||||
holder.ivFeedCenter.setImageResource(R.drawable.img_feed_center_2);
|
||||
holder.ivFeedBottom.setImageResource(R.drawable.img_feed_bottom_2);
|
||||
}
|
||||
|
||||
holder.btnComments.setTag(position);
|
||||
holder.btnMore.setTag(position);
|
||||
holder.ivFeedCenter.setTag(holder);
|
||||
holder.btnLike.setTag(holder);
|
||||
|
||||
}
|
||||
|
||||
public void updateItems() {
|
||||
itemsCount = 10;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return itemsCount;
|
||||
}
|
||||
|
||||
private static class CellFeedViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView ivFeedCenter;
|
||||
ImageView ivFeedBottom;
|
||||
ImageButton btnComments;
|
||||
ImageButton btnLike;
|
||||
ImageButton btnMore;
|
||||
TextSwitcher tsLikesCounter;
|
||||
ImageView ivUserProfile;
|
||||
FrameLayout vImageRoot;
|
||||
|
||||
CellFeedViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
ivFeedCenter = (ImageView) view.findViewById(R.id.ivFeedCenter);
|
||||
ivFeedBottom = (ImageView) view.findViewById(R.id.ivFeedBottom);
|
||||
btnComments = (ImageButton) view.findViewById(R.id.btnComments);
|
||||
btnLike = (ImageButton) view.findViewById(R.id.btnLike);
|
||||
btnMore = (ImageButton) view.findViewById(R.id.btnMore);
|
||||
tsLikesCounter = (TextSwitcher) view.findViewById(R.id.tsLikesCounter);
|
||||
ivUserProfile = (ImageView) view.findViewById(R.id.ivUserProfile);
|
||||
vImageRoot = (FrameLayout) view.findViewById(R.id.vImageRoot);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
|
||||
package com.example.PersonalCenter;
|
||||
|
||||
import com.example.cmknowledgegraph.R;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
/**
|
||||
* Created by mxn on 2016/12/13.
|
||||
* MenuListFragment
|
||||
*/
|
||||
|
||||
public class MenuListFragment extends Fragment {
|
||||
|
||||
private ImageView ivMenuUserProfilePhoto;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
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);
|
||||
Log.i("ismenu---===","====)"+ivMenuUserProfilePhoto.toString());
|
||||
NavigationView vNavigation = (NavigationView) view.findViewById(R.id.vNavigation);
|
||||
vNavigation.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(MenuItem menuItem) {
|
||||
Toast.makeText(getActivity(),menuItem.getTitle(),Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
}) ;
|
||||
setupHeader();
|
||||
return view ;
|
||||
}
|
||||
|
||||
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())
|
||||
.load(R.drawable.draw1)
|
||||
.placeholder(R.drawable.img_circle_placeholder)
|
||||
.into(ivMenuUserProfilePhoto);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.example.PersonalCenter;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
|
||||
public class SquaredFrameLayout extends FrameLayout {
|
||||
public SquaredFrameLayout(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public SquaredFrameLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public SquaredFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
public SquaredFrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, widthMeasureSpec);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="150"
|
||||
android:interpolator="@android:anim/linear_interpolator">
|
||||
<translate
|
||||
android:fromYDelta="80%p"
|
||||
android:toYDelta="0" />
|
||||
<alpha
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0" />
|
||||
</set>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="150"
|
||||
android:interpolator="@android:anim/linear_interpolator">
|
||||
<translate
|
||||
android:fromYDelta="0"
|
||||
android:toYDelta="-80%p" />
|
||||
<alpha
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0" />
|
||||
</set>
|
After Width: | Height: | Size: 655 B |
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--drawable/btn_feed_action.xml-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" android:enterFadeDuration="200" android:exitFadeDuration="200">
|
||||
<item android:state_pressed="false">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#6621425d" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 593 B |
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 851 B |
After Width: | Height: | Size: 876 B |
After Width: | Height: | Size: 563 B |
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 881 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 316 B |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#ffffff" />
|
||||
</shape>
|
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 514 KiB |
After Width: | Height: | Size: 424 KiB |
@ -0,0 +1,19 @@
|
||||
<RelativeLayout
|
||||
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"
|
||||
>
|
||||
|
||||
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/vNavigation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@android:color/transparent"
|
||||
app:headerLayout="@layout/view_global_menu_header"
|
||||
app:itemIconTint="#8b8b8b"
|
||||
app:itemTextColor="#666666"
|
||||
app:menu="@menu/drawer_menu"/>
|
||||
</RelativeLayout>
|
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- item_feed.xml -->
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
card_view:cardCornerRadius="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivUserProfile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_feed_top" />
|
||||
<com.example.PersonalCenter.SquaredFrameLayout
|
||||
android:id="@+id/vImageRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivFeedCenter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
</com.example.PersonalCenter.SquaredFrameLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivFeedBottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnLike"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/btn_feed_action"
|
||||
android:src="@drawable/ic_heart_outline_grey" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnComments"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/btn_feed_action"
|
||||
android:src="@drawable/ic_comment_outline_grey" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnMore"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/btn_feed_action"
|
||||
android:src="@drawable/ic_more_grey" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|right">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_heart_small_blue" />
|
||||
|
||||
<TextSwitcher
|
||||
android:id="@+id/tsLikesCounter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:inAnimation="@anim/slide_in_likes_counter"
|
||||
android:outAnimation="@anim/slide_out_likes_counter">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="123 likes"
|
||||
android:textColor="@color/text_like_counter" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_like_counter" />
|
||||
</TextSwitcher>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:elevation="@dimen/default_elevation"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
@ -0,0 +1,43 @@
|
||||
<?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="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:clickable="true">
|
||||
<LinearLayout
|
||||
android:id="@+id/vGlobalMenuHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="mxn"
|
||||
android:textColor="#2d5d82"
|
||||
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>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="#dddddd" />
|
||||
</FrameLayout>
|
@ -0,0 +1,36 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<group android:id="@+id/menu_group_1">
|
||||
<item
|
||||
android:id="@+id/menu_feed"
|
||||
android:icon="@drawable/ic_global_menu_feed"
|
||||
android:title="My Feed" />
|
||||
<item
|
||||
android:id="@+id/menu_direct"
|
||||
android:icon="@drawable/ic_global_menu_direct"
|
||||
android:title="Instagram Direct" />
|
||||
<item
|
||||
android:id="@+id/menu_news"
|
||||
android:icon="@drawable/ic_global_menu_news"
|
||||
android:title="News" />
|
||||
<item
|
||||
android:id="@+id/menu_popular"
|
||||
android:icon="@drawable/ic_global_menu_popular"
|
||||
android:title="Popular" />
|
||||
<item
|
||||
android:id="@+id/menu_photos_nearby"
|
||||
android:icon="@drawable/ic_global_menu_nearby"
|
||||
android:title="Photos Nearby" />
|
||||
<item
|
||||
android:id="@+id/menu_photo_you_liked"
|
||||
android:icon="@drawable/ic_global_menu_likes"
|
||||
android:title="Photos You've Liked" />
|
||||
</group>
|
||||
<group android:id="@+id/menu_group_2">
|
||||
<item
|
||||
android:id="@+id/menu_settings"
|
||||
android:title="Settings" />
|
||||
<item
|
||||
android:id="@+id/menu_about"
|
||||
android:title="About" />
|
||||
</group>
|
||||
</menu>
|