Skip to content

Commit 82c1678

Browse files
committed
移除垃圾代码
1 parent 82d134f commit 82c1678

4 files changed

Lines changed: 0 additions & 16 deletions

File tree

diycode-app/src/main/java/com/gcssloop/diycode/activity/MainActivity.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ public CharSequence getPageTitle(int position) {
120120
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
121121
@Override
122122
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
123-
124123
}
125124

126125
@Override
@@ -130,7 +129,6 @@ public void onPageSelected(int position) {
130129

131130
@Override
132131
public void onPageScrollStateChanged(int state) {
133-
134132
}
135133
});
136134

@@ -250,19 +248,13 @@ public void onBackPressed() {
250248

251249
@Override
252250
public boolean onCreateOptionsMenu(Menu menu) {
253-
// Inflate the menu; this adds items to the action bar if it is present.
254251
getMenuInflater().inflate(R.menu.main, menu);
255252
return true;
256253
}
257254

258255
@Override
259256
public boolean onOptionsItemSelected(MenuItem item) {
260-
// Handle action bar item clicks here. The action bar will
261-
// automatically handle clicks on the Home/Up button, so long
262-
// as you specify a parent activity in AndroidManifest.xml.
263257
int id = item.getItemId();
264-
265-
//noinspection SimplifiableIfStatement
266258
if (id == R.id.action_settings) {
267259
openActivity(SettingActivity.class);
268260
return true;
@@ -274,7 +266,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
274266
}
275267
return true;
276268
} else if (id == R.id.action_quick_to_top) {
277-
Logger.e("点击返回头部" + mCurrentPosition);
278269
switch (mCurrentPosition) {
279270
case 0:
280271
mFragment1.quickToTop();
@@ -292,7 +283,6 @@ public boolean onOptionsItemSelected(MenuItem item) {
292283

293284
@Override
294285
public boolean onNavigationItemSelected(MenuItem item) {
295-
// Handle navigation view item clicks here.
296286
int id = item.getItemId();
297287

298288
if (id == R.id.nav_post) {

diycode-app/src/main/java/com/gcssloop/diycode/fragment/NewsListFragment.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ public void onDestroyView() {
305305
}
306306

307307
public void quickToTop() {
308-
Logger.e("快速返回");
309308
if (mScrollView != null) {
310309
mScrollView.smoothScrollTo(0, 0);
311310
}

diycode-app/src/main/java/com/gcssloop/diycode/fragment/SitesListFragment.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,9 @@ public int getSpanSize(int position) {
129129
private void loadData() {
130130
List<Serializable> sitesList = mDataCache.getSitesItems();
131131
if (sitesList != null) {
132-
Logger.e("获取sites缓存成功");
133132
mAdapter.addDatas(sitesList);
134133
mFooter.setText(FOOTER_NORMAL);
135134
} else {
136-
Logger.e("获取sites缓存失败");
137135
mDiycode.getSites();
138136
mFooter.setText(FOOTER_LOADING);
139137
}
@@ -170,7 +168,6 @@ private void convertData(List<Sites> sitesList) {
170168
}
171169
}
172170
mAdapter.addDatas(items);
173-
Logger.e("缓存 sites");
174171
mDataCache.saveSitesItems(items);
175172
}
176173

@@ -187,7 +184,6 @@ public void onStop() {
187184
}
188185

189186
public void quickToTop() {
190-
Logger.e("快速返回");
191187
if (mScrollView != null) {
192188
mScrollView.smoothScrollTo(0, 0);
193189
}

diycode-app/src/main/java/com/gcssloop/diycode/fragment/TopicListFragment.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ public void onDestroyView() {
291291
}
292292

293293
public void quickToTop() {
294-
Logger.e("快速返回");
295294
if (mScrollView != null) {
296295
mScrollView.smoothScrollTo(0, 0);
297296
}

0 commit comments

Comments
 (0)