Home

26.6.12

Replace Fragment

http://stackoverflow.com/questions/7723964/replace-fragment-inside-a-viewpager
http://pastebin.com/QqrUaVzk

23.6.12

Android Color Hex

screen_background_light                     #FFFFFFFF   RGBA(255,255,255,1)
screen_background_dark                      #FF000000   RGBA(0,0,0,1)
status_bar_closed_default_background        #FF000000   RGBA(0,0,0,1)
status_bar_opened_default_background        #FF000000   RGBA(0,0,0,1)
search_bar_default_color                    #FF000000   RGBA(0,0,0,1)
safe_mode_background                        #60000000   RGBA(0,0,0,0.38)
screen_background_dark_transparent          #80000000   RGBA(0,0,0,0.5)
screen_background_light_transparent         #80FFFFFF   RGBA(255,255,255,0.5)
safe_mode_text                              #80FFFFFF   RGBA(255,255,255,0.5)
white                                       #FFFFFFFF   RGBA(255,255,255,1)
black                                       #FF000000   RGBA(0,0,0,1)
transparent                                 #00000000   RGBA(0,0,0,0)
background_dark                             #FF000000   RGBA(0,0,0,1)
background_light                            #FFFFFFFF   RGBA(255,255,255,1)
bright_foreground_dark                      #FF000000   RGBA(0,0,0,1)
bright_foreground_light                     #FFFFFFFF   RGBA(255,255,255,1)
bright_foreground_dark_disabled             #80FFFFFF   RGBA(255,255,255,0.5)
bright_foreground_light_disabled            #80000000   RGBA(0,0,0,0.5)
bright_foreground_dark_inverse              #FFFFFFFF   RGBA(255,255,255,1)
bright_foreground_light_inverse             #FF000000   RGBA(0,0,0,1)
dim_foreground_dark                         #BEBEBE     RGBA(190,190,190,1)
dim_foreground_dark_disabled                #80BEBEBE   RGBA(190,190,190,0.5)
dim_foreground_dark_inverse                 #323232     RGBA(50,50,50,1)
dim_foreground_dark_inverse_disabled        #80323232   RGBA(50,50,50,0.5)
hint_foreground_dark                        #808080     RGBA(128,128,128,1)
dim_foreground_light                        #323232     RGBA(50,50,50,1)
dim_foreground_light_disabled               #80323232   RGBA(50,50,50,0.5)
dim_foreground_light_inverse                #BEBEBE     RGBA(190,190,190,1)
dim_foreground_light_inverse_disabled       #80BEBEBE   RGBA(190,190,190,0.5)
hint_foreground_light                       #808080     RGBA(128,128,128,1)
highlighted_text_dark                       #9983CC39   RGBA(131,204,57,0.6)
highlighted_text_light                      #9983CC39   RGBA(131,204,57,0.6)
link_text_dark                              #5C5CFF     RGBA(92,92,255,1)
link_text_light                             #0000EE     RGBA(0,0,238,1)
suggestion_highlight_text                   #177BBD     RGBA(23,123,189,1)
input_method_fullscreen_background          #FFF9F9F9   RGBA(249,249,249,1)
input_method_fullscreen_background_holo     #80000000   RGBA(0,0,0,0.5)
selected_day_background                     #FF0092F4   RGBA(0,146,244,1)
lighter_gray                                #DDD        RGBA(221,221,221,1)
darker_gray                                 #AAA        RGBA(170,170,170,1)
perms_dangerous_grp_color                   #33B5E5     RGBA(51,181,229,1)
perms_dangerous_perm_color                  #33B5E5     RGBA(51,181,229,1)
shadow                                      #CC222222   RGBA(34,34,34,0.8)
search_url_text_normal                      #7FA87F     RGBA(127,168,127,1)
search_url_text_selected                    #FF000000   RGBA(0,0,0,1)
search_url_text_pressed                     #FF000000   RGBA(0,0,0,1)
search_widget_corpus_item_background        #DDD        RGBA(221,221,221,1)
sliding_tab_text_color_active               #FF000000   RGBA(0,0,0,1)
sliding_tab_text_color_shadow               #FF000000   RGBA(0,0,0,1)
keyguard_text_color_normal                  #FFFFFF     RGBA(255,255,255,1)
keyguard_text_color_unlock                  #A7D84C     RGBA(167,216,76,1)
keyguard_text_color_soundoff                #FFFFFF     RGBA(255,255,255,1)
keyguard_text_color_soundon                 #E69310     RGBA(230,147,16,1)
keyguard_text_color_decline                 #FE0A5A     RGBA(254,10,90,1)
lockscreen_clock_background                 #FFFFFFFF   RGBA(255,255,255,1)
lockscreen_clock_foreground                 #FFFFFFFF   RGBA(255,255,255,1)
lockscreen_clock_am_pm                      #FFFFFFFF   RGBA(255,255,255,1)
lockscreen_owner_info                       #FF9A9A9A   RGBA(154,154,154,1)
facelock_color_background                   #000000     RGBA(0,0,0,1)
screen_background_holo_light                #FFF3F3F3   RGBA(243,243,243,1)
screen_background_holo_dark                 #FF000000   RGBA(0,0,0,1)
background_holo_dark                        #FF000000   RGBA(0,0,0,1)
background_holo_light                       #FFF3F3F3   RGBA(243,243,243,1)
bright_foreground_holo_dark                 #FFF3F3F3   RGBA(243,243,243,1)
bright_foreground_holo_light                #FF000000   RGBA(0,0,0,1)
bright_foreground_disabled_holo_dark        #FF4C4C4C   RGBA(76,76,76,1)
bright_foreground_disabled_holo_light       #FFB2B2B2   RGBA(178,178,178,1)
bright_foreground_inverse_holo_dark         #FF000000   RGBA(0,0,0,1)
bright_foreground_inverse_holo_light        #FF000000   RGBA(0,0,0,1)
dim_foreground_holo_dark                    #BEBEBE     RGBA(190,190,190,1)
dim_foreground_disabled_holo_dark           #80BEBEBE   RGBA(190,190,190,0.5)
dim_foreground_inverse_holo_dark            #323232     RGBA(50,50,50,1)
dim_foreground_inverse_disabled_holo_dark   #80323232   RGBA(50,50,50,0.5)
hint_foreground_holo_dark                   #808080     RGBA(128,128,128,1)
dim_foreground_holo_light                   #323232     RGBA(50,50,50,1)
dim_foreground_disabled_holo_light          #80323232   RGBA(50,50,50,0.5)
dim_foreground_inverse_holo_light           #BEBEBE     RGBA(190,190,190,1)
dim_foreground_inverse_disabled_holo_light  #80BEBEBE   RGBA(190,190,190,0.5)
hint_foreground_holo_light                  #808080     RGBA(128,128,128,1)
highlighted_text_holo_dark                  #6633B5E5   RGBA(51,181,229,0.4)
highlighted_text_holo_light                 #6633B5E5   RGBA(51,181,229,0.4)
link_text_holo_dark                         #5C5CFF     RGBA(92,92,255,1)
link_text_holo_light                        #0000EE     RGBA(0,0,238,1)
group_button_dialog_pressed_holo_dark       #46C5C1FF   RGBA(197,193,255,0.27)
group_button_dialog_focused_holo_dark       #2699CC00   RGBA(153,204,0,0.15)
group_button_dialog_pressed_holo_light      #FFFFFFFF   RGBA(255,255,255,1)
group_button_dialog_focused_holo_light      #4699CC00   RGBA(153,204,0,0.27)
legacy_pressed_highlight                    #FFFEAA0C   RGBA(254,170,12,1)
legacy_selected_highlight                   #FFF17A0A   RGBA(241,122,10,1)
legacy_long_pressed_highlight               #FFFFFFFF   RGBA(255,255,255,1)
holo_blue_light                             #FF33B5E5   RGBA(51,181,229,1)
holo_green_light                            #FF99CC00   RGBA(153,204,0,1)
holo_red_light                              #FFFF4444   RGBA(255,68,68,1)
holo_blue_dark                              #FF0099CC   RGBA(0,153,204,1)
holo_green_dark                             #FF669900   RGBA(102,153,0,1)
holo_red_dark                               #FFCC0000   RGBA(204,0,0,1)
holo_purple                                 #FFAA66CC   RGBA(170,102,204,1)
holo_orange_light                           #FFFFBB33   RGBA(255,187,51,1)
holo_orange_dark                            #FFFF8800   RGBA(255,136,0,1)
holo_blue_bright                            #FF00DDFF   RGBA(0,221,255,1)

