Click here to Skip to main content
12,289,975 members (64,520 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: Mobile Android
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 30-Jul-12 20:01pm
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.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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...
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

are you android developer if yes then check
btnprevious.setVisibility(true);
like that its working or not.
Thanks
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 14 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100