diff --git a/src/cn/trinea/android/demo/AutoScrollViewPagerInnerDemo.java b/src/cn/trinea/android/demo/AutoScrollViewPagerInnerDemo.java index d22d8f1..cd1f692 100644 --- a/src/cn/trinea/android/demo/AutoScrollViewPagerInnerDemo.java +++ b/src/cn/trinea/android/demo/AutoScrollViewPagerInnerDemo.java @@ -48,7 +48,7 @@ class myPagerAdapter extends FragmentPagerAdapter { private List fragmentList; private List titleList; - public myPagerAdapter(FragmentManager fm, List fragmentList, List titleList){ + public myPagerAdapter(FragmentManager fm, List fragmentList, List titleList) { super(fm); this.fragmentList = fragmentList; this.titleList = titleList; diff --git a/src/cn/trinea/android/demo/AutoScrollViewPagerSingleDemo.java b/src/cn/trinea/android/demo/AutoScrollViewPagerSingleDemo.java index 5f537fe..edbb30d 100644 --- a/src/cn/trinea/android/demo/AutoScrollViewPagerSingleDemo.java +++ b/src/cn/trinea/android/demo/AutoScrollViewPagerSingleDemo.java @@ -77,11 +77,9 @@ public void onPageSelected(int position) { } @Override - public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - } + public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {} @Override - public void onPageScrollStateChanged(int arg0) { - } + public void onPageScrollStateChanged(int arg0) {} } } diff --git a/src/cn/trinea/android/demo/BroadcastReceiverDemo.java b/src/cn/trinea/android/demo/BroadcastReceiverDemo.java index 969bc2c..effd310 100644 --- a/src/cn/trinea/android/demo/BroadcastReceiverDemo.java +++ b/src/cn/trinea/android/demo/BroadcastReceiverDemo.java @@ -89,7 +89,7 @@ public void onClick(View v) { Intent i = new Intent(ACTION_ORDERED_SEND); i.putExtra(MSG_KEY, getString(R.string.ordered_broadcast_msg)); sendOrderedBroadcast(i, null, new OrderedBroadcastReceiverResultReceiver(), null, Activity.RESULT_OK, - null, null); + null, null); } }); @@ -184,7 +184,7 @@ public class OrderedBroadcastReceiverPriorityHigh extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { orderedMsg.setText(String.format(getString(R.string.ordered_broadcast_high_tip), - intent.getStringExtra(MSG_KEY))); + intent.getStringExtra(MSG_KEY))); // modify broadcast content getResultExtras(true).putString(RUSULT_MSG_KEY, "High"); } @@ -197,18 +197,16 @@ public void onReceive(Context context, Intent intent) { boolean isCancel = false; if (isCancel) { orderedMsg.setText(orderedMsg.getText() - + "\r\n" - + String.format(getString(R.string.ordered_broadcast_medium_cancel_tip), - intent.getStringExtra(MSG_KEY), - getResultExtras(true).getString(RUSULT_MSG_KEY))); + + "\r\n" + + String.format(getString(R.string.ordered_broadcast_medium_cancel_tip), + intent.getStringExtra(MSG_KEY), getResultExtras(true).getString(RUSULT_MSG_KEY))); // calcel broadcast abortBroadcast(); } else { orderedMsg.setText(orderedMsg.getText() - + "\r\n" - + String.format(getString(R.string.ordered_broadcast_medium_tip), - intent.getStringExtra(MSG_KEY), - getResultExtras(true).getString(RUSULT_MSG_KEY))); + + "\r\n" + + String.format(getString(R.string.ordered_broadcast_medium_tip), + intent.getStringExtra(MSG_KEY), getResultExtras(true).getString(RUSULT_MSG_KEY))); getResultExtras(true).putString(RUSULT_MSG_KEY, "Medium"); } } @@ -219,10 +217,9 @@ public class OrderedBroadcastReceiverPriorityLow extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { orderedMsg.setText(orderedMsg.getText() - + "\r\n" - + String.format(getString(R.string.ordered_broadcast_low_tip), - intent.getStringExtra(MSG_KEY), - getResultExtras(true).getString(RUSULT_MSG_KEY))); + + "\r\n" + + String.format(getString(R.string.ordered_broadcast_low_tip), intent.getStringExtra(MSG_KEY), + getResultExtras(true).getString(RUSULT_MSG_KEY))); getResultExtras(true).putString(RUSULT_MSG_KEY, "Low"); } } @@ -232,10 +229,9 @@ public class OrderedBroadcastReceiverResultReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { orderedMsg.setText(orderedMsg.getText() - + "\r\n" - + String.format(getString(R.string.ordered_broadcast_tip), - intent.getStringExtra(MSG_KEY), - getResultExtras(true).getString(RUSULT_MSG_KEY))); + + "\r\n" + + String.format(getString(R.string.ordered_broadcast_tip), intent.getStringExtra(MSG_KEY), + getResultExtras(true).getString(RUSULT_MSG_KEY))); } } } diff --git a/src/cn/trinea/android/demo/DownloadManagerDemo.java b/src/cn/trinea/android/demo/DownloadManagerDemo.java index 1b601c3..79ffa6d 100644 --- a/src/cn/trinea/android/demo/DownloadManagerDemo.java +++ b/src/cn/trinea/android/demo/DownloadManagerDemo.java @@ -110,7 +110,7 @@ private void initView() { downloadProgress = (ProgressBar)findViewById(R.id.download_progress); downloadTip = (TextView)findViewById(R.id.download_tip); downloadTip.setText(getString(R.string.tip_download_file) - + Environment.getExternalStoragePublicDirectory(DOWNLOAD_FOLDER_NAME)); + + Environment.getExternalStoragePublicDirectory(DOWNLOAD_FOLDER_NAME)); downloadSize = (TextView)findViewById(R.id.download_size); downloadPrecent = (TextView)findViewById(R.id.download_precent); } @@ -179,7 +179,7 @@ public static boolean install(Context context, String filePath) { class DownloadChangeObserver extends ContentObserver { - public DownloadChangeObserver(){ + public DownloadChangeObserver() { super(handler); } @@ -204,11 +204,9 @@ public void onReceive(Context context, Intent intent) { updateView(); // if download successful, install apk if (downloadManagerPro.getStatusById(downloadId) == DownloadManager.STATUS_SUCCESSFUL) { - String apkFilePath = new StringBuilder(Environment.getExternalStorageDirectory().getAbsolutePath()).append(File.separator) - .append(DOWNLOAD_FOLDER_NAME) - .append(File.separator) - .append(DOWNLOAD_FILE_NAME) - .toString(); + String apkFilePath = new StringBuilder(Environment.getExternalStorageDirectory().getAbsolutePath()) + .append(File.separator).append(DOWNLOAD_FOLDER_NAME).append(File.separator) + .append(DOWNLOAD_FILE_NAME).toString(); install(context, apkFilePath); } } @@ -313,7 +311,7 @@ public static String getNotiPercent(long progress, long max) { public static boolean isDownloading(int downloadManagerStatus) { return downloadManagerStatus == DownloadManager.STATUS_RUNNING - || downloadManagerStatus == DownloadManager.STATUS_PAUSED - || downloadManagerStatus == DownloadManager.STATUS_PENDING; + || downloadManagerStatus == DownloadManager.STATUS_PAUSED + || downloadManagerStatus == DownloadManager.STATUS_PENDING; } } diff --git a/src/cn/trinea/android/demo/DropDownListViewDemo.java b/src/cn/trinea/android/demo/DropDownListViewDemo.java index f3816b2..10659e2 100644 --- a/src/cn/trinea/android/demo/DropDownListViewDemo.java +++ b/src/cn/trinea/android/demo/DropDownListViewDemo.java @@ -20,7 +20,7 @@ * DropDownListViewDemo * * @author Trinea 2013-6-1 + * target="_blank">Trinea 2013-6-1 */ public class DropDownListViewDemo extends BaseActivity { @@ -28,8 +28,8 @@ public class DropDownListViewDemo extends BaseActivity { private DropDownListView listView = null; private ArrayAdapter adapter; - private String[] mStrings = { "Aaaaaa", "Bbbbbb", "Cccccc", "Dddddd", "Eeeeee", "Ffffff", - "Gggggg", "Hhhhhh", "Iiiiii", "Jjjjjj", "Kkkkkk", "Llllll", "Mmmmmm", "Nnnnnn", }; + private String[] mStrings = {"Aaaaaa", "Bbbbbb", "Cccccc", "Dddddd", "Eeeeee", "Ffffff", + "Gggggg", "Hhhhhh", "Iiiiii", "Jjjjjj", "Kkkkkk", "Llllll", "Mmmmmm", "Nnnnnn",}; public static final int MORE_DATA_MAX_COUNT = 3; public int moreDataCount = 0; @@ -74,7 +74,7 @@ private class GetDataTask extends AsyncTask { private boolean isDropDown; - public GetDataTask(boolean isDropDown){ + public GetDataTask(boolean isDropDown) { this.isDropDown = isDropDown; } diff --git a/src/cn/trinea/android/demo/HttpCacheDemo.java b/src/cn/trinea/android/demo/HttpCacheDemo.java index 2886818..bab13c1 100644 --- a/src/cn/trinea/android/demo/HttpCacheDemo.java +++ b/src/cn/trinea/android/demo/HttpCacheDemo.java @@ -64,7 +64,7 @@ protected void onPostGet(HttpResponse httpResponse, boolean isInCache) { sb.append("is in cache: ").append(isInCache).append("\r\n"); if (isInCache) { sb.append("expires: ").append(new Date(httpResponse.getExpiredTime()).toGMTString()) - .append("\r\n"); + .append("\r\n"); } httpCacheInfoTV.setText(sb.toString()); httpGetContentTV.setText(httpResponse.getResponseBody()); diff --git a/src/cn/trinea/android/demo/ImageCacheDemo.java b/src/cn/trinea/android/demo/ImageCacheDemo.java index 6a42590..b2619a0 100644 --- a/src/cn/trinea/android/demo/ImageCacheDemo.java +++ b/src/cn/trinea/android/demo/ImageCacheDemo.java @@ -34,13 +34,12 @@ public class ImageCacheDemo extends BaseActivity { public static final int IMAGEVIEW_DEFAULT_HEIGHT = 400; public static final String TAG_CACHE = "image_cache"; /** cache folder path which be used when saving images **/ - public static final String DEFAULT_CACHE_FOLDER = new StringBuilder().append(Environment.getExternalStorageDirectory() - .getAbsolutePath()) - .append(File.separator).append("Trinea") - .append(File.separator) - .append("AndroidDemo") - .append(File.separator) - .append("ImageCache").toString(); + public static final String DEFAULT_CACHE_FOLDER = new StringBuilder() + .append(Environment.getExternalStorageDirectory() + .getAbsolutePath()).append(File.separator) + .append("Trinea").append(File.separator) + .append("AndroidDemo").append(File.separator) + .append("ImageCache").toString(); private RelativeLayout parentLayout; @Override @@ -164,9 +163,9 @@ public void onPreGet(String imageUrl, View view) { @Override public void onGetFailed(String imageUrl, Bitmap loadedImage, View view, FailedReason failedReason) { Log.e(TAG_CACHE, - new StringBuilder(128).append("get image ").append(imageUrl).append(" error, failed type is: ") - .append(failedReason.getFailedType()).append(", failed reason is: ") - .append(failedReason.getCause().getMessage()).toString()); + new StringBuilder(128).append("get image ").append(imageUrl).append(" error, failed type is: ") + .append(failedReason.getFailedType()).append(", failed reason is: ") + .append(failedReason.getCause().getMessage()).toString()); } @Override diff --git a/src/cn/trinea/android/demo/ImagePagerFragment.java b/src/cn/trinea/android/demo/ImagePagerFragment.java index 821e7e4..f2d5085 100644 --- a/src/cn/trinea/android/demo/ImagePagerFragment.java +++ b/src/cn/trinea/android/demo/ImagePagerFragment.java @@ -26,7 +26,7 @@ public class ImagePagerFragment extends Fragment { private List imageIdList; - public ImagePagerFragment(){ + public ImagePagerFragment() { super(); } @@ -69,11 +69,9 @@ public void onPageSelected(int position) { } @Override - public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { - } + public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {} @Override - public void onPageScrollStateChanged(int arg0) { - } + public void onPageScrollStateChanged(int arg0) {} } } diff --git a/src/cn/trinea/android/demo/ImageSDCardCacheDemo.java b/src/cn/trinea/android/demo/ImageSDCardCacheDemo.java index db2460e..a6e0b75 100644 --- a/src/cn/trinea/android/demo/ImageSDCardCacheDemo.java +++ b/src/cn/trinea/android/demo/ImageSDCardCacheDemo.java @@ -34,12 +34,12 @@ public class ImageSDCardCacheDemo extends BaseActivity { public static final String TAG_CACHE = "image_sdcard_cache"; /** cache folder path which be used when saving images **/ - public static final String DEFAULT_CACHE_FOLDER = new StringBuilder().append(Environment.getExternalStorageDirectory() - .getAbsolutePath()) - .append(File.separator).append("Trinea") - .append(File.separator).append("AndroidDemo") - .append(File.separator) - .append("ImageSDCardCache").toString(); + public static final String DEFAULT_CACHE_FOLDER = new StringBuilder() + .append(Environment.getExternalStorageDirectory() + .getAbsolutePath()).append(File.separator) + .append("Trinea").append(File.separator) + .append("AndroidDemo").append(File.separator) + .append("ImageSDCardCache").toString(); @Override public void onCreate(Bundle savedInstanceState) { @@ -131,9 +131,9 @@ public void onGetNotInCache(String imageUrl, View view) { @Override public void onGetFailed(String imageUrl, String imagePath, View view, FailedReason failedReason) { Log.e(TAG_CACHE, - new StringBuilder(128).append("get image ").append(imageUrl).append(" error, failed type is: ") - .append(failedReason.getFailedType()).append(", failed reason is: ") - .append(failedReason.getCause().getMessage()).toString()); + new StringBuilder(128).append("get image ").append(imageUrl).append(" error, failed type is: ") + .append(failedReason.getFailedType()).append(", failed reason is: ") + .append(failedReason.getCause().getMessage()).toString()); } }; IMAGE_SD_CACHE.setOnImageSDCallbackListener(imageCallBack); @@ -201,7 +201,7 @@ private static class ImageAdapter extends BaseAdapter { private LayoutInflater inflater; public List imageUrlList; - public ImageAdapter(Context context){ + public ImageAdapter(Context context) { super(); inflater = LayoutInflater.from(context); } diff --git a/src/cn/trinea/android/demo/MainActivity.java b/src/cn/trinea/android/demo/MainActivity.java index 7638457..caac54a 100644 --- a/src/cn/trinea/android/demo/MainActivity.java +++ b/src/cn/trinea/android/demo/MainActivity.java @@ -20,10 +20,10 @@ public class MainActivity extends BaseActivity { public static final String TAG = "DemoList"; - private static final String[] mStrings = { "AutoScrollViewPager Demo", "HttpCache Demo", "ImageCache Demo", + private static final String[] mStrings = {"AutoScrollViewPager Demo", "HttpCache Demo", "ImageCache Demo", "ImageSDCardCache Demo", "DropDownListView Demo", "onBottom onTop ScrollView Demo", "DownloadManager Demo", "SearchView Demo", "ViewPager Multi Fragment Demo", "Slide One Page Gallery Demo", "ViewPager Demo", - "Service Demo", "BroadcastReceiver Demo" }; + "Service Demo", "BroadcastReceiver Demo"}; private static final int total = mStrings.length - 1; diff --git a/src/cn/trinea/android/demo/MyIntentService.java b/src/cn/trinea/android/demo/MyIntentService.java index 63d7f12..821d44b 100644 --- a/src/cn/trinea/android/demo/MyIntentService.java +++ b/src/cn/trinea/android/demo/MyIntentService.java @@ -10,7 +10,7 @@ */ public class MyIntentService extends IntentService { - public MyIntentService(){ + public MyIntentService() { super("MyIntentService"); } @@ -18,7 +18,7 @@ public MyIntentService(){ protected void onHandleIntent(Intent intent) { try { System.out.println("IntentService1 Begin Sleep. " + "Thread name: " + Thread.currentThread().getName() - + ", Thread Id: " + Thread.currentThread().getId()); + + ", Thread Id: " + Thread.currentThread().getId()); Thread.sleep(3000); System.out.println("IntentService1 End. "); } catch (InterruptedException e) { diff --git a/src/cn/trinea/android/demo/SearchViewDemo.java b/src/cn/trinea/android/demo/SearchViewDemo.java index 9074000..b8d73f6 100644 --- a/src/cn/trinea/android/demo/SearchViewDemo.java +++ b/src/cn/trinea/android/demo/SearchViewDemo.java @@ -26,7 +26,7 @@ * SearchViewDemo * * @author Trinea - * 2013-5-9 + * 2013-5-9 */ public class SearchViewDemo extends BaseActivity { @@ -52,7 +52,7 @@ protected void onCreate(Bundle savedInstanceState) { // set title style ActionBar bar = getActionBar(); bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_HOME_AS_UP - | ActionBar.DISPLAY_SHOW_CUSTOM); + | ActionBar.DISPLAY_SHOW_CUSTOM); setTitle(" "); LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); View customActionBarView = inflater.inflate(R.layout.search_view_demo_title, null); @@ -90,13 +90,14 @@ public boolean onQueryTextChange(String newText) { } }); Display display = getWindowManager().getDefaultDisplay(); - LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, - LayoutParams.WRAP_CONTENT, Gravity.CENTER_VERTICAL | Gravity.RIGHT); + LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, + Gravity.CENTER_VERTICAL | Gravity.RIGHT); bar.setCustomView(customActionBarView, params); // show keyboard - getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE - | WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); + getWindow().setSoftInputMode( + WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE + | WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); } public void showSearchTip(String newText) { @@ -108,7 +109,7 @@ class SearchTipThread implements Runnable { String newText; - public SearchTipThread(String newText){ + public SearchTipThread(String newText) { this.newText = newText; } diff --git a/src/cn/trinea/android/demo/ServiceDemo.java b/src/cn/trinea/android/demo/ServiceDemo.java index 771a7c2..f18f4fc 100644 --- a/src/cn/trinea/android/demo/ServiceDemo.java +++ b/src/cn/trinea/android/demo/ServiceDemo.java @@ -46,7 +46,7 @@ public class ServiceDemo extends BaseActivity { @Override public void onServiceDisconnected(ComponentName name) { Toast.makeText(getApplicationContext(), "Service disconnect", - Toast.LENGTH_SHORT).show(); + Toast.LENGTH_SHORT).show(); } /** @@ -55,7 +55,8 @@ public void onServiceDisconnected(ComponentName name) { @Override public void onServiceConnected(ComponentName name, IBinder service) { myService = ((MyBinder)service).getService(); - Toast.makeText(getApplicationContext(), "Service Connect", Toast.LENGTH_SHORT).show(); + Toast.makeText(getApplicationContext(), "Service Connect", Toast.LENGTH_SHORT) + .show(); } }; @@ -112,7 +113,7 @@ public void onClick(View v) { public void onClick(View v) { if (myService != null) { ToastUtils.show(context, R.string.operate_value_success, - Integer.toString(myService.increaseCount())); + Integer.toString(myService.increaseCount())); } else { ToastUtils.show(context, R.string.bind_service_tip, Toast.LENGTH_SHORT); } diff --git a/src/cn/trinea/android/demo/SlideOnePageGalleryDemo.java b/src/cn/trinea/android/demo/SlideOnePageGalleryDemo.java index a5d6de3..693308d 100644 --- a/src/cn/trinea/android/demo/SlideOnePageGalleryDemo.java +++ b/src/cn/trinea/android/demo/SlideOnePageGalleryDemo.java @@ -26,15 +26,13 @@ protected void onCreate(Bundle savedInstanceState) { imageGallery.setOnItemClickListener(new OnItemClickListener() { @Override - public void onItemClick(AdapterView parent, View view, int position, long id) { - } + public void onItemClick(AdapterView parent, View view, int position, long id) {} }); imageGallery.setOnItemSelectedListener(new OnItemSelectedListener() { @Override - public void onItemSelected(AdapterView parent, View view, int position, long id) { - } + public void onItemSelected(AdapterView parent, View view, int position, long id) {} @Override public void onNothingSelected(AdapterView parent) { diff --git a/src/cn/trinea/android/demo/ViewPagerDemo.java b/src/cn/trinea/android/demo/ViewPagerDemo.java index dafbe4a..cb30759 100644 --- a/src/cn/trinea/android/demo/ViewPagerDemo.java +++ b/src/cn/trinea/android/demo/ViewPagerDemo.java @@ -49,7 +49,7 @@ class myPagerAdapter extends FragmentPagerAdapter { private List fragmentList; private List titleList; - public myPagerAdapter(FragmentManager fm, List fragmentList, List titleList){ + public myPagerAdapter(FragmentManager fm, List fragmentList, List titleList) { super(fm); this.fragmentList = fragmentList; this.titleList = titleList; diff --git a/src/cn/trinea/android/demo/ViewPagerFragment.java b/src/cn/trinea/android/demo/ViewPagerFragment.java index 53b93ee..0fa5a53 100644 --- a/src/cn/trinea/android/demo/ViewPagerFragment.java +++ b/src/cn/trinea/android/demo/ViewPagerFragment.java @@ -13,7 +13,7 @@ */ public class ViewPagerFragment extends Fragment { - public ViewPagerFragment(){ + public ViewPagerFragment() { super(); } diff --git a/src/cn/trinea/android/demo/ViewPagerMulTiFragmentDemo.java b/src/cn/trinea/android/demo/ViewPagerMulTiFragmentDemo.java index c6cd3ff..13b6926 100644 --- a/src/cn/trinea/android/demo/ViewPagerMulTiFragmentDemo.java +++ b/src/cn/trinea/android/demo/ViewPagerMulTiFragmentDemo.java @@ -103,8 +103,7 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse } @Override - public void onPageScrollStateChanged(int arg0) { - } + public void onPageScrollStateChanged(int arg0) {} } @Override diff --git a/src/cn/trinea/android/demo/adapter/ImageListAdapter.java b/src/cn/trinea/android/demo/adapter/ImageListAdapter.java index 7a99246..3b19439 100644 --- a/src/cn/trinea/android/demo/adapter/ImageListAdapter.java +++ b/src/cn/trinea/android/demo/adapter/ImageListAdapter.java @@ -21,7 +21,7 @@ public class ImageListAdapter extends BaseAdapter { private LayoutInflater inflater; public List imageResIdList; - public ImageListAdapter(Context context){ + public ImageListAdapter(Context context) { super(); inflater = LayoutInflater.from(context); } diff --git a/src/cn/trinea/android/demo/adapter/ImagePagerAdapter.java b/src/cn/trinea/android/demo/adapter/ImagePagerAdapter.java index 718b18f..9a44fb8 100644 --- a/src/cn/trinea/android/demo/adapter/ImagePagerAdapter.java +++ b/src/cn/trinea/android/demo/adapter/ImagePagerAdapter.java @@ -1,9 +1,7 @@ /* - * Copyright 2014 trinea.cn All right reserved. This software is the - * confidential and proprietary information of trinea.cn ("Confidential - * Information"). You shall not disclose such Confidential Information and shall - * use it only in accordance with the terms of the license agreement you entered - * into with trinea.cn. + * Copyright 2014 trinea.cn All right reserved. This software is the confidential and proprietary information of + * trinea.cn ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in + * accordance with the terms of the license agreement you entered into with trinea.cn. */ package cn.trinea.android.demo.adapter; @@ -27,7 +25,7 @@ public class ImagePagerAdapter extends PagerAdapter { private Context context; private List imageIdList; - public ImagePagerAdapter(Context context, List imageIdList){ + public ImagePagerAdapter(Context context, List imageIdList) { this.context = context; this.imageIdList = imageIdList; } diff --git a/src/cn/trinea/android/demo/utils/AppUtils.java b/src/cn/trinea/android/demo/utils/AppUtils.java index 5136293..d37e259 100644 --- a/src/cn/trinea/android/demo/utils/AppUtils.java +++ b/src/cn/trinea/android/demo/utils/AppUtils.java @@ -52,10 +52,10 @@ private static void initActionBar(final Activity activity) { ActionBar bar = activity.getActionBar(); if (activity instanceof MainActivity) { bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM - | ActionBar.DISPLAY_SHOW_HOME); + | ActionBar.DISPLAY_SHOW_HOME); } else { bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_HOME_AS_UP - | ActionBar.DISPLAY_SHOW_CUSTOM); + | ActionBar.DISPLAY_SHOW_CUSTOM); } } @@ -130,12 +130,13 @@ private static String[] getText(Activity activity) { url = "http://www.trinea.cn"; contentSrcId = R.string.desc_default; } - String[] result = new String[] { url, - getUrlInfo(activity.getString(prefixSrcId), url, activity.getString(contentSrcId)) }; + String[] result = new String[] {url, + getUrlInfo(activity.getString(prefixSrcId), url, activity.getString(contentSrcId))}; return result; } private static String getUrlInfo(String prefix, String url, String content) { - return new StringBuilder().append(prefix).append("").append(content).append("").toString(); + return new StringBuilder().append(prefix).append("").append(content) + .append("").toString(); } }