重命名

This commit is contained in:
seven332 committed 2014-07-25 14:26:34 +08:00
1 parent ff2ed3205d
commit 802c11bed1
13 files changed
+96 -96

No files matched your search

+4 -4
View File
@@ -47,7 +47,7 @@
</intent-filter>
</activity>
<activity
android:name="com.hippo.ehviewer.ui.MangaListActivity"
android:name="com.hippo.ehviewer.ui.GellaryListActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
@@ -62,7 +62,7 @@
android:resource="@xml/searchable" />
</activity>
<activity
android:name="com.hippo.ehviewer.ui.MangaDetailActivity"
android:name="com.hippo.ehviewer.ui.GellaryDetailActivity"
android:configChanges="orientation|screenSize"
android:launchMode="singleTask"
android:screenOrientation="behind"
@@ -81,7 +81,7 @@
</intent-filter>
</activity>
<activity
android:name="com.hippo.ehviewer.ui.MangaActivity"
android:name="com.hippo.ehviewer.ui.GellaryActivity"
android:configChanges="orientation|screenSize"
android:screenOrientation="behind" >
</activity>
@@ -113,7 +113,7 @@
android:value="com.hippo.ehviewer.activity.MangaListActivity" />
</activity>
<activity
android:name="com.hippo.ehviewer.ui.MangaDownloadActivity"
android:name="com.hippo.ehviewer.ui.GellaryDownloadActivity"
android:configChanges="orientation|screenSize"
android:icon="@drawable/ic_action_download"
android:label="@string/download"
+2 -2
View File
@@ -16,7 +16,7 @@
package com.hippo.ehviewer;
import com.hippo.ehviewer.ui.MangaListActivity;
import com.hippo.ehviewer.ui.GellaryListActivity;
import com.hippo.ehviewer.util.Config;
import com.hippo.ehviewer.util.Crash;
import com.hippo.ehviewer.widget.AlertButton;
@@ -277,7 +277,7 @@ public class StartActivity extends Activity {
}
private void redirectTo(){
Intent intent = new Intent(this, MangaListActivity.class);
Intent intent = new Intent(this, GellaryListActivity.class);
startActivity(intent);
finish();
}
@@ -31,7 +31,7 @@ import android.view.View.OnClickListener;
import com.hippo.ehviewer.ImageLoader;
import com.hippo.ehviewer.drawable.StableBitmapDrawable;
import com.hippo.ehviewer.ui.MangaActivity;
import com.hippo.ehviewer.ui.GellaryActivity;
import com.hippo.ehviewer.util.Config;
import com.hippo.ehviewer.util.Ui;
import com.hippo.ehviewer.widget.AutoWrapLayout;
@@ -95,7 +95,7 @@ public class LargePreviewList extends PreviewList {
public void onClick(View v) {
// Add to read in Data
Intent intent = new Intent(mActivity,
MangaActivity.class);
GellaryActivity.class);
intent.putExtra("url", ((TextViewWithUrl)v).url);
intent.putExtra("gid", mGi.gid);
intent.putExtra("title", mGi.title);
@@ -28,7 +28,7 @@ import android.view.View;
import android.view.View.OnClickListener;
import com.hippo.ehviewer.ImageLoader;
import com.hippo.ehviewer.ui.MangaActivity;
import com.hippo.ehviewer.ui.GellaryActivity;
import com.hippo.ehviewer.util.Ui;
import com.hippo.ehviewer.widget.AutoWrapLayout;
@@ -122,7 +122,7 @@ public class NormalPreviewList extends PreviewList{
public void onClick(View v) {
// Add to read in Data
Intent intent = new Intent(mActivity,
MangaActivity.class);
GellaryActivity.class);
intent.putExtra("url", ((TextViewWithUrl)v).url);
intent.putExtra("gid", mGi.gid);
intent.putExtra("title", mGi.title);
@@ -50,7 +50,7 @@ public class CommentsSectionFragment extends Fragment
@SuppressWarnings("unused")
private static final String TAG = "CommentsSectionFragment";
private MangaDetailActivity mActivity;
private GellaryDetailActivity mActivity;
private View mRootView;
private ListView mList;
@@ -66,7 +66,7 @@ public class CommentsSectionFragment extends Fragment
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mActivity = (MangaDetailActivity)getActivity();
mActivity = (GellaryDetailActivity)getActivity();
mRootView = inflater.inflate(
R.layout.comments, container, false);
@@ -150,10 +150,10 @@ public class CommentsSectionFragment extends Fragment
case 1:
mActivity.finish();
Intent intent = new Intent(mActivity, MangaListActivity.class);
intent.setAction(MangaListActivity.ACTION_GALLERY_LIST);
intent.putExtra(MangaListActivity.KEY_MODE, ListUrls.UPLOADER);
intent.putExtra(MangaListActivity.KEY_UPLOADER, c.user);
Intent intent = new Intent(mActivity, GellaryListActivity.class);
intent.setAction(GellaryListActivity.ACTION_GALLERY_LIST);
intent.putExtra(GellaryListActivity.KEY_MODE, ListUrls.UPLOADER);
intent.putExtra(GellaryListActivity.KEY_UPLOADER, c.user);
startActivity(intent);
break;
}
@@ -81,7 +81,7 @@ public class DetailSectionFragment extends Fragment
private static final String TAG = DetailSectionFragment.class.getSimpleName();
private AppContext mAppContext;
private MangaDetailActivity mActivity;
private GellaryDetailActivity mActivity;
private EhClient mClient;
private Data mData;
private GalleryDetail mGalleryDetail;
@@ -227,7 +227,7 @@ public class DetailSectionFragment extends Fragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mActivity = (MangaDetailActivity)getActivity();
mActivity = (GellaryDetailActivity)getActivity();
mAppContext = (AppContext)mActivity.getApplication();
mClient = mAppContext.getEhClient();
mData = mAppContext.getData();
@@ -477,11 +477,11 @@ public class DetailSectionFragment extends Fragment
public void onClick(View v) {
mTagDialog.dismiss();
mActivity.finish();
Intent intent = new Intent(mActivity,MangaListActivity.class);
intent.setAction(MangaListActivity.ACTION_GALLERY_LIST);
intent.putExtra(MangaListActivity.KEY_MODE,
Intent intent = new Intent(mActivity,GellaryListActivity.class);
intent.setAction(GellaryListActivity.ACTION_GALLERY_LIST);
intent.putExtra(GellaryListActivity.KEY_MODE,
ListUrls.TAG);
intent.putExtra(MangaListActivity.KEY_TAG, groupName + ":" + tagText);
intent.putExtra(GellaryListActivity.KEY_TAG, groupName + ":" + tagText);
startActivity(intent);
}
});
@@ -627,10 +627,10 @@ public class DetailSectionFragment extends Fragment
public void onClick(View v) {
if (v == mUploader) {
mActivity.finish();
Intent intent = new Intent(mActivity, MangaListActivity.class);
intent.setAction(MangaListActivity.ACTION_GALLERY_LIST);
intent.putExtra(MangaListActivity.KEY_MODE, ListUrls.UPLOADER);
intent.putExtra(MangaListActivity.KEY_UPLOADER, mUploader.getText());
Intent intent = new Intent(mActivity, GellaryListActivity.class);
intent.setAction(GellaryListActivity.ACTION_GALLERY_LIST);
intent.putExtra(GellaryListActivity.KEY_MODE, ListUrls.UPLOADER);
intent.putExtra(GellaryListActivity.KEY_UPLOADER, mUploader.getText());
startActivity(intent);
} else if (v == mRateButton) {
@@ -640,7 +640,7 @@ public class DetailSectionFragment extends Fragment
mData.addRead(mGalleryDetail);
Intent intent = new Intent(mActivity,
MangaActivity.class);
GellaryActivity.class);
intent.putExtra("url", mGalleryDetail.firstPage);
intent.putExtra("gid", mGalleryDetail.gid);
intent.putExtra("title", mGalleryDetail.title);
+10 -10
View File
@@ -98,11 +98,11 @@ public class DownloadActivity extends AbstractActivity {
case 2:
DownloadInfo di= mDownloadInfos.get(longClickItemIndex);
Intent intent = new Intent(DownloadActivity.this,
MangaDownloadActivity.class);
intent.putExtra(MangaDownloadActivity.KEY_TITLE, di.title);
intent.putExtra(MangaDownloadActivity.KEY_SIZE, di.pageSum);
intent.putExtra(MangaDownloadActivity.KEY_GID, Integer.parseInt(di.gid));
intent.putExtra(MangaDownloadActivity.KEY_END_INDEX, di.lastStartIndex);
GellaryDownloadActivity.class);
intent.putExtra(GellaryDownloadActivity.KEY_TITLE, di.title);
intent.putExtra(GellaryDownloadActivity.KEY_SIZE, di.pageSum);
intent.putExtra(GellaryDownloadActivity.KEY_GID, Integer.parseInt(di.gid));
intent.putExtra(GellaryDownloadActivity.KEY_END_INDEX, di.lastStartIndex);
startActivity(intent);
default:
break;
@@ -305,11 +305,11 @@ public class DownloadActivity extends AbstractActivity {
@Override
public void onClick(View v) {
Intent intent = new Intent(DownloadActivity.this,
MangaDownloadActivity.class);
intent.putExtra(MangaDownloadActivity.KEY_TITLE, di.title);
intent.putExtra(MangaDownloadActivity.KEY_SIZE, di.pageSum);
intent.putExtra(MangaDownloadActivity.KEY_GID, Integer.parseInt(di.gid));
intent.putExtra(MangaDownloadActivity.KEY_END_INDEX, di.lastStartIndex);
GellaryDownloadActivity.class);
intent.putExtra(GellaryDownloadActivity.KEY_TITLE, di.title);
intent.putExtra(GellaryDownloadActivity.KEY_SIZE, di.pageSum);
intent.putExtra(GellaryDownloadActivity.KEY_GID, Integer.parseInt(di.gid));
intent.putExtra(GellaryDownloadActivity.KEY_END_INDEX, di.lastStartIndex);
startActivity(intent);
}
});
@@ -178,10 +178,10 @@ public class FavouriteActivity extends AbstractGalleryActivity
public void onItemClick(AdapterView<?> arg0, View arg1,
int position, long arg3) {
Intent intent = new Intent(FavouriteActivity.this,
MangaDetailActivity.class);
GellaryDetailActivity.class);
GalleryInfo gi = getGalleryInfo(position);
intent.putExtra("url", mClient.getDetailUrl(gi.gid, gi.token));
intent.putExtra(MangaDetailActivity.KEY_G_INFO, gi);
intent.putExtra(GellaryDetailActivity.KEY_G_INFO, gi);
startActivity(intent);
}
});
@@ -49,7 +49,7 @@ import android.view.View;
import android.view.WindowManager;
import android.widget.RelativeLayout;
public class MangaActivity extends AbstractActivity {
public class GellaryActivity extends AbstractActivity {
private String TAG = "MangaActivity";
private AppContext mAppContext;
@@ -120,7 +120,7 @@ public class MangaActivity extends AbstractActivity {
final String imageName = String.format("%05d", index + 1) + "." + Util.getExtension(imageUrl);
final Downloader downloader = new Downloader(MangaActivity.this);
final Downloader downloader = new Downloader(GellaryActivity.this);
try {
downloader.resetData(mFolder.getPath(),
imageName,
@@ -199,7 +199,7 @@ public class MangaActivity extends AbstractActivity {
retryTimes++;
int targetPage = (Integer)checkFlag;
if (retryTimes < maxRetry) {
new SuperToast(MangaActivity.this)
new SuperToast(GellaryActivity.this)
.setIcon(R.drawable.ic_warning)
.setMessage(eMsg + " " +
String.format(getString(R.string.em_retry_times), retryTimes))
@@ -217,12 +217,12 @@ public class MangaActivity extends AbstractActivity {
if (targetPage == firstPage - 1 &&
getPrePage == true) {
getPrePage = false;
new SuperToast(MangaActivity.this)
new SuperToast(GellaryActivity.this)
.setIcon(R.drawable.ic_warning)
.setMessage(R.string.retry_max_pre).show();
}
else {
new SuperToast(MangaActivity.this)
new SuperToast(GellaryActivity.this)
.setIcon(R.drawable.ic_warning)
.setMessage(R.string.retry_max_next).show();
mStop = true;
@@ -294,12 +294,12 @@ public class MangaActivity extends AbstractActivity {
isv.setOnEdgeListener(new GalleryView.OnEdgeListener() {
@Override
public void onLastPageEdge() {
new SuperToast(MangaActivity.this)
new SuperToast(GellaryActivity.this)
.setMessage(R.string.last_page).show();
}
@Override
public void onFirstPageEdge() {
new SuperToast(MangaActivity.this)
new SuperToast(GellaryActivity.this)
.setMessage(R.string.first_page).show();
}
});
@@ -55,7 +55,7 @@ import com.hippo.ehviewer.widget.AlertButton;
import com.hippo.ehviewer.widget.DialogBuilder;
import com.hippo.ehviewer.widget.SuperToast;
public class MangaDetailActivity extends AbstractFragmentActivity
public class GellaryDetailActivity extends AbstractFragmentActivity
implements ActionBar.TabListener {
@SuppressWarnings("unused")
@@ -167,7 +167,7 @@ public class MangaDetailActivity extends AbstractFragmentActivity
}
// Download service
Intent it = new Intent(MangaDetailActivity.this, DownloadService.class);
Intent it = new Intent(GellaryDetailActivity.this, DownloadService.class);
bindService(it, mServiceConn, BIND_AUTO_CREATE);
}
@@ -224,11 +224,11 @@ public class MangaDetailActivity extends AbstractFragmentActivity
mGalleryDetail.token, defaultFavorite, null, new EhClient.OnAddToFavoriteListener() {
@Override
public void onSuccess() {
new SuperToast(MangaDetailActivity.this).setMessage(R.string.toast_add_favourite).show();
new SuperToast(GellaryDetailActivity.this).setMessage(R.string.toast_add_favourite).show();
}
@Override
public void onFailure(String eMsg) {
new SuperToast(MangaDetailActivity.this).setMessage(R.string.failed_to_add).show();
new SuperToast(GellaryDetailActivity.this).setMessage(R.string.failed_to_add).show();
}
});
}
@@ -237,7 +237,7 @@ public class MangaDetailActivity extends AbstractFragmentActivity
if (mGalleryDetail.language == null) {
new SuperToast(this).setMessage(R.string.wait).show();
} else {
Intent it = new Intent(MangaDetailActivity.this, DownloadService.class);
Intent it = new Intent(GellaryDetailActivity.this, DownloadService.class);
startService(it);
mServiceConn.getService().add(String.valueOf(mGalleryDetail.gid), mGalleryDetail.thumb,
EhClient.getDetailUrl(mGalleryDetail.gid, mGalleryDetail.token, 0, Config.getMode()),
@@ -301,7 +301,7 @@ public class MangaDetailActivity extends AbstractFragmentActivity
}
@Override
public void onFailure(String eMsg) {
new SuperToast(MangaDetailActivity.this, eMsg)
new SuperToast(GellaryDetailActivity.this, eMsg)
.setIcon(R.drawable.ic_warning).show();
}
});
@@ -36,7 +36,7 @@ import android.view.View;
import android.view.WindowManager;
import android.widget.RelativeLayout;
public class MangaDownloadActivity extends AbstractActivity {
public class GellaryDownloadActivity extends AbstractActivity {
private static final String TAG = "MangaDownloadActivity";
public static final String KEY_TITLE = "title";
@@ -85,11 +85,11 @@ public class MangaDownloadActivity extends AbstractActivity {
isv.setOnEdgeListener(new GalleryView.OnEdgeListener() {
@Override
public void onLastPageEdge() {
new SuperToast(MangaDownloadActivity.this, R.string.last_page).show();
new SuperToast(GellaryDownloadActivity.this, R.string.last_page).show();
}
@Override
public void onFirstPageEdge() {
new SuperToast(MangaDownloadActivity.this, R.string.first_page).show();
new SuperToast(GellaryDownloadActivity.this, R.string.first_page).show();
}
});
glrv.setContentPane(isv);
@@ -116,7 +116,7 @@ import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
*
* @author Hippo
*/
public class MangaListActivity extends AbstractGalleryActivity
public class GellaryListActivity extends AbstractGalleryActivity
implements View.OnClickListener {
private static final String TAG = "MangaListActivity";
@@ -199,13 +199,13 @@ public class MangaListActivity extends AbstractGalleryActivity
@Override
public void onFailure(String eMsg) {
setUserPanel();
new SuperToast(MangaListActivity.this, eMsg).setIcon(R.drawable.ic_warning).show();
if (!MangaListActivity.this.isFinishing())
new SuperToast(GellaryListActivity.this, eMsg).setIcon(R.drawable.ic_warning).show();
if (!GellaryListActivity.this.isFinishing())
loginDialog.show();
}
@Override
public void onGetAvatar(final int code) {
MangaListActivity.this.runOnUiThread(new Runnable() {
GellaryListActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
switch (code) {
@@ -213,11 +213,11 @@ public class MangaListActivity extends AbstractGalleryActivity
setUserPanel();
break;
case EhClient.NO_AVATAR:
new SuperToast(MangaListActivity.this, "无头像").show(); // TODO
new SuperToast(GellaryListActivity.this, "无头像").show(); // TODO
break;
case EhClient.GET_AVATAR_ERROR:
default:
new SuperToast(MangaListActivity.this, "获取头像失败", SuperToast.ERROR).show(); // TODO
new SuperToast(GellaryListActivity.this, "获取头像失败", SuperToast.ERROR).show(); // TODO
break;
}
}
@@ -335,7 +335,7 @@ public class MangaListActivity extends AbstractGalleryActivity
setTitle(mTitle);
} else {
lus = backup;
new SuperToast(MangaListActivity.this, R.string.wait_for_last).show();
new SuperToast(GellaryListActivity.this, R.string.wait_for_last).show();
}
}
}).setNegativeButton(android.R.string.cancel, new View.OnClickListener() {
@@ -454,33 +454,33 @@ public class MangaListActivity extends AbstractGalleryActivity
int defaultFavorite = Config.getDefaultFavorite();
switch (defaultFavorite) {
case -2:
Favorite.getAddToFavoriteDialog(MangaListActivity.this, gi).show();
Favorite.getAddToFavoriteDialog(GellaryListActivity.this, gi).show();
break;
case -1:
((AppContext)getApplication()).getData().addLocalFavourite(gi);
new SuperToast(MangaListActivity.this).setMessage(R.string.toast_add_favourite).show();
new SuperToast(GellaryListActivity.this).setMessage(R.string.toast_add_favourite).show();
break;
default:
((AppContext)getApplication()).getEhClient().addToFavorite(gi.gid,
gi.token, defaultFavorite, null, new EhClient.OnAddToFavoriteListener() {
@Override
public void onSuccess() {
new SuperToast(MangaListActivity.this).setMessage(R.string.toast_add_favourite).show();
new SuperToast(GellaryListActivity.this).setMessage(R.string.toast_add_favourite).show();
}
@Override
public void onFailure(String eMsg) {
new SuperToast(MangaListActivity.this).setMessage(R.string.failed_to_add).show();
new SuperToast(GellaryListActivity.this).setMessage(R.string.failed_to_add).show();
}
});
}
break;
case 1:
gi = getGalleryInfo(longClickItemIndex);
Intent it = new Intent(MangaListActivity.this, DownloadService.class);
Intent it = new Intent(GellaryListActivity.this, DownloadService.class);
startService(it);
mServiceConn.getService().add(String.valueOf(gi.gid), gi.thumb,
mClient.getDetailUrl(gi.gid, gi.token), gi.title);
new SuperToast(MangaListActivity.this, R.string.toast_add_download).show();
new SuperToast(GellaryListActivity.this, R.string.toast_add_download).show();
break;
default:
break;
@@ -525,7 +525,7 @@ public class MangaListActivity extends AbstractGalleryActivity
}
if (error)
new SuperToast(MangaListActivity.this, R.string.toast_invalid_page,
new SuperToast(GellaryListActivity.this, R.string.toast_invalid_page,
SuperToast.ERROR).show();
else
((AlertButton)v).dialog.dismiss();
@@ -564,9 +564,9 @@ public class MangaListActivity extends AbstractGalleryActivity
public void onClick(View v) {
String key = et.getText().toString();
if (key.length() == 0)
new SuperToast(MangaListActivity.this, R.string.tag_name_empty).setIcon(R.drawable.ic_warning).show();
new SuperToast(GellaryListActivity.this, R.string.tag_name_empty).setIcon(R.drawable.ic_warning).show();
else if (listMenuTag.contains(key) && !key.equals(oldStr))
new SuperToast(MangaListActivity.this, R.string.tag_name_empty).setIcon(R.drawable.ic_warning).show();
new SuperToast(GellaryListActivity.this, R.string.tag_name_empty).setIcon(R.drawable.ic_warning).show();
else {
((AlertButton)v).dialog.dismiss();
if (listener != null) {
@@ -601,11 +601,11 @@ public class MangaListActivity extends AbstractGalleryActivity
if (searchNormal.getVisibility() == View.GONE) {
searchNormal.setVisibility(View.VISIBLE);
searchTag.setVisibility(View.GONE);
new SuperToast(MangaListActivity.this, R.string.toast_normal_mode).show();
new SuperToast(GellaryListActivity.this, R.string.toast_normal_mode).show();
} else {
searchNormal.setVisibility(View.GONE);
searchTag.setVisibility(View.VISIBLE);
new SuperToast(MangaListActivity.this, R.string.toast_tag_mode).show();
new SuperToast(GellaryListActivity.this, R.string.toast_tag_mode).show();
}
}
}).setPositiveButton(android.R.string.ok, new View.OnClickListener() {
@@ -771,7 +771,7 @@ public class MangaListActivity extends AbstractGalleryActivity
intent.getStringExtra(SearchManager.QUERY);
mSearchView.setQuery(query, true);
} else if (ACTION_GALLERY_LIST.equals(action)) {
int mode = intent.getIntExtra(MangaListActivity.KEY_MODE, -1);
int mode = intent.getIntExtra(GellaryListActivity.KEY_MODE, -1);
switch(mode) {
case ListUrls.TAG:
lus = new ListUrls();
@@ -821,7 +821,7 @@ public class MangaListActivity extends AbstractGalleryActivity
}
private void showPopularWarningDialog() {
DialogBuilder db = new DialogBuilder(MangaListActivity.this).
DialogBuilder db = new DialogBuilder(GellaryListActivity.this).
setCancelable(false).
setView(R.layout.popular_warning, false);
db.setTitle(R.string.about_analyics_title);
@@ -834,7 +834,7 @@ public class MangaListActivity extends AbstractGalleryActivity
if (cb.isChecked())
Config.setPopularWarning(false);
Intent intent = new Intent(MangaListActivity.this,
Intent intent = new Intent(GellaryListActivity.this,
SettingsActivity.class);
intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, SettingsActivity.AboutFragment.class.getName());
intent.putExtra(PreferenceActivity.EXTRA_NO_HEADERS, true);
@@ -889,7 +889,7 @@ public class MangaListActivity extends AbstractGalleryActivity
});
// Download service
Intent it = new Intent(MangaListActivity.this, DownloadService.class);
Intent it = new Intent(GellaryListActivity.this, DownloadService.class);
bindService(it, mServiceConn, BIND_AUTO_CREATE);
// Init dialog
@@ -950,7 +950,7 @@ public class MangaListActivity extends AbstractGalleryActivity
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater li= LayoutInflater.from(MangaListActivity.this);
LayoutInflater li= LayoutInflater.from(GellaryListActivity.this);
Drawable d = mResources.getDrawable(data[position * 2]);
d.setBounds(0, 0, Ui.dp2pix(36), Ui.dp2pix(36));
TextView tv = (TextView)li.inflate(R.layout.menu_item, null);
@@ -975,7 +975,7 @@ public class MangaListActivity extends AbstractGalleryActivity
showContent();
} else {
new SuperToast(MangaListActivity.this, R.string.wait_for_last).show();
new SuperToast(GellaryListActivity.this, R.string.wait_for_last).show();
lus = backup;
}
break;
@@ -987,14 +987,14 @@ public class MangaListActivity extends AbstractGalleryActivity
break;
case 3: // Favourite
intent = new Intent(MangaListActivity.this,
intent = new Intent(GellaryListActivity.this,
FavouriteActivity.class);
startActivity(intent);
break;
case 4:
if (isRefreshing()) {
new SuperToast(MangaListActivity.this, R.string.wait_for_last).show();
new SuperToast(GellaryListActivity.this, R.string.wait_for_last).show();
} else {
lus = new ListUrls();
lus.setMode(ListUrls.POPULAR);
@@ -1011,13 +1011,13 @@ public class MangaListActivity extends AbstractGalleryActivity
break;
case 5: // Download
intent = new Intent(MangaListActivity.this,
intent = new Intent(GellaryListActivity.this,
DownloadActivity.class);
startActivity(intent);
break;
case 6: // Settings
intent = new Intent(MangaListActivity.this,
intent = new Intent(GellaryListActivity.this,
SettingsActivity.class);
startActivity(intent);
break;
@@ -1044,7 +1044,7 @@ public class MangaListActivity extends AbstractGalleryActivity
setTitle(mTitle);
showContent();
} else {
new SuperToast(MangaListActivity.this, R.string.wait_for_last).show();
new SuperToast(GellaryListActivity.this, R.string.wait_for_last).show();
lus = backup;
}
}
@@ -1080,11 +1080,11 @@ public class MangaListActivity extends AbstractGalleryActivity
@Override
public void onItemClick(AdapterView<?> arg0, View arg1,
int position, long arg3) {
Intent intent = new Intent(MangaListActivity.this,
MangaDetailActivity.class);
Intent intent = new Intent(GellaryListActivity.this,
GellaryDetailActivity.class);
GalleryInfo gi = getGalleryInfo(position);
intent.putExtra("url", mClient.getDetailUrl(gi.gid, gi.token));
intent.putExtra(MangaDetailActivity.KEY_G_INFO, gi);
intent.putExtra(GellaryDetailActivity.KEY_G_INFO, gi);
startActivity(intent);
}
});
@@ -1188,7 +1188,7 @@ public class MangaListActivity extends AbstractGalleryActivity
mTitle = t;
setTitle(mTitle);
} else {
new SuperToast(MangaListActivity.this, R.string.wait_for_last).show();
new SuperToast(GellaryListActivity.this, R.string.wait_for_last).show();
lus = backup;
}
return true;
@@ -1279,7 +1279,7 @@ public class MangaListActivity extends AbstractGalleryActivity
public void onBackPressed() {
if (System.currentTimeMillis() - curBackTime > BACK_PRESSED_INTERVAL) {
curBackTime = System.currentTimeMillis();
new SuperToast(MangaListActivity.this, R.string.exit_tip).show();
new SuperToast(GellaryListActivity.this, R.string.exit_tip).show();
} else
finish();
}
@@ -1300,7 +1300,7 @@ public class MangaListActivity extends AbstractGalleryActivity
return true;
case R.id.action_refresh:
if (!refresh(false))
new SuperToast(MangaListActivity.this, R.string.wait).show();
new SuperToast(GellaryListActivity.this, R.string.wait).show();
return true;
case R.id.action_jump:
if (!isRefreshing() && isGetGalleryOk())
@@ -1338,7 +1338,7 @@ public class MangaListActivity extends AbstractGalleryActivity
public void onSuccess(String version, long size,
final String url, final String fileName, String info) {
String sizeStr = Util.sizeToString(size);
AlertDialog dialog = SuperDialogUtil.createUpdateDialog(MangaListActivity.this,
AlertDialog dialog = SuperDialogUtil.createUpdateDialog(GellaryListActivity.this,
version, sizeStr, info,
new View.OnClickListener() {
@Override
@@ -1346,10 +1346,10 @@ public class MangaListActivity extends AbstractGalleryActivity
((AlertButton)v).dialog.dismiss();
// TODO
try {
Downloader downloader = new Downloader(MangaListActivity.this);
Downloader downloader = new Downloader(GellaryListActivity.this);
downloader.resetData(Config.getDownloadPath(), fileName, url);
downloader.setOnDownloadListener(
new UpdateHelper.UpdateListener(MangaListActivity.this,
new UpdateHelper.UpdateListener(GellaryListActivity.this,
fileName));
new Thread(downloader).start();
} catch (MalformedURLException e) {
@@ -1357,7 +1357,7 @@ public class MangaListActivity extends AbstractGalleryActivity
}
}
});
if (!MangaListActivity.this.isFinishing())
if (!GellaryListActivity.this.isFinishing())
dialog.show();
}
@Override
@@ -1430,7 +1430,7 @@ public class MangaListActivity extends AbstractGalleryActivity
listener.onSuccess(taskStamp, gis, gis.size() == 0 ? 0 : 1);
// Show update time
if (timeStamp != -1 && Config.getShowPopularUpdateTime())
new SuperToast(MangaListActivity.this,
new SuperToast(GellaryListActivity.this,
String.format(getString(R.string.popular_update_time),
mAppContext.getDateFormat().format(timeStamp))).show();
}
+1 -1
View File
@@ -21,7 +21,7 @@ import com.hippo.ehviewer.AppContext;
import com.hippo.ehviewer.R;
import com.hippo.ehviewer.data.GalleryInfo;
import com.hippo.ehviewer.ehclient.EhClient;
import com.hippo.ehviewer.ui.MangaDetailActivity;
import com.hippo.ehviewer.ui.GellaryDetailActivity;
import com.hippo.ehviewer.widget.DialogBuilder;
import com.hippo.ehviewer.widget.SuperToast;