Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6832275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:50:21+00:00 2026-05-26T22:50:21+00:00

I must create android application for tablets, app will be shows new magazines and

  • 0

I must create android application for tablets, app will be shows new magazines and his pages. Every magazine has about 70 pages, and every page have cover as image which weighs about 700 000 bytes. Main page of app show big image and small gallery (Gallery View) with images. I work on emulator with andrid 3.2. When I add images to gallery and I try slide it, it does’t work smoothly. Sometimes does’t load all images and LogCat show me this info:

11-17 14:30:51.598: D/skia(5868): libjpeg error 105 <  Ss=%d, Se=%d, Ah=%d, Al=%d> from read_scanlines [128 168]
11-17 14:30:51.598: D/skia(5868): --- decoder->decode returned false

Now I put into gallery about 7 images which I scale like this:

public Bitmap decodeFile(String f) {
    try {
        BitmapFactory.Options o = new BitmapFactory.Options();
        o.inJustDecodeBounds = true;
        BitmapFactory.decodeStream(new FileInputStream(f),null,o);

        final int REQUIRED_SIZE=75;

        int width_tmp=o.outWidth, height_tmp=o.outHeight;
        int scale=1;
        while(true) {
            if(width_tmp/2<REQUIRED_SIZE || height_tmp/2<REQUIRED_SIZE)
                break;
            width_tmp/=2;
            height_tmp/=2;
            scale*=2;
        }
        BitmapFactory.Options o2 = new BitmapFactory.Options();
        o2.inSampleSize=scale;
        return BitmapFactory.decodeStream(new FileInputStream(f), null, o2);
    } catch (FileNotFoundException e) {}
    return null;
}

and show in gallery like this:

    public View getView(int position, View convertView, ViewGroup parent) {
        View retval = LayoutInflater.from(parent.getContext()).inflate(R.layout.viewitem, null);
        ImageView iV = (ImageView) retval.findViewById(R.id.image);
        String path = ArrayHelper.list.get(position).get("pageId").toString();
        Bitmap bP = decodeFile(Environment.getExternalStorageDirectory() + "/MCW/" + path + "/head.jpg");
        iV.setImageBitmap(bP);
        return retval;
    }

in future I will be have more imges in gallery and I can’s imagine how it will be working.

My question is: what i should be doing ? How I should load images ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:50:21+00:00Added an answer on May 26, 2026 at 10:50 pm

    You’ve asked a general question, so the best I can do is give you a general answer. You shouldn’t have a bitmap for an entire page in the magazine. You should only use bitmaps for the picture portions of the page. The rest should be actual text. This will dramatically cut down your memory foot print. Furthermore, you should then lazy load those bit maps. Checkout this discussion for advice on how to lazy load images.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create two new custom buttons to use in my android application.
I want to create a WinForm application that must draw data coming from a
Hi. I have create a background service application following this tutorial http://androidsourcecode.blogspot.com/2010/10/basic-android-background-service.html . But
I imported ApiDemos from android-sdk folder using File/New/Project/Android Project/Create Project Existing Samples. When I
Hi I want to create an android application which displays list of themes(Not the
I need to create a qrcode in my android application, and I need a
I'm working on an Android application that will send MMS internally without using the
I use Android to make an application. I have an activity where I create
I want to create a password-protected android application. The password should be asked when
I'm new to Android Development and am currently trying to develop my first application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.