From 92e0f9c8ba74e00e744e225b8455b0c73b2eca8a Mon Sep 17 00:00:00 2001 From: Jordan Hayes Date: Tue, 23 Aug 2016 14:19:53 -0700 Subject: [PATCH] Add unresolved icons Adds favicons for results that are displayed that cannot be resolved by the PWS. --- .../physicalweb/NearbyBeaconsFragment.java | 9 +++++++-- .../trusted_unresolved_result_icon.png | Bin 0 -> 337 bytes .../res/drawable-hdpi/unresolved_result_icon.png | Bin 0 -> 334 bytes .../trusted_unresolved_result_icon.png | Bin 0 -> 273 bytes .../res/drawable-mdpi/unresolved_result_icon.png | Bin 0 -> 287 bytes .../trusted_unresolved_result_icon.png | Bin 0 -> 451 bytes .../res/drawable-xhdpi/unresolved_result_icon.png | Bin 0 -> 487 bytes .../trusted_unresolved_result_icon.png | Bin 0 -> 635 bytes .../drawable-xxhdpi/unresolved_result_icon.png | Bin 0 -> 632 bytes .../trusted_unresolved_result_icon.png | Bin 0 -> 818 bytes .../drawable-xxxhdpi/unresolved_result_icon.png | Bin 0 -> 829 bytes 11 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-hdpi/trusted_unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-hdpi/unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-mdpi/trusted_unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-mdpi/unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-xhdpi/trusted_unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-xhdpi/unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-xxhdpi/trusted_unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-xxhdpi/unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-xxxhdpi/trusted_unresolved_result_icon.png create mode 100644 android/PhysicalWeb/app/src/main/res/drawable-xxxhdpi/unresolved_result_icon.png diff --git a/android/PhysicalWeb/app/src/main/java/org/physical_web/physicalweb/NearbyBeaconsFragment.java b/android/PhysicalWeb/app/src/main/java/org/physical_web/physicalweb/NearbyBeaconsFragment.java index 84f2bd84..3bd78fe1 100644 --- a/android/PhysicalWeb/app/src/main/java/org/physical_web/physicalweb/NearbyBeaconsFragment.java +++ b/android/PhysicalWeb/app/src/main/java/org/physical_web/physicalweb/NearbyBeaconsFragment.java @@ -497,9 +497,14 @@ public View getView(int i, View view, ViewGroup viewGroup) { } else { setText(view, R.id.url, pwsResult.getSiteUrl()); } + if (Utils.isResolvableDevice(pwPair.getUrlDevice())) { + ((ImageView) view.findViewById(R.id.icon)).setImageBitmap( + Utils.getBitmapIcon(mPwCollection, pwsResult)); + } else { + ((ImageView) view.findViewById(R.id.icon)) + .setImageResource(R.drawable.unresolved_result_icon); + } setText(view, R.id.description, pwsResult.getDescription()); - ((ImageView) view.findViewById(R.id.icon)).setImageBitmap( - Utils.getBitmapIcon(mPwCollection, pwsResult)); final String siteUrl = pwsResult.getSiteUrl(); if (Utils.isFavorite(siteUrl)) { diff --git a/android/PhysicalWeb/app/src/main/res/drawable-hdpi/trusted_unresolved_result_icon.png b/android/PhysicalWeb/app/src/main/res/drawable-hdpi/trusted_unresolved_result_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3aa534972f3d7c5dfccadb11fe401e6fa63a4523 GIT binary patch literal 337 zcmV-X0j~auP)v0RR908p0wQ!XwD=%H;Ru?fUI|+00000NkvXXu0mjf_obL0 literal 0 HcmV?d00001 diff --git a/android/PhysicalWeb/app/src/main/res/drawable-hdpi/unresolved_result_icon.png b/android/PhysicalWeb/app/src/main/res/drawable-hdpi/unresolved_result_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cd802be615d63468dbdbc70aa7844c5e77e73bb3 GIT binary patch literal 334 zcmV-U0kQsxP)G|T|-A_W@QAOQSM&^Kb?WCRLb!_H;cI%gr0X&0I%bZQ~3k*n1}Ee_Au`LaiApn%&rcLW1fIF55dWguYM zIkf9B)$e9dHj|n`_-ie?CZK#cC~7KYa1f$oW23i7@=z&5)a0Pg0L1T_6ZjYR-_B_J gh?W@k5ij}MRsaA107*qoM6N<$f|tReLI3~& literal 0 HcmV?d00001 diff --git a/android/PhysicalWeb/app/src/main/res/drawable-mdpi/trusted_unresolved_result_icon.png b/android/PhysicalWeb/app/src/main/res/drawable-mdpi/trusted_unresolved_result_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..60678e17d6f252c02587a147f00c496fea81521b GIT binary patch literal 273 zcmV+s0q*{ZP)9FPa<{iQ%Xx44!_~+2_(eeB8%J9qb`|^F%3*W9|3$r;QAJXf{Y$(S>Z2g^&I)3^9ry);nP(F?p*+t}e{Tk^cO+)P0I^z`=A(A!2j|NsB@*w*~?^XG$m`|9cFh=BOt z-Twam`|IiLq@MTM*Wg}L-(6Dn)zavQfA6oU;bmIqgL=&tXRQDL00MMUPE+Ga48W8l z0001TNklF7yj{6{GST zk_pZQlNb!k6VWaM1GQplRTOO3KT3UP35>Zm63E{;+%NMIVLr}X1alsj2-7}K9CWT} l0$UZm5g`2+8UoGxyaDaG336upSU&&&002ovPDHLkV1lClgvkH^ literal 0 HcmV?d00001 diff --git a/android/PhysicalWeb/app/src/main/res/drawable-xhdpi/trusted_unresolved_result_icon.png b/android/PhysicalWeb/app/src/main/res/drawable-xhdpi/trusted_unresolved_result_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..11f8c32004b81c4f19482684b277577ba5ca64a2 GIT binary patch literal 451 zcmV;!0X+VRP)a$hR zTT{_lp5>u$*mUyy@<`54iO&B_~n7!g+RT@t6-5A;*~Zrb~R zEXULH%j?_w$0zd41FZ3N_^It9)*fJmNw|?EojC}Ulnu%hdHpqQ*&v)yG^1t81_%>U{XB4+ zhoTh=sD3w5f&&tA({MsA8|)7$5SEYMxVRWvVk7W%;2VMT0)+jEP)L{9>XSq-G!Osoz3yjirbpkF~~U8^Vi|`;<)U) z?D_0X&r`te!utLCBg8Ae?!n*o;7HC-M$JvT?Y>>pW6<)^KFdY<{rSG_z>VOMPtaCe z(_-88-D=lx@A~k0mf_>0003_Nkl$82Jb-;>pL@|yS+7XRIzINEh1qV z&_D`^kaL$m_`6f&^N@#*2@Tr_|RaG&|y`2`dVpi8*QF3<2{04?AxyIjM< z0E(fUUA`bTfB?mGywGYrVrQfEN(UNG+1qri0d-N-)qo-tMH&#w4h>Zwd%f?fJ=A~Q z4CTHxwA?OBTPT%NY6<1!l(U4|V!Md8B_w}b3)n)P`evwitRawthulL>zx@e{5)CLs zQK$h0C<-(nF=uacp#hzUAWYa%5(dKmVfT=S4hlItvN${YI6Fi+JB>Lz*10+#{sEip VxvPup-VFc%002ovPDHLkV1l49IlTY? literal 0 HcmV?d00001 diff --git a/android/PhysicalWeb/app/src/main/res/drawable-xxhdpi/unresolved_result_icon.png b/android/PhysicalWeb/app/src/main/res/drawable-xxhdpi/unresolved_result_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b259de572fa0b842304f1faaaca79a6e16600a1e GIT binary patch literal 632 zcmV-;0*C#HP)zb3|XkPvJ_xRk}{r2|${r%fV zI`6Ee-(6Dk#lhT6Kl$U~`|IiS$i(cQncPi5>XM4wOFrILOyg~1?WLdn^z{1WphR7vcfnEK}B=6!VZ%E#!7gZ9wP+etj|w6EMrJ@L7;@w&C; zdvX5${^^c~<$7`Msif|wp!CYd>5hi<$;IuYp6;iif}-vk00007bW%=J0AVZsR>47XlHFZf)4&@NLE4z&#Xt?D^ zrULEO_-Vb9hH6!$s@CM7l7poExYF%b#(N|=B`K%{puYKLH+29l8E6>+Zu{45yFj#* zfI7gi_gC%>fsO?90u0jh0Cv02#s}8o?nM!XX*KA{W0M8o?qMz8?So{~E#~{QmsX^VGiWz$?ZxW!7qS+IlR< zH2D4aC&e$=^x0t4WykQzaoKjAtDt06tgIG! zecH8)9XEm~jKb@jX>NO%*~|^6}DV6IkqSRUbwfL4Za^EcntmFU( zIKTm?yL&swC!Nm8@y_1vsdZo;c%brvxm6%JC)asm4@ipSqnOwN_I`MCg0tpETTyAY*zFoT-O15g<|zkqGcZJ-ibEF4e=O2*A~Hzd{BW-u#|#hC%?hrED$TA_Y*%)(Q@A z!2k3&IYq0~81T{RyD<=>Rcs7w1!xp(^6$Hb5QGMRD)v*>l=`vz%}yf+IKTl8aDey+ wYw=I+;ztA0XAgIz4>!b5Pvnnh#Ls_z0f`ovDij3Wm;e9(07*qoM6N<$g0pO)y#N3J literal 0 HcmV?d00001 diff --git a/android/PhysicalWeb/app/src/main/res/drawable-xxxhdpi/unresolved_result_icon.png b/android/PhysicalWeb/app/src/main/res/drawable-xxxhdpi/unresolved_result_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1c27dfdf0485965fda0e39c553a6ace3503cf05c GIT binary patch literal 829 zcmV-D1H$}?P)>o*wy;y<=|gb z{P6Gcy}9U$g7(nO;b&djNj&t)#ro;z<8o-~mX73gYurvj=YxCv^YYt9I`z-Y?4FqU zU3x%=+o*-c(8Qzq;mqbp81E<8Wr*Tu|kCaO#zg-&#-KTv7JZ z&)->1-d9ZUv##Q8V)oO}<85Q)bZY2`f9jTx|WK~#7Fw84oD!T=OQvG?yP`wt9=6&jnL>m0povX8&o zkVS0qRgY|*0#-%~7cz>YW!0ptl9AOQvroJBv9m@H1OfQ$>CJ&9=bST`fOF3F`@f4D z)WXJV;nBF~KTRF$P~Tx!LSowh1~7mDZeoCgTgYdcNz%;Z3+{m(*xEk)7T?~o0?rXq zIXZlRQ-;5!>~H}^56;Q8+FhsDbGq$T?oxO~CSU}Zq&oT4OsWZBMm#`ihFih-wj2jo z&Ppu62{6+?+bLj9EWmeM+NJ9q*6&z=8ZNo%+QquY0@QJ-k**t9*I9ryE`{kj#CpvF z07km!2Mn<3Sa2s+XY*e`)Q5kjAE^WL1xREuR|b|Km8CMUk^@%CfG-F5$^b~_fdB&p z&p!ZV|8>9*1W!ds!v2+bHed%{2tfkw3o&E|tja~8{WlqI;3{1A*#Qz>(mp>x!g>EO zumdD~6qvWP&koS@72#`50PT~&577Jho&gB^JCiS{qT zFvkgy@EP|>_(J>U7cC1?$tnY$9PmvUh~feY(SYW&he!GkH}s#LXg{9OeE#zjjO>H+B{}Zw00000NkvXX Hu0mjfHUqDC literal 0 HcmV?d00001