ninetwozero / BF3-Battlelog

Hello world! This is the number one unofficial Battlefield 3 Battlelog-application for Android.
https://market.android.com/details?id=com.ninetwozero.battlelog
23 stars 7 forks source link

ProfileStatsFragmemnt use list #80

Closed peter-budo closed 11 years ago

peter-budo commented 12 years ago

The layout for this fragment is too long and it could be simplified by use of ListView with Cursor. This could be achieved by having data stored in different DB tables, or make a cell that will mark item as:

There is also third option to use both approaches and have 3 tables like rank_details, stats and score. The last two tables would be lists that could be merged (seen how it is doen in one of our projects can give directions for it if interested) Positives code would be much shorted and organized "Negative" more DB tables and querying

karllindmark commented 12 years ago

Well, I think the querying should be quite fast, however I'm not sure I follow what you mean with your 2 & 3 point. :-D

peter-budo commented 12 years ago

As per skype chat, here is explanation

The bullet points are just item types as to identify different item types that can be presented. So given that we want to show this view as list we need to provide a way how to keep current formatting I believe you want to keep it(or something similar)

So what can you do to show this content in same way? Have all fields as table enties where you say

  1. stats, null/empty, header
  2. kills, 1234, simple : :
  3. KD-ratio, 1.188, highlight
peter-budo commented 11 years ago

Solved, code in following merge https://github.com/ninetwozero/BF3-Battlelog/commit/8519cdb019bd9fc84c448a9eecb4b08e23b064dd