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

A creative solution for high conversion advertising!

When doing information flow promotion, the page c...

"Cure" or "cause cancer"? The health truth behind the aspartame controversy

According to Reuters, the artificial sweetener as...

The traffic rules behind the popularity of Douyin live streaming rooms

Can you believe it? The live broadcast room has o...

The conversion rate is too low! How to write product introduction copy?

Recently I saw an activity called “100-Day Progre...

The most important weapon of the country, fighting for the sea

recently The world's first 16MW offshore wind...

Sichuan and Chongqing dialects dominate the nation's laughter

Loading long image... Source: National Geographic...

Short video promotion and operation: Who has better ability to bring goods?

Why do the giants all want to make short videos? ...

5G RedCap: The key to continued IoT growth

Preface The first 5G New Radio (NR) network was l...