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

  • SEARCH
  • Home
  • 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 8694029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:41:05+00:00 2026-06-13T00:41:05+00:00

I am developing an application for children. Basic maths for children to learn with

  • 0

I am developing an application for children. Basic maths for children to learn with fun.

In this app I am using apple image for displaying on the screen. for addition when they give 1st input and second input it should show apple images as specified in 1st and 2nd input.

Is any one know solution for this or any one having source code thn help me

  • 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-06-13T00:41:06+00:00Added an answer on June 13, 2026 at 12:41 am

    this is the way you can do it ,quite simple though 🙂

    your xml should look like this

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
    <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/input1" />
     <EditText
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/input2" />
     <Button android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/button"
        android:text="Result"/>
    <HorizontalScrollView 
    android:id="@+id/scroll1" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    
    <LinearLayout android:id="@+id/linear1"
    android:orientation="horizontal" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    </LinearLayout>
    </HorizontalScrollView>
    <HorizontalScrollView 
    android:id="@+id/scroll2" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <LinearLayout 
        android:id="@+id/linear2"
    android:orientation="horizontal" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    </LinearLayout>
    </HorizontalScrollView>
    <HorizontalScrollView 
    android:id="@+id/scroll3" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <LinearLayout 
        android:id="@+id/linear3"
    android:orientation="horizontal" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    </LinearLayout>
    </HorizontalScrollView>
    </LinearLayout>
    

    and you Activity looks like this

    package com.example.stackanswer;
    
    import android.os.Bundle;
    import android.app.ActionBar.LayoutParams;
    import android.app.Activity;
    import android.util.Log;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.HorizontalScrollView;
    import android.widget.ImageView;
    import android.widget.LinearLayout;
    
    public class AppleActivity extends Activity {
    
    private LinearLayout linear1;
    private LinearLayout linear2;
    private LinearLayout linear3;
    private HorizontalScrollView scrollbar1;
    private HorizontalScrollView scrollbar2;
    private HorizontalScrollView scrollbar3;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_apple);
        final EditText input1 = (EditText)findViewById(R.id.input1);
        final EditText input2 = (EditText)findViewById(R.id.input2);
        scrollbar1 = (HorizontalScrollView)findViewById(R.id.scroll1);
        scrollbar2 = (HorizontalScrollView)findViewById(R.id.scroll2);
        scrollbar3 = (HorizontalScrollView)findViewById(R.id.scroll3);
          linear1 = (LinearLayout)findViewById(R.id.linear1);
          linear2 = (LinearLayout)findViewById(R.id.linear2);
          linear3 = (LinearLayout)findViewById(R.id.linear3);
        Button output = (Button)findViewById(R.id.button);
        output.setOnClickListener(new OnClickListener() {
    
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                String input1A = input1.getText().toString();
                String input1B = input2.getText().toString();
                int value1 = Integer.parseInt(input1A);
                int value2 = Integer.parseInt(input1B);
                Log.i("1",""+value1);
                Log.i("2",""+value2);
                linear1.removeAllViews();
                linear2.removeAllViews();
                linear3.removeAllViews();
                linear1.setScrollContainer(true);
                ImageView image ;
                for(int i=0;i<value1;i++){
    
                    image = new ImageView(getApplicationContext());
                    image.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT) );
    
                    image.setImageResource(R.drawable.ic_launcher);
                    Log.i("i", i+"");
                    linear1.addView(image);
                    scrollbar1.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
                }
                for(int i=0;i<value2;i++){
                    image = new ImageView(getApplicationContext());
                    image.setImageResource(R.drawable.ic_launcher);
                    Log.i("i", i+"");
                    linear2.addView(image);
                    scrollbar2.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
                }
                int sum = value1+value2;
                for(int i=0;i<sum;i++){
                    image = new ImageView(getApplicationContext());
                    image.setImageResource(R.drawable.ic_launcher);
                    Log.i("i", i+"");
                    linear3.addView(image);
                    scrollbar3.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
                }
            }
        });
    
    }
    
    }
    

    Complete source code here

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

Sidebar

Related Questions

I am new to this site. I am developing an application on Basic maths
I'm developing application using VC++ 6. I have a 3rd party DLL. This library
I developing application which using geo-location. Should i ask user right for this when
I'm developing application for android by using flex. That app should read sms from
i am developing application in blackberry and i m using eclipse.in my app there
I'm developing application using backbone.js & jquery. I have following code in model: runReport:
I am developing application on Images. In that if I click on same image
What is difference in developing applications using .Net Framework, Asp.net and developing application in
While developing an application using gwt in ecliplse crashed. Now the server is running
Basically I'm developing application using asp.net and I want to write Custom validator which

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.