• 十日冲刺


    今天学习了相关的数据库操作以及页面的跳转实验了一下再界面上简单的输出一下所求的数据,为下一步整合数据进行相关操作做铺垫:

    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
            View view = inflater.inflate(R.layout.si_fragment,container,false);
    
            mDatabaseHelper = new DatabaseHelper(getActivity());
            mCostBeanList = new ArrayList<>();
             mTextView = view.findViewById(R.id.textView);
             button = view.findViewById(R.id.button2);
             editText = view.findViewById(R.id.editText2);
             button.setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View v) {
                     String i = editText.getText().toString();
                     Cursor cursor =mDatabaseHelper.selectlist(i);
                     if (cursor != null){
                         while (cursor.moveToNext()){
                             CostBean costBean = new CostBean();
                             costBean.costTitle = cursor.getString(cursor.getColumnIndex("cost_title"));
                             costBean.costDate = cursor.getString(cursor.getColumnIndex("cost_date"));
                             costBean.costMoney = cursor.getString(cursor.getColumnIndex("cost_money"));
                             mCostBeanList.add(costBean);
    
    
                         }
                 }
                     String s = "";
                     for(int j = 0;j<mCostBeanList.size();j++){
                         s += mCostBeanList.get(j).getCostTitle();
                     }
                     mTextView.setText(s);
                 }
             });
            return view;
        }

     明天学习相关mpandroidchart相关知识。

  • 相关阅读:
    Delphi 连接 Paradox
    编译MangosZero
    关于StartCoroutine的简单线程使用
    cocos2dc-x解决中文乱码
    C++类构造函数初始化列表
    dynamic_cast
    cocos2d-x for android:SimpleGame分析
    C++宏定义详解
    四 AndEngine 画线
    三 最简单的 AndEngine 程序框架
  • 原文地址:https://www.cnblogs.com/yangxionghao/p/12772575.html
Copyright © 2020-2023  润新知