GithubHelp home page GithubHelp logo

todo's Introduction

ToDo

Đây là project mình làm Android đầu tiên

TODO 30-10-2016 Bat dau customize Appdapter activity 1 -> activity 2 * Tại activity 1 * //Tạo Intent để mở ResultActivity Intent myIntent=new Intent(MainActivity.this, ResultActivity.class); //Khai báo Bundle Bundle bundle=new Bundle(); int a=Integer.parseInt(txta.getText().toString()); int b=Integer.parseInt(txtb.getText().toString()); //đưa dữ liệu riêng lẻ vào Bundle bundle.putInt("soa", a); bundle.putInt("sob", b); //Đưa Bundle vào Intent myIntent.putExtra("MyPackage", bundle); //Mở Activity ResultActivity startActivity(myIntent); / /* * Tại activity 2 * //lấy intent gọi Activity này Intent callerIntent=getIntent(); //có intent rồi thì lấy Bundle dựa vào MyPackage Bundle packageFromCaller= callerIntent.getBundleExtra("MyPackage"); //Có Bundle rồi thì lấy các thông số dựa vào soa, sob int a=packageFromCaller.getInt("soa"); int b=packageFromCaller.getInt("sob");

todo's People

Contributors

phatntuit avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.