Android source code, excellent pedometer

Android source code, excellent pedometer

Source code introduction: Excellent pedometer source code, record daily running mileage.

Source code effect:

Source code snippet:

  1. package com.zdp.family.pedometer;
  2.   
  3. import java.util.ArrayList;
  4.   
  5. import com.zdp.family.pedometer.R;
  6. import com.zdp.family.pedometer.adapter.ZdpLongAdapter;
  7. import com.zdp.family.pedometer.app.ZdpAplication;
  8. import com.zdp.family.pedometer.app.ZdpPubDefine;
  9. import com.zdp.family.pedometer.data.ZdpLongTitleInfo;
  10. import com.zdp.family.pedometer.thread.MessageObj;
  11. import com.zdp.family.pedometer.view.ZdpProgressDialog;
  12. import com.zdp.family.pedometer.view.ZdpPullToRefreshListView.OnRefreshListener;
  13.   
  14. import android.content.Intent;
  15. import android.os.Bundle;
  16. import android.os.Handler;
  17. import android.os.Message;
  18. import android.support.v4.app.Fragment;
  19. import android.support.v4.view.ViewPager.OnPageChangeListener;
  20. import android.view.LayoutInflater;
  21. import android.view.MotionEvent;
  22. import android.view.View;
  23. import android.view.ViewGroup;
  24. import android.view.View.OnClickListener;
  25. import android.view.View.OnTouchListener;
  26. import android.widget.AdapterView;
  27. import android.widget.Button;
  28. import android.widget.ImageView;
  29. import android.widget.ListView;
  30. import android.widget.TextView;
  31. import android.widget.AdapterView.OnItemClickListener;
  32.   
  33. public   class ZdpFragmentMain extends ZdpBaseFragment
  34. {
  35. private ListView mListView;
  36. private ZdpLongAdapter mAdapter;
  37. private ZdpProgressDialog mProgressDialog;
  38.       
  39. private Handler mCookHandler = new Handler()
  40. {
  41. @Override  
  42. public   void handleMessage(Message msg)
  43. {
  44. super .handleMessage(msg);
  45. if (getActivity().isFinishing())
  46. return ;
  47. switch (msg.what)
  48. {
  49. case ZdpPubDefine.CMD_LONG_TITLE:
  50. if (mProgressDialog.isShowing())
  51. mProgressDialog.dismiss();
  52.   
  53. break ;
  54. default :
  55. break ;
  56. }
  57. }
  58.           
  59. };
  60.       
  61. private OnItemClickListener mOnItemClickListener = new OnItemClickListener()
  62. {
  63.   
  64. @Override  
  65. public   void onItemClick(AdapterView<!--?--> arg0, View view, int position, long id)
  66. {
  67.   
  68. }
  69. };
  70.       
  71. @Override  
  72. public   void onCreate(Bundle savedInstanceState)
  73. {
  74. super .onCreate(savedInstanceState);
  75. }
  76.   
  77. @Override  
  78. public View onCreateView(LayoutInflater inflater, ViewGroup container,
  79. Bundle savedInstanceState)
  80. {
  81. View v = inflater.inflate(R.layout.main_main_fragment, container, false );
  82.   
  83. return v;
  84. }
  85.       
  86.       
  87.       
  88. @Override  
  89. public   void OnRefreshData()
  90. {
  91. super .OnRefreshData();
  92. }
  93.   
  94. public   void switchIndex(String url)
  95. {
  96. mProgressDialog.show();
  97. sendCookMessage(url);
  98. }
  99.       
  100. private   void sendCookMessage(String url)
  101. {
  102. // Message msg = new Message();  
  103. // msg.what = ZdpPubDefine.CMD_LONG_TITLE;  
  104. // msg.obj = new MessageObj(mCookHandler, url);  
  105. // ZdpAplication.getInstance().getHttpsHandler().sendMessage(msg);  
  106. }
  107.       
  108. @Override  
  109. public   void onDestroy()
  110. {
  111. super .onDestroy();
  112. }
  113.   
  114. @Override  
  115. public   void onDestroyView()
  116. {
  117. super .onDestroyView();
  118. }
  119.   
  120. }

Download address: http://download..com/data/2104429

<<:  Android source code, high imitation ink weather guide interface

>>:  Android source code, imitating Dianping pull-down animation

Recommend

Case Analysis: How does Kugou increase its user base?

This is the fifth article I have written about gr...

Review summary: Why do cash loan products fail in operation?

This article is a review and summary of the failu...

How to write the copy for New Year gift boxes? Look at what Philips wrote.

Holidays are definitely the golden period for mar...

The most comprehensive summary of Apple bidding ads ASM terms in history

Since I started working on Apple's ASM biddin...

Who is the next BAT?

Open Google, set a time range, search for the key...

Three Management Axes - Alibaba's Cadre Training Tool

Three Management Axes - Introduction to Alibaba&#...

Detailed tutorial on Red V certification on Xiaohongshu

In the past, bloggers often asked me how to get t...

Inventory of the latest Weibo advertising resources in 2018!

According to the recent "2018 China Mobile A...

B station promotion and fan-attracting skills

In summer, I believe it is not uncommon for every...