Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
String[] prefArray = getResources().getStringArray(R.array.list_dailyshake);
         switch(v.getId()) {
         case R.id.buttonprevious:
        if(pageindex!=0)
        {
            btnprevious.setVisibility(View.VISIBLE);
             btnnext.setVisibility(View.VISIBLE);
            pageindex=pageindex-1;
             M_getdata();

        }
        else
        {
            btnprevious.setVisibility(View.GONE);
        }
            break;
         case R.id.buttonnext:
             if(pageindex+1!=prefArray.length)
             {
                 pageindex=pageindex+1;
             M_getdata();
             btnnext.setVisibility(View.VISIBLE);
             btnprevious.setVisibility(View.VISIBLE);
             }
             else
             {btnnext.setVisibility(View.GONE);}

            break;

     }
Posted
Comments
Sebastian T Xavier 31-Jul-12 2:11am    
This is just a code dump
Sandeep Mewara 31-Jul-12 14:15pm    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

Go to xml file

Go to your tool right click => property => visibility and tick on invisible
OR
you can write android:visibility="invisible"

and for visibility setVisiblity(true) on event...

and logic is yours...
 
Share this answer
 
are you android developer if yes then check
btnprevious.setVisibility(true);
like that its working or not.
Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900