diff --git a/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/app_bar_activity.java b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/app_bar_activity.java new file mode 100644 index 0000000..c6a5ef7 --- /dev/null +++ b/src/MyApplication/app/src/main/java/com/example/administrator/myapplication/ui/app_bar_activity.java @@ -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("图片")); + } +}