对app_bar_main的标签进行设计
This commit is contained in:
parent
0ef7855161
commit
4ed803ccb7
|
@ -0,0 +1,23 @@
|
|||
package com.example.administrator.myapplication.ui;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import com.example.administrator.myapplication.R;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2018/5/14 0014.
|
||||
*/
|
||||
|
||||
public class app_bar_activity extends AppCompatActivity{
|
||||
private TabLayout mTabLayout;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.app_bar_main);
|
||||
|
||||
mTabLayout = (TabLayout) findViewById(R.id.app_bar_tablayout);
|
||||
mTabLayout.addTab(mTabLayout.newTab().setText("文章"));
|
||||
mTabLayout.addTab(mTabLayout.newTab().setText("图片"));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue