From 01aeb8f9d3351c2a8785481289ffa97feacde4a9 Mon Sep 17 00:00:00 2001 From: zengfantian Date: Thu, 29 Oct 2015 10:33:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=88=9D=E5=A7=8B=E5=8C=96Ac?= =?UTF-8?q?tionbar=E6=96=B9=E6=B3=95=EF=BC=8C2.3=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=B2=A1=E6=9C=89actionbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fadingactionbar/HeaderOverlayActivity.java | 15 ++++++++------- .../sample/fadingactionbar/HomeActivity.java | 2 +- .../fadingactionbar/LightActionBarActivity.java | 2 +- .../fadingactionbar/LightBackgroundActivity.java | 2 +- .../sample/fadingactionbar/ListViewActivity.java | 2 +- .../fadingactionbar/NavigationDrawerActivity.java | 2 +- .../fadingactionbar/NoParallaxActivity.java | 2 +- .../fadingactionbar/SampleFragmentActivity.java | 2 +- .../fadingactionbar/ScrollViewActivity.java | 2 +- .../fadingactionbar/ShortContentActivity.java | 4 ++-- .../sample/fadingactionbar/WebViewActivity.java | 2 +- .../sample/image/blur/ImageBlurActivity.java | 2 +- .../sample/pulltorefresh/LauncherActivity.java | 2 +- .../PullToRefreshExpandableListActivity.java | 2 +- .../pulltorefresh/PullToRefreshGridActivity.java | 2 +- ...PullToRefreshHorizontalScrollViewActivity.java | 2 +- .../pulltorefresh/PullToRefreshListActivity.java | 2 +- .../PullToRefreshListFragmentActivity.java | 2 +- .../PullToRefreshListInViewPagerActivity.java | 2 +- .../PullToRefreshScrollViewActivity.java | 2 +- .../PullToRefreshViewPagerActivity.java | 2 +- .../PullToRefreshWebView2Activity.java | 2 +- .../PullToRefreshWebViewActivity.java | 2 +- 23 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java b/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java index 37abc84..897c557 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/HeaderOverlayActivity.java @@ -15,21 +15,22 @@ */ package com.zftlive.android.sample.fadingactionbar; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.widget.ArrayAdapter; import android.widget.ListView; + import com.zftlive.android.R; -import com.zftlive.android.library.common.ActionBarManager; import com.zftlive.android.library.widget.fadingactionbar.FadingActionBarHelper; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; + public class HeaderOverlayActivity extends Activity { @SuppressLint("NewApi") @@ -51,7 +52,7 @@ public class HeaderOverlayActivity extends Activity { listView.setAdapter(adapter); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(getContext(), getActionBar(), this.getClass().getSimpleName()); } /** diff --git a/src/com/zftlive/android/sample/fadingactionbar/HomeActivity.java b/src/com/zftlive/android/sample/fadingactionbar/HomeActivity.java index 15814fd..e843f07 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/HomeActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/HomeActivity.java @@ -50,7 +50,7 @@ public class HomeActivity extends ListActivity { setListAdapter(new ArrayAdapter( this, android.R.layout.simple_list_item_1, android.R.id.text1, titles)); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/LightActionBarActivity.java b/src/com/zftlive/android/sample/fadingactionbar/LightActionBarActivity.java index c370fcd..63d957e 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/LightActionBarActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/LightActionBarActivity.java @@ -40,7 +40,7 @@ public class LightActionBarActivity extends Activity { helper.initActionBar(this); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/LightBackgroundActivity.java b/src/com/zftlive/android/sample/fadingactionbar/LightBackgroundActivity.java index cf2c68f..1019867 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/LightBackgroundActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/LightBackgroundActivity.java @@ -38,7 +38,7 @@ public class LightBackgroundActivity extends Activity { helper.initActionBar(this); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/ListViewActivity.java b/src/com/zftlive/android/sample/fadingactionbar/ListViewActivity.java index 7e54dc8..eae0cf8 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/ListViewActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/ListViewActivity.java @@ -52,7 +52,7 @@ public class ListViewActivity extends Activity { adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, items); listView.setAdapter(adapter); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } /** diff --git a/src/com/zftlive/android/sample/fadingactionbar/NavigationDrawerActivity.java b/src/com/zftlive/android/sample/fadingactionbar/NavigationDrawerActivity.java index 2d18681..78d25dd 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/NavigationDrawerActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/NavigationDrawerActivity.java @@ -97,7 +97,7 @@ public class NavigationDrawerActivity extends Activity implements AdapterView.On selectItem(0); } //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/NoParallaxActivity.java b/src/com/zftlive/android/sample/fadingactionbar/NoParallaxActivity.java index 57c253b..f22a57f 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/NoParallaxActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/NoParallaxActivity.java @@ -40,7 +40,7 @@ public class NoParallaxActivity extends Activity { helper.initActionBar(this); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/SampleFragmentActivity.java b/src/com/zftlive/android/sample/fadingactionbar/SampleFragmentActivity.java index 4e37a3e..6d19ddc 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/SampleFragmentActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/SampleFragmentActivity.java @@ -30,7 +30,7 @@ public class SampleFragmentActivity extends Activity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fragment); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/ScrollViewActivity.java b/src/com/zftlive/android/sample/fadingactionbar/ScrollViewActivity.java index a38679f..fe9f64f 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/ScrollViewActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/ScrollViewActivity.java @@ -37,7 +37,7 @@ public class ScrollViewActivity extends Activity { setContentView(helper.createView(this)); helper.initActionBar(this); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/ShortContentActivity.java b/src/com/zftlive/android/sample/fadingactionbar/ShortContentActivity.java index ca5d216..d8bdf07 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/ShortContentActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/ShortContentActivity.java @@ -19,8 +19,8 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.os.Bundle; import android.view.Menu; + import com.zftlive.android.R; -import com.zftlive.android.library.common.ActionBarManager; import com.zftlive.android.library.widget.fadingactionbar.FadingActionBarHelper; public class ShortContentActivity extends Activity { @@ -37,7 +37,7 @@ public class ShortContentActivity extends Activity { setContentView(helper.createView(this)); helper.initActionBar(this); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/fadingactionbar/WebViewActivity.java b/src/com/zftlive/android/sample/fadingactionbar/WebViewActivity.java index 5bbaf19..8bda44a 100644 --- a/src/com/zftlive/android/sample/fadingactionbar/WebViewActivity.java +++ b/src/com/zftlive/android/sample/fadingactionbar/WebViewActivity.java @@ -43,7 +43,7 @@ public class WebViewActivity extends Activity { webView.setWebViewClient(new WebViewClient()); webView.loadUrl("http://en.wikipedia.org/wiki/New_York_City"); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/image/blur/ImageBlurActivity.java b/src/com/zftlive/android/sample/image/blur/ImageBlurActivity.java index ba8384c..fd28be8 100644 --- a/src/com/zftlive/android/sample/image/blur/ImageBlurActivity.java +++ b/src/com/zftlive/android/sample/image/blur/ImageBlurActivity.java @@ -34,7 +34,7 @@ public class ImageBlurActivity extends FragmentActivity { // 初始化带返回按钮的标题栏 String strCenterTitle = getResources().getString(R.string.ImageBlurActivity); - ActionBarManager.initBackTitle(this, getActionBar(),strCenterTitle); +// ActionBarManager.initBackTitle(this, getActionBar(),strCenterTitle); pagerAdapter = new CustomPagerAdapter(getSupportFragmentManager()); diff --git a/src/com/zftlive/android/sample/pulltorefresh/LauncherActivity.java b/src/com/zftlive/android/sample/pulltorefresh/LauncherActivity.java index 1822877..288fd4a 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/LauncherActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/LauncherActivity.java @@ -35,7 +35,7 @@ public class LauncherActivity extends ListActivity { super.onCreate(savedInstanceState); setListAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, options)); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshExpandableListActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshExpandableListActivity.java index d16b911..b8c75d6 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshExpandableListActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshExpandableListActivity.java @@ -77,7 +77,7 @@ public final class PullToRefreshExpandableListActivity extends ExpandableListAct android.R.layout.simple_expandable_list_item_2, new String[] { KEY }, new int[] { android.R.id.text1 }); setListAdapter(mAdapter); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private class GetDataTask extends AsyncTask { diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshGridActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshGridActivity.java index e2dc701..ee01dbe 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshGridActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshGridActivity.java @@ -81,7 +81,7 @@ public final class PullToRefreshGridActivity extends Activity { mAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, mListItems); mGridView.setAdapter(mAdapter); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private class GetDataTask extends AsyncTask { diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshHorizontalScrollViewActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshHorizontalScrollViewActivity.java index c01f66b..9243375 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshHorizontalScrollViewActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshHorizontalScrollViewActivity.java @@ -49,7 +49,7 @@ public final class PullToRefreshHorizontalScrollViewActivity extends Activity { mScrollView = mPullRefreshScrollView.getRefreshableView(); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private class GetDataTask extends AsyncTask { diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListActivity.java index 1e4d7b8..4af2240 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListActivity.java @@ -108,7 +108,7 @@ public final class PullToRefreshListActivity extends ListActivity { // mPullRefreshListView.setAdapter(mAdapter) actualListView.setAdapter(mAdapter); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private class GetDataTask extends AsyncTask { diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListFragmentActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListFragmentActivity.java index 3c60ff6..6d7b86d 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListFragmentActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListFragmentActivity.java @@ -67,7 +67,7 @@ public final class PullToRefreshListFragmentActivity extends FragmentActivity im mPullRefreshListFragment.setListShown(true); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListInViewPagerActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListInViewPagerActivity.java index eda6db2..02f388f 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListInViewPagerActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshListInViewPagerActivity.java @@ -40,7 +40,7 @@ public class PullToRefreshListInViewPagerActivity extends Activity implements On mViewPager = (ViewPager) findViewById(R.id.vp_list); mViewPager.setAdapter(new ListViewPagerAdapter()); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private class ListViewPagerAdapter extends PagerAdapter { diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshScrollViewActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshScrollViewActivity.java index 1a37ea7..870d240 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshScrollViewActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshScrollViewActivity.java @@ -49,7 +49,7 @@ public final class PullToRefreshScrollViewActivity extends Activity { mScrollView = mPullRefreshScrollView.getRefreshableView(); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private class GetDataTask extends AsyncTask { diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshViewPagerActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshViewPagerActivity.java index 8eb833c..0e1e212 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshViewPagerActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshViewPagerActivity.java @@ -47,7 +47,7 @@ public class PullToRefreshViewPagerActivity extends Activity implements OnRefres ViewPager vp = mPullToRefreshViewPager.getRefreshableView(); vp.setAdapter(new SamplePagerAdapter()); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } @Override diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebView2Activity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebView2Activity.java index 3244fd5..7f1ed57 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebView2Activity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebView2Activity.java @@ -46,7 +46,7 @@ public final class PullToRefreshWebView2Activity extends Activity implements OnR // sample, see that file for the Javascript implementation webView.loadUrl("file:///android_asset/ptr_webview2_sample.html"); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private static class SampleWebViewClient extends WebViewClient { diff --git a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebViewActivity.java b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebViewActivity.java index 57a8442..ff28304 100644 --- a/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebViewActivity.java +++ b/src/com/zftlive/android/sample/pulltorefresh/PullToRefreshWebViewActivity.java @@ -43,7 +43,7 @@ public final class PullToRefreshWebViewActivity extends Activity { mWebView.setWebViewClient(new SampleWebViewClient()); mWebView.loadUrl("http://www.google.com"); //初始化带返回按钮的标题栏 - ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); +// ActionBarManager.initBackTitle(this, getActionBar(), this.getClass().getSimpleName()); } private static class SampleWebViewClient extends WebViewClient {