menu
This commit is contained in:
@@ -59,4 +59,6 @@ dependencies {
|
||||
implementation 'me.panpf:spider-web-score-view:1.0.1'
|
||||
//折线
|
||||
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
|
||||
//searchview
|
||||
compile 'com.miguelcatalan:materialsearchview:1.4.0'
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
initToolBar();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设置布局layout
|
||||
*
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.example.ninefourone.nutritionmaster.modules;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.RequiresApi;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
@@ -14,10 +19,13 @@ import com.example.ninefourone.nutritionmaster.R;
|
||||
import com.example.ninefourone.nutritionmaster.adapter.HomePagerAdapter;
|
||||
import com.example.ninefourone.nutritionmaster.base.BaseActivity;
|
||||
import com.example.ninefourone.nutritionmaster.ui.NoScrollViewPager;
|
||||
import com.example.ninefourone.nutritionmaster.utils.MessageUtils;
|
||||
import com.flyco.tablayout.SlidingTabLayout;
|
||||
import com.github.siyamed.shapeimageview.CircularImageView;
|
||||
import com.miguelcatalan.materialsearchview.MaterialSearchView;
|
||||
import com.mxn.soul.flowingdrawer_core.ElasticDrawer;
|
||||
import com.mxn.soul.flowingdrawer_core.FlowingDrawer;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@@ -47,6 +55,12 @@ public class MainActivity extends BaseActivity {
|
||||
SpiderWebScoreView spiderWebMainActivity;
|
||||
@BindView(R.id.layout_mainActivity_circular)
|
||||
CircularLayout layoutMainActivityCircular;
|
||||
// @BindView(R.id.search_button)
|
||||
// ImageView searchButton;
|
||||
@BindView(R.id.search_view)
|
||||
MaterialSearchView searchView;
|
||||
@BindView(R.id.tool_bar)
|
||||
Toolbar toolBar;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -75,6 +89,7 @@ public class MainActivity extends BaseActivity {
|
||||
});
|
||||
initSpiderView();
|
||||
initViewPager();
|
||||
initSearchView();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,13 +117,33 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
// TODO: add setContentView(...) invocation
|
||||
ButterKnife.bind(this);
|
||||
Logger.d("oncreate");
|
||||
setSupportActionBar(toolBar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
Logger.d("oncreateMenu");
|
||||
getMenuInflater().inflate(R.menu.menu_main, menu);
|
||||
MenuItem item = menu.findItem(R.id.id_action_search);
|
||||
searchView.setMenuItem(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
Logger.d("prepareMenu");
|
||||
return super.onPrepareOptionsMenu(menu);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 点击事件
|
||||
*/
|
||||
@@ -134,5 +169,36 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化SearchView
|
||||
*/
|
||||
private void initSearchView() {
|
||||
searchView.setOnQueryTextListener(new MaterialSearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextSubmit(String query) {
|
||||
MessageUtils.MakeToast(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onQueryTextChange(String newText) {
|
||||
// MessageUtils.MakeToast(newText);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
searchView.setOnSearchViewListener(new MaterialSearchView.SearchViewListener() {
|
||||
@Override
|
||||
public void onSearchViewShown() {
|
||||
// MessageUtils.MakeToast("Shown");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSearchViewClosed() {
|
||||
// MessageUtils.MakeToast("closed");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
4
app/src/main/res/drawable/ic_exchange.xml
Normal file
4
app/src/main/res/drawable/ic_exchange.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ffffff" android:pathData="M160,448h704c1.9,0 4.5,0 6.4,-0.6 0.6,0 1.9,-0.6 2.6,-0.6 1.3,0 1.9,-0.6 3.2,-1.3 1.3,-0.6 1.9,-1.3 3.2,-1.3 0.6,-0.6 1.9,-0.6 2.6,-1.3 1.9,-1.3 3.2,-2.6 4.5,-3.8 1.3,-1.3 2.6,-3.2 3.8,-4.5 0.6,-0.6 0.6,-1.9 1.3,-2.6 0.6,-1.3 1.3,-1.9 1.3,-3.2 0.6,-1.3 0.6,-1.9 1.3,-3.2 0,-0.6 0.6,-1.9 0.6,-2.6 0.6,-3.8 0.6,-8.3 0,-12.8 0,-0.6 -0.6,-1.9 -0.6,-2.6 -0.6,-1.3 -0.6,-2.6 -1.3,-3.2 -0.6,-1.3 -1.3,-1.9 -1.3,-3.2 -0.6,-0.6 -0.6,-1.9 -1.3,-2.6 -1.3,-1.9 -2.6,-3.2 -3.8,-4.5l-224,-224c-12.8,-12.8 -32.6,-12.8 -45.4,0 -12.8,12.8 -12.8,32.6 0,45.4L786.6,384H160c-17.9,0 -32,14.1 -32,32s14.1,32 32,32zM864,576H160c-1.9,0 -3.8,0 -5.8,0.6 -1.3,0 -1.9,0.6 -2.6,0.6 -1.3,0 -1.9,0.6 -3.2,1.3 -1.3,0.6 -1.9,1.3 -3.2,1.9 -0.6,0.6 -1.9,0.6 -2.6,1.3 -1.9,1.3 -3.2,2.6 -4.5,3.8 -1.3,1.3 -2.6,3.2 -3.8,4.5 -0.6,0.6 -0.6,1.9 -1.3,2.6 -0.6,1.3 -1.3,1.9 -1.3,3.2 -0.6,1.3 -0.6,1.9 -1.3,3.2 0,0.6 -0.6,1.9 -0.6,2.6 -0.6,3.8 -0.6,8.3 0,12.8 0,0.6 0.6,1.9 0.6,2.6 0.6,1.3 0.6,1.9 1.3,3.2 0.6,1.3 1.3,1.9 1.3,3.2 0.6,0.6 0.6,1.9 1.3,2.6 1.3,1.9 2.6,3.2 3.8,4.5l224,224c6.4,6.4 14.7,9.6 22.4,9.6s16.6,-3.2 22.4,-9.6c12.8,-12.8 12.8,-32.6 0,-45.4L237.4,640H864c17.9,0 32,-14.1 32,-32s-14.1,-32 -32,-32z"/>
|
||||
</vector>
|
||||
7
app/src/main/res/drawable/ic_record.xml
Normal file
7
app/src/main/res/drawable/ic_record.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ffffff" android:pathData="M893.7,295.5C835.9,204.1 745.9,140.7 640.4,117c-105.5,-23.6 -213.9,-4.9 -305.4,53 -103.3,65.3 -169.9,171.3 -185,290.2l-43.3,-64.4c-6.6,-9.7 -19.8,-12.3 -29.7,-5.8 -9.8,6.6 -12.4,19.9 -5.8,29.7l75,111.5c3.5,5.1 9,8.5 15.1,9.2 1,0.2 2.2,0.3 3.1,0.2 5.1,-0.2 10,-2.1 13.8,-5.5l91.2,-82.3c8.8,-8 9.5,-21.5 1.6,-30.2 -8,-8.8 -21.5,-9.4 -30.2,-1.6l-48.2,43.6c13.8,-106 73.3,-200.3 165.3,-258.5 81.7,-51.8 178.8,-68.6 273.2,-47.4 94.4,21.2 174.9,77.9 226.7,159.6 51.8,81.7 68.5,178.8 47.3,273.2 -21.2,94.4 -77.8,174.9 -159.6,226.6 -81.7,51.9 -178.8,68.6 -273.2,47.3 -94.4,-21.1 -174.9,-77.9 -226.6,-159.6 -6.3,-9.9 -19.5,-12.8 -29.5,-6.6 -10,6.3 -13,19.5 -6.7,29.5C286.4,850.3 417.9,917 552.2,917c74,0 148.9,-20.2 215.9,-62.7C957,734.8 1013.2,484.1 893.7,295.5zM893.7,295.5"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M552.2,919.6c-140.9,0 -269.9,-70.8 -345,-189.5 -7,-11.1 -3.7,-26 7.4,-33.1 3.9,-2.4 8.4,-3.7 12.9,-3.7 8.3,0 15.9,4.1 20.2,11.1 51.6,81.3 131.5,137.6 225,158.4 26.3,6 53.1,9 79.8,9 67.6,0 133.8,-19.4 191.4,-55.9 81.1,-51.2 137.4,-131.2 158.5,-225 21,-93.8 4.3,-190.1 -47,-271.2C804,238.6 724,182.3 630.3,161.2c-26.2,-5.9 -52.9,-8.9 -79.4,-8.9 -67.7,0 -134,19.4 -191.8,55.9 -88.4,55.9 -147.6,146.6 -163.1,249.5l43,-38.7c4.4,-4 10.1,-6.1 16.1,-6.1 6.8,0 13.3,2.9 17.8,7.9 8.8,9.8 8,25 -1.7,34L179.9,537c-4.3,3.8 -9.8,6 -15.5,6.1 -0.7,0.2 -2.3,0 -3.6,-0.2 -6.8,-0.8 -13,-4.6 -16.9,-10.4l-75,-111.4c-3.6,-5.4 -4.9,-11.7 -3.6,-18.1 1.2,-6.3 4.8,-11.7 10.2,-15.3 4,-2.6 8.6,-4 13.4,-4 8,0 15.5,4 19.9,10.6l39.5,58.8c17,-117.6 84.2,-221.3 185.3,-285.3 65.5,-41.5 140.6,-63.4 217.3,-63.4 30.1,0 60.4,3.4 90.1,10 106.3,23.9 196.8,87.7 255,179.6 58.2,91.8 77.1,201 53.2,307.3 -23.9,106.4 -87.7,196.9 -179.6,255.1 -65.3,41.4 -140.4,63.2 -217.4,63.2zM227.5,698.6c-3.6,0 -7,1 -10.1,2.9 -8.9,5.6 -11.4,17 -5.9,25.9 74.2,117.1 201.6,187 340.6,187 76,0 150.2,-21.6 214.6,-62.3 90.7,-57.4 153.7,-146.8 177.2,-251.8 23.6,-105 4.9,-212.7 -52.5,-303.4 -57.5,-90.8 -146.9,-153.7 -251.7,-177.3 -29.3,-6.6 -59.3,-9.9 -88.9,-9.9 -75.7,0 -149.8,21.6 -214.5,62.5 -101.7,64.4 -168.7,169.4 -183.8,288.3l-0.9,6.9 -47.2,-70.2c-3.5,-5.2 -9.3,-8.3 -15.6,-8.3 -3.7,0 -7.3,1.1 -10.5,3.2 -4.1,2.8 -7,7 -8,11.9s0.1,9.9 2.9,14.1l75,111.5c3.1,4.5 7.9,7.5 13.3,8.1 0.7,0.1 1.3,0.2 1.9,0.2l0.8,-0.1c4.5,-0.2 8.8,-1.8 12.2,-4.8l91.2,-82.3c7.6,-7 8.3,-18.9 1.4,-26.6 -6.7,-7.4 -19.2,-8 -26.6,-1.4L189,471.3l0.9,-7c14,-107.4 74.7,-202.3 166.5,-260.3 58.6,-37.1 125.9,-56.8 194.5,-56.8 26.9,0 54,3 80.6,9 95.2,21.4 176.2,78.5 228.3,160.8 52.1,82.3 69,180 47.7,275.1 -21.4,95.2 -78.5,176.3 -160.8,228.2 -58.5,37.1 -125.6,56.8 -194.2,56.8 -27,0 -54.3,-3.1 -80.9,-9.1 -94.9,-21.2 -176,-78.3 -228.3,-160.8 -3.4,-5.4 -9.3,-8.6 -15.8,-8.6z"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M539.3,235.9c-17,0 -30.8,13.8 -30.8,30.9v264.3c0,8.2 3.2,16.1 9,21.8l152.3,152.3c6,6 13.9,9 21.9,9 7.9,0 15.8,-3 21.8,-9 12.1,-12.1 12.1,-31.6 0,-43.7L570.2,518.3L570.2,266.8c0,-17.1 -13.8,-30.9 -30.9,-30.9zM539.3,235.9"/>
|
||||
<path android:fillColor="#ffffff" android:pathData="M691.7,716.8c-9,0 -17.4,-3.5 -23.7,-9.8L515.7,554.8c-6.2,-6.2 -9.8,-14.8 -9.8,-23.7V266.8c0,-18.5 15,-33.6 33.4,-33.6 18.5,0 33.5,15 33.5,33.6v250.4l142.6,142.5c13,13.1 13,34.3 0,47.4 -6.4,6.3 -14.8,9.7 -23.7,9.7zM539.3,238.5c-15.6,0 -28.2,12.7 -28.2,28.4v264.3c0,7.5 3,14.8 8.3,20l152.3,152.3c5.4,5.3 12.4,8.3 20,8.3 7.5,0 14.6,-3 20,-8.3 11,-11 11,-29 0,-40l-144.1,-144V266.8c0,-15.6 -12.7,-28.3 -28.3,-28.3z"/>
|
||||
</vector>
|
||||
4
app/src/main/res/drawable/ic_search.xml
Normal file
4
app/src/main/res/drawable/ic_search.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<vector android:height="24dp" android:viewportHeight="1024.0"
|
||||
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ffffff" android:pathData="M689,596c30,-47.2 47.6,-103.2 47.6,-163.4 0,-168.2 -136.2,-304.6 -304.2,-304.6C264.2,128 128,264.4 128,432.6c0,168.2 136.2,304.6 304.2,304.6 61,0 117.8,-18 165.4,-48.8l13.8,-9.6L828.6,896l67.4,-68.6 -217,-217.2 10,-14.2zM602.8,262.4c45.4,45.4 70.4,105.8 70.4,170s-25,124.6 -70.4,170c-45.4,45.4 -105.8,70.4 -170,70.4s-124.6,-25 -170,-70.4c-45.4,-45.4 -70.4,-105.8 -70.4,-170s25,-124.6 70.4,-170c45.4,-45.4 105.8,-70.4 170,-70.4s124.6,25 170,70.4z"/>
|
||||
</vector>
|
||||
@@ -44,44 +44,89 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/tool_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:contentInsetStart="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/navigation_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/navigation_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_drawer_home" />
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.github.siyamed.shapeimageview.CircularImageView
|
||||
android:id="@+id/toolbar_user_avatar"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:maxLines="1"
|
||||
android:text="营养大师"
|
||||
android:textColor="#FFFF"
|
||||
android:textSize="15sp" />
|
||||
<ImageView
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_drawer_home" />
|
||||
|
||||
<com.github.siyamed.shapeimageview.CircularImageView
|
||||
android:id="@+id/toolbar_user_avatar"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:maxLines="1"
|
||||
android:text="营养大师"
|
||||
android:textColor="#FFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:layout_alignParentRight="true"-->
|
||||
<!--android:gravity="center_vertical"-->
|
||||
<!--android:orientation="horizontal">-->
|
||||
|
||||
<!--<ImageView-->
|
||||
<!--android:id="@+id/exchange_button"-->
|
||||
<!--android:layout_width="@dimen/icon_size"-->
|
||||
<!--android:layout_height="@dimen/icon_size"-->
|
||||
<!--android:src="@drawable/ic_exchange" />-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:layout_width="20dp"-->
|
||||
<!--android:layout_height="match_parent" />-->
|
||||
|
||||
<!--<ImageView-->
|
||||
<!--android:id="@+id/record_button"-->
|
||||
<!--android:layout_width="22dp"-->
|
||||
<!--android:layout_height="22dp"-->
|
||||
<!--android:src="@drawable/ic_record" />-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:layout_width="20dp"-->
|
||||
<!--android:layout_height="match_parent" />-->
|
||||
|
||||
<!--<ImageView-->
|
||||
<!--android:id="@+id/search_button"-->
|
||||
<!--android:layout_width="18dp"-->
|
||||
<!--android:layout_height="18dp"-->
|
||||
<!--android:src="@drawable/ic_search" />-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:layout_width="25dp"-->
|
||||
<!--android:layout_height="match_parent" />-->
|
||||
|
||||
<!--</LinearLayout>-->
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
|
||||
@@ -109,6 +154,11 @@
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
<com.miguelcatalan.materialsearchview.MaterialSearchView
|
||||
android:id="@+id/search_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</FrameLayout>
|
||||
|
||||
<!--menu-->
|
||||
@@ -249,7 +299,7 @@
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center"
|
||||
app:scoreColor="@color/colorPrimary"
|
||||
app:scoreStrokeColor="@color/colorPrimary"/>
|
||||
app:scoreStrokeColor="@color/colorPrimary" />
|
||||
|
||||
<me.panpf.swsv.CircularLayout
|
||||
android:id="@+id/layout_mainActivity_circular"
|
||||
@@ -521,11 +571,9 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.mxn.soul.flowingdrawer_core.FlowingMenuLayout>
|
||||
|
||||
@@ -104,8 +104,8 @@
|
||||
|
||||
<me.itangqi.waveloadingview.WaveLoadingView
|
||||
android:id="@+id/waveLoadingView"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
app:wlv_borderColor="#ff5b20"
|
||||
app:wlv_borderWidth="3dp"
|
||||
app:wlv_progressValue="40"
|
||||
@@ -213,7 +213,7 @@
|
||||
|
||||
<com.github.mikephil.charting.charts.LineChart
|
||||
android:id="@+id/weight_line_chart"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="@dimen/infor_chart_height">
|
||||
|
||||
</com.github.mikephil.charting.charts.LineChart>
|
||||
@@ -313,7 +313,7 @@
|
||||
|
||||
<com.github.mikephil.charting.charts.LineChart
|
||||
android:id="@+id/step_line_chart"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="@dimen/infor_chart_height">
|
||||
|
||||
</com.github.mikephil.charting.charts.LineChart>
|
||||
|
||||
26
app/src/main/res/menu/menu_main.xml
Normal file
26
app/src/main/res/menu/menu_main.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/id_action_exchange"
|
||||
android:icon="@drawable/ic_exchange"
|
||||
android:title="切换"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/id_action_record"
|
||||
android:icon="@drawable/ic_record"
|
||||
android:orderInCategory="100"
|
||||
android:title="浏览记录"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/id_action_search"
|
||||
android:icon="@drawable/ic_search"
|
||||
android:orderInCategory="100"
|
||||
android:title="搜索"
|
||||
app:showAsAction="always"
|
||||
/>
|
||||
</menu>
|
||||
@@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
<string-array name="sections">
|
||||
<item>page1</item>
|
||||
<item>page2</item>
|
||||
<item>今日信息</item>
|
||||
<item>page3</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -18,4 +18,7 @@
|
||||
<dimen name="infor_chart_width">200dp</dimen>
|
||||
|
||||
|
||||
<dimen name="icon_size">20dp</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user