zoukankan      html  css  js  c++  java
  • 第一阶段SCRUM冲刺-02

    import android.os.Bundle;
    import android.support.annotation.Nullable;
    import android.support.design.widget.TabLayout;
    import android.support.v4.app.Fragment;
    import android.support.v4.view.ViewPager;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    
     
    
    import com.example.myapplication.R;
    import com.example.myapplication.adapter.historyFragmentAdapter;
    
    import java.util.ArrayList;
    
    import butterknife.BindView;
    import butterknife.ButterKnife;
    
    /**
    * @author:created By ZhangHao
    * 时间:2019/4/24 18
    * 邮箱:188660586@qq.com
    */
    public class HistoryFragment extends Fragment {
    
    @BindView(R.id.top_tabViewPager)
    ViewPager top_tabViewPager;
    @BindView(R.id.top_tab)
    TabLayout top_tab;
    private ArrayList<String> titles;
    private historyFragmentAdapter adapter;
    
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    initData();
    }
    
     
    
    @Override
    public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.history_fragment, container, false);
    ButterKnife.bind(this, view);
    adapter = new historyFragmentAdapter(getChildFragmentManager());
    top_tabViewPager.setAdapter(adapter);
    top_tab.setupWithViewPager(top_tabViewPager);
    //更新适配器数据
    adapter.setTitles(titles);
    return view;
    
    
    }
    
    private void initData() {
    titles = new ArrayList<>();
    titles.add("待出行的订单");
    titles.add("已出行的订单");
    }
    
    }
  • 相关阅读:
    kali禁止自动挂载U盘(gnome)
    Kali开启远程桌面服务(gnome桌面环境)
    KVM安装Win7时USB3.0无法使用的坑
    Linux上VLAN的创建
    小程序 局部页面 自定义滚动条
    两个图层一上一下div view
    js 数组去重
    css > 的写法 html
    块级元素和行内元素
    小程序 css 文字溢出,长度过长用 。。。
  • 原文地址:https://www.cnblogs.com/chenyuchun/p/11066655.html
Copyright © 2011-2022 走看看