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
  1. Home
  2. Mobile Development
  3. Android
  4. UI / Model Hook Up

UI / Model Hook Up

Scheduled Pinned Locked Moved Android
csharpdesignjavaandroid
2 Posts 1 Posters 1 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.
  • D Offline
    D Offline
    DaveyM69
    wrote on last edited by
    #1

    So, I'm developing my first ever Android app and my first experience of Eclipse and Java (after many years of Visual Studio and C#)! I have all my data storage and retrieval coded and working, as well as all my classes that represent that data. Now it's time to design the UI - I have an idea of how I want it to look and interact so all good to go but... What is the best or recommended way of hooking up the UI in Java to the objects behind. From the research I've done it doesn't appear that DataBinding (ala WPF) is supported which would be the obvious way. It's just straight forward class instances and collections of those classes. Thanks in advance :)

    Dave
    Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
    BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

    D 1 Reply Last reply
    0
    • D DaveyM69

      So, I'm developing my first ever Android app and my first experience of Eclipse and Java (after many years of Visual Studio and C#)! I have all my data storage and retrieval coded and working, as well as all my classes that represent that data. Now it's time to design the UI - I have an idea of how I want it to look and interact so all good to go but... What is the best or recommended way of hooking up the UI in Java to the objects behind. From the research I've done it doesn't appear that DataBinding (ala WPF) is supported which would be the obvious way. It's just straight forward class instances and collections of those classes. Thanks in advance :)

      Dave
      Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      In case anyone else drops by this, extending ArrayAdapter<> and using that as the adapter for a ListView works pretty well for collections. With some work you can get it to behave as you want! For single items, it's just as easy to do it all in the activity itself, although not great separation. I am new to this Android stuff though so I'm probably missing something...

      Dave
      Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

      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