This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.content.Context; | |
| import android.graphics.drawable.Drawable; | |
| import android.os.Build.VERSION; | |
| import android.os.Build.VERSION_CODES; | |
| import android.util.AttributeSet; | |
| import android.widget.ImageView; | |
| /** | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static final String HEADER_ACCEPT_ENCODING = "Accept-Encoding"; | |
| private static final String ENCODING_GZIP = "gzip"; | |
| final DefaultHttpClient client = new DefaultHttpClient(manager, parameters); | |
| client.addRequestInterceptor(new HttpRequestInterceptor() { | |
| public void process(HttpRequest request, HttpContext context) { | |
| // Add header to accept gzip content | |
| if (!request.containsHeader(HEADER_ACCEPT_ENCODING)) { | |
| request.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP); |
NewerOlder