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 7876157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:07:30+00:00 2026-06-03T03:07:30+00:00

I am getting an array values price qty is edittext i set as default

  • 0

I am getting an array values price qty is edittext i set as default as 1. I want multiplay as price and qty and setttext as total…

I try this code

public class CustomAdapter extends BaseAdapter
{
    int x;
    integer[] a;
    public static ArrayList<String> arr1=new ArrayList<String>();
    public static ArrayList<String> itemprice=new ArrayList<String>();
    public static ArrayList<Bitmap> itemimage=new ArrayList<Bitmap>();
    public Context Context;
    private LayoutInflater inflater;
    String total;

    HashMap<String, String> map = new HashMap<String, String>();
    public CustomAdapter(Context context, ArrayList<String> arr,ArrayList<String>     price,ArrayList<Bitmap> image) 
    {
        Context=context;
        inflater=LayoutInflater.from(context);
        arr1=arr;
        itemprice=price;
        itemimage=image;
        System.out.println(itemprice);
        System.out.println("arr: " + arr.size());


    }
    public int getCount() 
    {
        // TODO Auto-generated method stub
        return arr1.size();

    }

    public Object getItem(int position) 
    {
        // TODO Auto-generated method stub
        return arr1.get(position);
    }

    public long getItemId(int position) 
    {
        // TODO Auto-generated method stub
        return position;
    }

    public View getView(int position, View convertView, ViewGroup parent) 
        {
        System.out.println(arr1.get(position));

          final  ViewHolder holder;

            if (convertView == null) 
            {
                convertView = inflater.inflate(R.layout.selecteditemlistview, null);
                holder = new ViewHolder();

                holder.textViewSelectedText = (TextView)convertView.findViewById(R.id.selectedtext);
                holder.price=(TextView)convertView.findViewById(R.id.selectitemprice);
                holder.image=(ImageView)convertView.findViewById(R.id.selectitemimagge);
                holder.qty=(EditText)convertView.findViewById(R.id.selectqty);
                holder.total=(TextView)convertView.findViewById(R.id.totalamount);
                convertView.setTag(holder);
            }
            else 
            {
                holder = (ViewHolder) convertView.getTag();
            }
            String amount=holder.qty.getText().toString();


            holder.textViewSelectedText.setText(arr1.get(position));
            holder.price.setText(itemprice.get(position));
            holder.image.setImageBitmap(itemimage.get(position));
            holder.total.setText();

            return convertView;     
        }

        class ViewHolder      
        {
            TextView textViewSelectedText = null;
            TextView price=null;
            ImageView image=null;
            EditText qty=null;
            TextView total=null;
        }      
 }

my edittext code

 <EditText
      android:id="@+id/selectqty" android:maxLength="3" android:text="1"
      android:layout_width="40dp"
      android:layout_height="30dp"
      android:layout_alignParentTop="true"
      android:layout_marginLeft="36dp"
      android:layout_toRightOf="@+id/selectitemprice" >

I want to multiplay price and qty settext as total… please how to do ..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-03T03:07:31+00:00Added an answer on June 3, 2026 at 3:07 am
    then use someThing like: 
    
     textMessage.addTextChangedListener(new TextWatcher(){
     public void afterTextChanged(Editable s) {
    
     price=Integer.parseInt(price[position]);
    int qut=Integer.parseInt(s.getText().toString());
    int total=(price*qut);
    holder.total.setText(String.valueOf(total));
            }
     public void beforeTextChanged(CharSequence s, int start, int count, int after){}
     public void onTextChanged(CharSequence s, int start, int before, int count){}
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my code I want to create coordinates values from array: for(int i=1; i<[appDelegate.latitudeArray
I'm having problems getting values in my multidimensional arrays Array ( [0] => Array
When I am running this program I am getting warning array subscript has type
I keep getting this: [0] => Array ( [0] => Array ( [thread_id] =>
I am trying to create a 2 dimensional array but am getting this error.
I'm getting an array of values back from a database where I get an
For eg I have this code on the main page. <?php session_start(); $_SESSION['order']=array(); ?>
I have problem in getting wrong values in array of double. Instead of getting
I decided to get shuffled values from array. for that i used this function,
I'm having trouble getting the array to show up like this. $womensLevels = array('WEXHIB'

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.