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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:01:46+00:00 2026-05-24T23:01:46+00:00

I have created a custom listView with the row as follows: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent

  • 0

I have created a custom listView with the row as follows:

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"  android:id="@+id/lay1" 
  android:layout_height="wrap_content" android:background="#ffffff">

  <TextView android:layout_width="fill_parent" android:textColor="#000000" android:id="@+id/text"
  android:layout_height="wrap_content" android:layout_toRightOf="@+id/check" 
  android:textSize="15dip" android:paddingBottom="5dip" android:paddingRight="10dip" android:paddingLeft="10dip"></TextView>

  <Button android:id="@+id/check"  android:layout_centerVertical="true"
          android:background="@drawable/uncheck" android:layout_width="wrap_content"
          android:layout_height="wrap_content" android:visibility="gone"></Button>

  <EditText android:layout_width="fill_parent" android:textColor="#000000" android:id="@+id/edit"
  android:layout_height="wrap_content"  android:background="@null" android:layout_below="@+id/text"
  android:textSize="15dip" android:paddingTop="5dip" android:paddingRight="10dip" android:paddingLeft="10dip"
  android:layout_toRightOf="@+id/check" android:paddingBottom="5dip" ></EditText>

</RelativeLayout>

And listview code used in my main xml is:

<ListView android:layout_width="450dip" android:background="#FFFFFF" android:layout_height="340dip" 
  android:layout_marginLeft="9dip" android:layout_marginTop="10dip"  android:id="@+id/mainlist1" 
  android:divider="@drawable/grayline" 
    android:cacheColorHint="#00000000" ></ListView>

And adapter used is as follows:

public class Adapter extends BaseAdapter {


        ArrayList<Row> row;
        private Context context;


        public Adapter(Context context, ArrayList<SongRow> songrow) {

            this.context = context;
            this.row = row;

        }

        public int getCount() {

            return row.size();
        }

        public Object getItem(int position) {
            return position;
        }

        public long getItemId(int position) {
            return position;
        }

        public View getView(int position, View convertView, ViewGroup parent) {

            long sub_id = row.get(position).getSub_id();
            String sub_title = row.get(position).getSub_title();
            String sub_text = row.get(position).getSub_text();

            if (convertView == null) {
                LayoutInflater inflat = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                convertView = inflat.inflate(R.layout.mainrow, null);

            } else {
                LayoutInflater inflat1 = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                convertView = inflat1.inflate(R.layout.mainrow, null);
                            }
            final TextView name = (TextView) convertView.findViewById(R.id.text);
            final EditText et = (EditText) convertView.findViewById(R.id.edit);
            name.setText(sub_title);
            et.setText(sub_text);
            et.setFilters(new InputFilter[] { new InputFilter() {
                public CharSequence filter(CharSequence src, int start,
                        int end, Spanned dst, int dstart, int dend) {
                       InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
                       mgr.hideSoftInputFromWindow(et.getWindowToken(),0);
                       et.setCursorVisible(false);
                       return dst.subSequence(dstart, dend);    

                }
            } });
            et.setOnFocusChangeListener(new OnFocusChangeListener() {

                @Override
                public void onFocusChange(View v, boolean hasFocus) {
                    // TODO Auto-generated method stub
                    if (hasFocus) {
                         InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
                         mgr.hideSoftInputFromWindow(et.getWindowToken(),0);
                         et.setCursorVisible(false);
                    }
                }

            });
            et.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                     InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
                     mgr.hideSoftInputFromWindow(et.getWindowToken(),0);
                     et.setCursorVisible(false);

                }
            });
            return convertView;
        }
    }

And adapter called in main activity through code as follows:

Adapter s = new Adapter(MainActivity.this, row);
            mainlist.setAdapter(s);
            mainlist.setSelection(length-1);

My coding is working fine. My problem is that while showing listview which is scrollable is droping shadow at top and bottom of listview and I don’t want to show it. How can I remove that shadow?

Thanks in advance

  • 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-24T23:01:48+00:00Added an answer on May 24, 2026 at 11:01 pm

    I’m assuming you’re talking about the fading edges. To disable them:

    android:fadingEdge="none"
    

    or

    listView.setVerticalFadingEdgeEnabled(false);
    

    UPDATE

    As Pim Reijersen pointed out in the comments, android:fadingEdge is deprecated and will be ignored as of API level 14. Please use:

    android:fadingEdgeLength="0dp"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom listview using adapter. Each row of the list view
I have created a custom listview that is populated using a row.xml file. Each
We have created custom listview by using the Base adapter. List view contains Text
Actually I have created a custom ListView . I want to add items to
I have a Custom ListView created from XML Layout. I want to bind that
I have created a custom ArrayAdapter to display data within ListView items from an
I have a ListView in tile mode. I have created a custom method to
I have created a custom listview and adapter by extending BaseAdapter. Every time I
I have created a custom titlebar for all my listview activities using the following
I have an activity with listview and attached footer. I created my custom adapter

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.