第二阶段团队冲刺5
一、认领任务
经过团队讨论,我认领到的工作是:数据的关联。
二、任务完成时间估算
界面 | 4h |
效果:
相关代码:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.search); nameList = findViewById(R.id.nameList); caloryList = findViewById(R.id.caloryList); Intent intent = getIntent(); String name = intent.getStringExtra("key1"); String name1 = null ; try { name1 = URLEncoder.encode(name,"GBK"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } // String name1 = JSON.toJSONString(name); // String name1 = java.util.Base64.getUrlEncoder().encodeToString(name.getBytes()); // String name1= Base64.encodeToString(name.getBytes(),Base64.DEFAULT); String password ="wu"; String password1 = null; try { password1 = URLEncoder.encode(password,"GBK"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } // String password1= java.util.Base64.getUrlEncoder().encodeToString(password.getBytes()); // String password1 = JSON.toJSONString(password); System.out.println(name); String path="http://120.79.40.20/testhttp/Search.Servlet";//这里是本地web的地址,先运行httptest的Servlet再启动,才不会闪退。而http://120.79.40.20/testhttp/ //调用postTask,把获取到的数据与路径放入方法中,这里没有放数据。 new postTask().execute(name1,password1,path);; }
遇到的问题:
无