Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Mobile Development
  3. Android
  4. How to load and spinner data with the help of sharedPreferances?

How to load and spinner data with the help of sharedPreferances?

Scheduled Pinned Locked Moved Android
helptutorialquestion
12 Posts 4 Posters 46 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P pankaj788

    How to SAVE spinner data and LOAD it inside that spinner.

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #2

    Probably by writing some code. But unless you explain your problem in proper detail it is anyone's guess what that code could be.

    P 1 Reply Last reply
    0
    • L Lost User

      Probably by writing some code. But unless you explain your problem in proper detail it is anyone's guess what that code could be.

      P Offline
      P Offline
      pankaj788
      wrote on last edited by
      #3

      I want to make an activity that have one spinner that spinner contain 5 colors name they are as follows, RED,GREEN, BLUE, BLACK, WHITE. And when I select particular color from the spinner, for example I select RED, and if I dispose that activity and again opened it then that spinner must contain the RED color name. How can I make this type of activity? I think sharedPreferances can do it. But I'm new in Android Programming so please any one give me that kind of full activity code.

      L 1 Reply Last reply
      0
      • P pankaj788

        I want to make an activity that have one spinner that spinner contain 5 colors name they are as follows, RED,GREEN, BLUE, BLACK, WHITE. And when I select particular color from the spinner, for example I select RED, and if I dispose that activity and again opened it then that spinner must contain the RED color name. How can I make this type of activity? I think sharedPreferances can do it. But I'm new in Android Programming so please any one give me that kind of full activity code.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #4

        See http://developer.android.com/guide/topics/ui/controls/spinner.html[^].

        P 1 Reply Last reply
        0
        • L Lost User

          See http://developer.android.com/guide/topics/ui/controls/spinner.html[^].

          P Offline
          P Offline
          pankaj788
          wrote on last edited by
          #5

          I want full activity of above code

          L 1 Reply Last reply
          0
          • P pankaj788

            I want full activity of above code

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #6

            Life is hard.

            P 1 Reply Last reply
            0
            • L Lost User

              Life is hard.

              P Offline
              P Offline
              pankaj788
              wrote on last edited by
              #7

              What??? Means???

              L 1 Reply Last reply
              0
              • P pankaj788

                How to SAVE spinner data and LOAD it inside that spinner.

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #8

                See here.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                P 1 Reply Last reply
                0
                • D David Crow

                  See here.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  P Offline
                  P Offline
                  pankaj788
                  wrote on last edited by
                  #9

                  I had used the above code in my code but didn't anything work. :( :( :( :( :(

                  D 1 Reply Last reply
                  0
                  • P pankaj788

                    I had used the above code in my code but didn't anything work. :( :( :( :( :(

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #10

                    pankaj788 wrote:

                    I had used the above code in my code but didn't anything work.

                    Well, without seeing your exact code that did not work, it's impossible to know. Regardless, posting the same question more than once will not solve anything either.

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                    1 Reply Last reply
                    0
                    • P pankaj788

                      What??? Means???

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #11

                      It means, do not say "I want ...". Explain your problem in proper detail. If you want someone else to write the code for you then employ a programmer.

                      1 Reply Last reply
                      0
                      • P pankaj788

                        How to SAVE spinner data and LOAD it inside that spinner.

                        A Offline
                        A Offline
                        Awesome Sohel
                        wrote on last edited by
                        #12

                        You can store your spinner data into Arraylist and aftetr that this whole Arraylist can store in sharedprefrence.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups