非 ongoing 通知栏点击后消除
No files matched your search
@@ -101,38 +101,41 @@ int drawable ic_action_favourite 0x7f02000d
|
||||
int drawable ic_action_jump 0x7f02000e
|
||||
int drawable ic_action_pause 0x7f02000f
|
||||
int drawable ic_action_refresh 0x7f020010
|
||||
int drawable ic_action_search 0x7f020011
|
||||
int drawable ic_action_settings 0x7f020012
|
||||
int drawable ic_action_start 0x7f020013
|
||||
int drawable ic_launcher 0x7f020014
|
||||
int drawable ic_navigation_drawer 0x7f020015
|
||||
int drawable imageset 0x7f020016
|
||||
int drawable indicator_arrow 0x7f020017
|
||||
int drawable indicator_bg_bottom 0x7f020018
|
||||
int drawable indicator_bg_top 0x7f020019
|
||||
int drawable manga 0x7f02001a
|
||||
int drawable mask 0x7f02001b
|
||||
int drawable misc 0x7f02001c
|
||||
int drawable non_h 0x7f02001d
|
||||
int drawable refresh 0x7f02001e
|
||||
int drawable sadpanda 0x7f02001f
|
||||
int drawable scrollbar_blue 0x7f020020
|
||||
int drawable scrollbar_white 0x7f020021
|
||||
int drawable star 0x7f020022
|
||||
int drawable star_empty 0x7f020023
|
||||
int drawable star_half 0x7f020024
|
||||
int drawable unknown 0x7f020025
|
||||
int drawable wait 0x7f020026
|
||||
int drawable western 0x7f020027
|
||||
int drawable ic_action_remove 0x7f020011
|
||||
int drawable ic_action_search 0x7f020012
|
||||
int drawable ic_action_settings 0x7f020013
|
||||
int drawable ic_action_start 0x7f020014
|
||||
int drawable ic_launcher 0x7f020015
|
||||
int drawable ic_navigation_drawer 0x7f020016
|
||||
int drawable imageset 0x7f020017
|
||||
int drawable indicator_arrow 0x7f020018
|
||||
int drawable indicator_bg_bottom 0x7f020019
|
||||
int drawable indicator_bg_top 0x7f02001a
|
||||
int drawable manga 0x7f02001b
|
||||
int drawable mask 0x7f02001c
|
||||
int drawable misc 0x7f02001d
|
||||
int drawable non_h 0x7f02001e
|
||||
int drawable refresh 0x7f02001f
|
||||
int drawable sadpanda 0x7f020020
|
||||
int drawable scrollbar_blue 0x7f020021
|
||||
int drawable scrollbar_white 0x7f020022
|
||||
int drawable star 0x7f020023
|
||||
int drawable star_empty 0x7f020024
|
||||
int drawable star_half 0x7f020025
|
||||
int drawable textfield 0x7f020026
|
||||
int drawable unknown 0x7f020027
|
||||
int drawable wait 0x7f020028
|
||||
int drawable western 0x7f020029
|
||||
int id action 0x7f07004c
|
||||
int id action_download 0x7f07008c
|
||||
int id action_favourite 0x7f07008b
|
||||
int id action_jump 0x7f07008f
|
||||
int id action_refresh 0x7f07008e
|
||||
int id action_search 0x7f07008d
|
||||
int id action_settings 0x7f070090
|
||||
int id action_download 0x7f07008f
|
||||
int id action_favourite 0x7f07008e
|
||||
int id action_jump 0x7f070092
|
||||
int id action_refresh 0x7f070091
|
||||
int id action_search 0x7f070090
|
||||
int id action_settings 0x7f070093
|
||||
int id alignBounds 0x7f070013
|
||||
int id alignMargins 0x7f070014
|
||||
int id autoCompleteTextView1 0x7f070089
|
||||
int id both 0x7f070008
|
||||
int id bottom 0x7f070016
|
||||
int id bottom_panel 0x7f070081
|
||||
@@ -249,15 +252,17 @@ int id pull_to_refresh_progress 0x7f070085
|
||||
int id pull_to_refresh_sub_text 0x7f070087
|
||||
int id pull_to_refresh_text 0x7f070086
|
||||
int id rate 0x7f070071
|
||||
int id remove 0x7f07008a
|
||||
int id right 0x7f070001
|
||||
int id rotate 0x7f07000c
|
||||
int id sadpanda 0x7f07006c
|
||||
int id scroll_view 0x7f070041
|
||||
int id scrollview 0x7f070010
|
||||
int id search_bar 0x7f070088
|
||||
int id search_text 0x7f070058
|
||||
int id selected_view 0x7f070004
|
||||
int id set_name_edit 0x7f070088
|
||||
int id slidingmenumain 0x7f070089
|
||||
int id set_name_edit 0x7f07008b
|
||||
int id slidingmenumain 0x7f07008c
|
||||
int id spinner_min_rating 0x7f070064
|
||||
int id start 0x7f07001f
|
||||
int id text_username 0x7f07007b
|
||||
@@ -267,7 +272,7 @@ int id top 0x7f070015
|
||||
int id type 0x7f070070
|
||||
int id username 0x7f070077
|
||||
int id vertical 0x7f070012
|
||||
int id wait_message 0x7f07008a
|
||||
int id wait_message 0x7f07008d
|
||||
int id webview 0x7f07000f
|
||||
int layout detail 0x7f030000
|
||||
int layout detail_normal 0x7f030001
|
||||
@@ -293,9 +298,10 @@ int layout page_list 0x7f030014
|
||||
int layout page_list_panel 0x7f030015
|
||||
int layout pull_to_refresh_header_horizontal 0x7f030016
|
||||
int layout pull_to_refresh_header_vertical 0x7f030017
|
||||
int layout set_name 0x7f030018
|
||||
int layout slidingmenumain 0x7f030019
|
||||
int layout wait 0x7f03001a
|
||||
int layout search_view 0x7f030018
|
||||
int layout set_name 0x7f030019
|
||||
int layout slidingmenumain 0x7f03001a
|
||||
int layout wait 0x7f03001b
|
||||
int menu detail 0x7f0d0000
|
||||
int menu main 0x7f0d0001
|
||||
int raw change_log 0x7f060000
|
||||
|
||||
|
After Width: | Height: | Size: 257 B |
|
After Width: | Height: | Size: 192 B |
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 478 B |
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 480 B |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 587 B |
|
After Width: | Height: | Size: 1002 B |
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,26 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/search_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/textfield" >
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/autoCompleteTextView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:singleLine="true"
|
||||
android:background="@android:color/transparent" >
|
||||
</AutoCompleteTextView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/remove"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/ic_action_remove" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -3,7 +3,6 @@
|
||||
<item android:id="@+id/action_search"
|
||||
android:title="@android:string/search_go"
|
||||
android:icon="@drawable/ic_action_search"
|
||||
android:hint="@android:string/search_go"
|
||||
android:showAsAction="collapseActionView|ifRoom"
|
||||
android:actionViewClass="android.widget.SearchView" />
|
||||
|
||||
|
||||
@@ -1441,6 +1441,7 @@ public class MangaListActivity extends SlidingActivity {
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
|
||||
SearchManager searchManager =
|
||||
(SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
||||
final SearchView searchView =
|
||||
@@ -1460,6 +1461,8 @@ public class MangaListActivity extends SlidingActivity {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// Make search view custom look
|
||||
int searchTextID = searchView.getContext().
|
||||
getResources().getIdentifier("android:id/search_src_text", null, null);
|
||||
if (searchTextID > 0) {
|
||||
@@ -1470,6 +1473,16 @@ public class MangaListActivity extends SlidingActivity {
|
||||
searchText.setHintTextColor(Color.WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
int removeImageID = searchView.getContext().
|
||||
getResources().getIdentifier("android:id/search_close_btn", null, null);
|
||||
if (removeImageID > 0) {
|
||||
ImageView removeImage =
|
||||
(ImageView)searchView.findViewById(removeImageID);
|
||||
if (removeImage != null)
|
||||
removeImage.setImageResource(R.drawable.ic_action_remove);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,10 @@ public class Downloader implements Runnable {
|
||||
if (Cache.hasSdCard())
|
||||
while(true) {
|
||||
try {
|
||||
if (mDi.status == DownloadInfo.STOP)
|
||||
throw new StopRequestException(STOP,
|
||||
"Download is stopped");
|
||||
|
||||
mDownloadSize = 0;
|
||||
mRedirectionCount = 0;
|
||||
status = COMPLETED;
|
||||
@@ -164,6 +168,11 @@ public class Downloader implements Runnable {
|
||||
InputStream in = null;
|
||||
OutputStream out = null;
|
||||
File file = null;
|
||||
|
||||
if (mDi.status == DownloadInfo.STOP)
|
||||
throw new StopRequestException(STOP,
|
||||
"Download is stopped");
|
||||
|
||||
try {
|
||||
try {
|
||||
in = conn.getInputStream();
|
||||
@@ -211,7 +220,7 @@ public class Downloader implements Runnable {
|
||||
if (mListener != null)
|
||||
mListener.onDownloadStatusUpdate(mDownloadSize, mTotalSize);
|
||||
|
||||
if (mDi.status == mDi.STOP)
|
||||
if (mDi.status == DownloadInfo.STOP)
|
||||
throw new StopRequestException(STOP,
|
||||
"Download is stopped");
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class DownloadService extends Service {
|
||||
public void onDownloadMangaAllStart() {
|
||||
mBuilder.setContentTitle(getString(R.string.start_download_task))
|
||||
.setContentText(null)
|
||||
.setProgress(0, 0, true).setOngoing(true);
|
||||
.setProgress(0, 0, true).setOngoing(true).setAutoCancel(false);;
|
||||
mNotifyManager.notify(DOWNLOAD_NOTIFY_ID, mBuilder.build());
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class DownloadService extends Service {
|
||||
mBuilder.setContentTitle(getString(R.string.downloading)
|
||||
+ " " + Download.get(id).title)
|
||||
.setContentText(null)
|
||||
.setProgress(0, 0, true).setOngoing(true);
|
||||
.setProgress(0, 0, true).setOngoing(true).setAutoCancel(false);;
|
||||
mNotifyManager.notify(DOWNLOAD_NOTIFY_ID, mBuilder.build());
|
||||
}
|
||||
|
||||
@@ -75,7 +75,8 @@ public class DownloadService extends Service {
|
||||
mBuilder.setContentTitle(getString(R.string.downloading)
|
||||
+ " " + Download.get(id).title)
|
||||
.setContentText(startIndex + " / " + pageSum)
|
||||
.setProgress(pageSum, startIndex, false).setOngoing(true);
|
||||
.setProgress(pageSum, startIndex, false).setOngoing(true)
|
||||
.setAutoCancel(false);
|
||||
mNotifyManager.notify(DOWNLOAD_NOTIFY_ID, mBuilder.build());
|
||||
}
|
||||
|
||||
@@ -91,7 +92,8 @@ public class DownloadService extends Service {
|
||||
mBuilder.setContentTitle(getString(R.string.download_successfully) + " " + Download.get(id).title);
|
||||
else
|
||||
mBuilder.setContentTitle(getString(R.string.download_unsuccessfully) + " " + Download.get(id).title);
|
||||
mBuilder.setContentText(null).setProgress(0, 0, false).setOngoing(false);
|
||||
mBuilder.setContentText(null).setProgress(0, 0, false).setOngoing(false)
|
||||
.setAutoCancel(true);
|
||||
mNotifyManager.notify(Integer.parseInt(id), mBuilder.build());
|
||||
}
|
||||
|
||||
@@ -100,7 +102,8 @@ public class DownloadService extends Service {
|
||||
mBuilder.setContentTitle(getString(R.string.downloading)
|
||||
+ " " + Download.get(id).title)
|
||||
.setContentText(index + " / " + pageSum)
|
||||
.setProgress(pageSum, index, false).setOngoing(true);
|
||||
.setProgress(pageSum, index, false).setOngoing(true)
|
||||
.setAutoCancel(false);
|
||||
mNotifyManager.notify(DOWNLOAD_NOTIFY_ID, mBuilder.build());
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +267,7 @@ public class EhClient {
|
||||
conn.addRequestProperty("Accept-Encoding", "gzip");
|
||||
conn.setRequestProperty("User-Agent", userAgent);
|
||||
conn.setConnectTimeout(TIMEOUT);
|
||||
conn.setReadTimeout(TIMEOUT);
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
conn.setRequestMethod("POST");
|
||||
@@ -323,6 +324,7 @@ public class EhClient {
|
||||
conn.addRequestProperty("Accept-Encoding", "gzip");
|
||||
conn.setRequestProperty("User-Agent", userAgent);
|
||||
conn.setConnectTimeout(TIMEOUT);
|
||||
conn.setReadTimeout(TIMEOUT);
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
conn.setRequestMethod("POST");
|
||||
@@ -379,6 +381,7 @@ public class EhClient {
|
||||
conn.addRequestProperty("Accept-Encoding", "gzip");
|
||||
conn.setRequestProperty("User-Agent", userAgent);
|
||||
conn.setConnectTimeout(TIMEOUT);
|
||||
conn.setReadTimeout(TIMEOUT);
|
||||
conn.connect();
|
||||
|
||||
getStringHUC(conn, sb);
|
||||
@@ -1374,6 +1377,8 @@ public class EhClient {
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
mComplete = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
mComplete = false;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.hippo.ehviewer.view;
|
||||
|
||||
import com.hippo.ehviewer.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
public class SearchView extends LinearLayout {
|
||||
public SearchView(Context context) {
|
||||
super(context, null);
|
||||
}
|
||||
|
||||
public SearchView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) context
|
||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
inflater.inflate(R.layout.search_view, this, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||