From http://forum.xda-developers.com/showthread.php?t=1458666&page=2

Parse ftw

Manage to 'sync' Asynctasker with Parse's database. Next step, deriving data from Parse, and run background thread occasionally.

Note: Better save a copy of the code.

http://stackoverflow.com/questions/10976843/run-my-code-in-background-every-1-sec-effectively-in-android

http://stackoverflow.com/questions/5774092/running-a-repeating-task-in-background-on-a-real-time-application

Success hampered by speed

Parsing Match Type
Good. Fast and no complications.

Parsing Tweet & News
Bad. Takes 2.5s to parse one tweet/news. 

Possible solutions
  1. Make use of Parse's platform. First, put data into Parse's database. Subsequently, listfragment will be built from Parse's database. Update database every 6 hours.
  2. Find a way to scrape data on a server, and publish it on a simple HTML website.

18.6.12

onListItemClick, a new beginning

http://android-er.blogspot.sg/2012/01/listfragment.html


No matter on the chosen solution, replacing the displayed fragment in an activity is done like this:
FragmentTransaction transaction = getFragmentManager().beginTransaction();transaction.replace(android.R.id.content, new MyFragment());transaction.commit();


Trying to implement more features to the ListFragment. May consider SimpleAdapter.


Another consideration: new ArrayList>(); from http://eureka.ykyuen.info/2010/01/03/android-simple-listview-using-simpleadapter/

Another consideration: Custom ArrayAdapter
from http://android-er.blogspot.sg/2010/06/custom-arrayadapter-with-with-different.html
http://www.vogella.com/articles/AndroidListView/article.html

Changing Colour of TextView base on Conditions (THE KEY)
http://stackoverflow.com/questions/4134875/android-listactivity-row-color-based-on-object-state

Moving on

NullPointerException(when switching off the screen)
http://stackoverflow.com/questions/8748064/starting-activity-from-fragment-causes-nullpointerexception

Fragment calling Fragment (the next big headache)
http://blog.radioactiveyak.com/2011/02/android-app-surgery-earthquake-redux.html
http://stackoverflow.com/questions/9281797/cant-refresh-data-in-listfragment#_=_

Communications between Fragments
http://stackoverflow.com/questions/5194548/how-to-pass-data-between-fragments


Related Posts Plugin for WordPress, Blogger...