From 49c3e495e8b9bb246c059b31e78bff09ab97cf88 Mon Sep 17 00:00:00 2001 From: crimean Date: Tue, 19 Jun 2018 16:00:13 +0300 Subject: [PATCH 1/3] Detect first location. Stop sharing if no permission. UI fix. --- .../bg_bottom_bar_shadow_with_line_day.png | Bin 0 -> 1020 bytes .../bg_bottom_bar_shadow_with_line_night.png | Bin 0 -> 1020 bytes .../bg_bottom_bar_shadow_with_line_day.png | Bin 0 -> 1018 bytes .../bg_bottom_bar_shadow_with_line_night.png | Bin 0 -> 1018 bytes .../bg_bottom_bar_shadow_with_line_day.png | Bin 0 -> 1023 bytes .../bg_bottom_bar_shadow_with_line_night.png | Bin 0 -> 1023 bytes .../bg_bottom_bar_shadow_with_line_day.png | Bin 0 -> 1029 bytes .../bg_bottom_bar_shadow_with_line_night.png | Bin 0 -> 1029 bytes OsmAnd-telegram/res/layout/activity_main.xml | 45 +++++++++++------- OsmAnd-telegram/res/values/attrs.xml | 13 ++--- OsmAnd-telegram/res/values/styles.xml | 2 + .../src/net/osmand/telegram/MainActivity.kt | 4 ++ .../net/osmand/telegram/TelegramService.kt | 32 +++++++++++++ .../net/osmand/telegram/TelegramSettings.kt | 4 ++ .../telegram/views/LockableViewPager.kt | 26 ++++++++++ 15 files changed, 104 insertions(+), 22 deletions(-) create mode 100644 OsmAnd-telegram/res/drawable-hdpi/bg_bottom_bar_shadow_with_line_day.png create mode 100644 OsmAnd-telegram/res/drawable-hdpi/bg_bottom_bar_shadow_with_line_night.png create mode 100644 OsmAnd-telegram/res/drawable-mdpi/bg_bottom_bar_shadow_with_line_day.png create mode 100644 OsmAnd-telegram/res/drawable-mdpi/bg_bottom_bar_shadow_with_line_night.png create mode 100644 OsmAnd-telegram/res/drawable-xhdpi/bg_bottom_bar_shadow_with_line_day.png create mode 100644 OsmAnd-telegram/res/drawable-xhdpi/bg_bottom_bar_shadow_with_line_night.png create mode 100644 OsmAnd-telegram/res/drawable-xxhdpi/bg_bottom_bar_shadow_with_line_day.png create mode 100644 OsmAnd-telegram/res/drawable-xxhdpi/bg_bottom_bar_shadow_with_line_night.png create mode 100644 OsmAnd-telegram/src/net/osmand/telegram/views/LockableViewPager.kt diff --git a/OsmAnd-telegram/res/drawable-hdpi/bg_bottom_bar_shadow_with_line_day.png b/OsmAnd-telegram/res/drawable-hdpi/bg_bottom_bar_shadow_with_line_day.png new file mode 100644 index 0000000000000000000000000000000000000000..96389533b4757394389b25fd6769453a0c89097e GIT binary patch literal 1020 zcmbVLJ#W-77!DLcsp!B+Co5e*G;y5oL=9C*?&wKPsjesW#yYXD7qy8);&N%nZu|#+ z022#r49xrmSQywD5DNpsx!x6qssol1+ppi}{eE8U?mSywT3M1LX}Px*^~HWee0LXb zi~o;q_nX)r@XnC$u@Rr(ib|V=B^2~>d`SBglhYTU=(;2=G}&Othw-+bvRuWjj@sm< zKugm4MpNSSh;oq7!>kD8?;k$OAR~diZ^c?%hIE{5omF)2Y-f<39i<+TH=cm?#uo;1 z$}wp2#b$SMjf)mBnuxWMsLWO=S`t^r*`Hq<`0()1j^_LPM!f3yvG5 zs8{C}B3h?aR`QG$ptXn-cEST$M0$}zUdHjI;i8@uN|X#XxP(a6V4k;mO|@&@r+>q^ zQoA0UmK64B%}%OR^kcL-2aDQW@2FK2(fH4+Of&@_M=U+bX~BC@Ad453WW=W=MHIPM zNiD}wOiOna*K%}4vmHW_XH%kCb30ezyQZrn%k<39MhJCWH}pE4u4WkKreT_vHpljg zn&Tp+bKjZpJ;S=!V*Rk9n6qlY*ztS{cE^mfddx}?hHcj!@G!<{RhLWU)n66Z_vF;`#GjZe@p8RhGp$H1LVRxJL%>_l&$9-RLHJ-az^ literal 0 HcmV?d00001 diff --git a/OsmAnd-telegram/res/drawable-hdpi/bg_bottom_bar_shadow_with_line_night.png b/OsmAnd-telegram/res/drawable-hdpi/bg_bottom_bar_shadow_with_line_night.png new file mode 100644 index 0000000000000000000000000000000000000000..d72a8bc35fa676bcc8bf5e52f656e827ee511912 GIT binary patch literal 1020 zcmbVLJ#W-77!DL6sOZ3g1e296AdwH}J5fV*O>*?4rkt)Pabum>*NfW3A#u61W5vRM z;0G`JG478Je!68IOUcLQ7Fy z1sakHJ=OJ82$oCa-YPuxMqz*Hi{E^4##reo%6vYT=ekU*0|mOStEifyX%g3v>XU+@ zMk?y{&O%7)w8~1B(E_vRBRGWw zI!H=Q+m;Mdb0o*KHA%H>OrUEKteTyj%kcfkGNIlJjKG2rMvfD>QPfv;-RS9tVX7T= zP}B?+Dd~J?-1ic@btTpdDuNiT#*`j)Q!t!SM(Y_ZK@hZEx52|0rCHGmAGM7-&pRYl z_LAU!MRTyIw3l5H1vIC4s#%sqTsM&nZ0b^y>U_FV)k2z+OpU}Amw5cY6;yaoN;@w9 zj87-xGua+5$iOcbbRq@kP{qmeDthm6qCFUdy>as++2;$N-Q9V6Lw_?|`5;`sBdmNB Uw!h!|_POQbAlePzZS9}^0c_MbiU0rr literal 0 HcmV?d00001 diff --git a/OsmAnd-telegram/res/drawable-mdpi/bg_bottom_bar_shadow_with_line_day.png b/OsmAnd-telegram/res/drawable-mdpi/bg_bottom_bar_shadow_with_line_day.png new file mode 100644 index 0000000000000000000000000000000000000000..6afcd4791de412520f1b69886acb88a1ddd02bbe GIT binary patch literal 1018 zcmbVLO>fgM7|sSv)1*m=)8J%f7bcMp=R48D)Fmyew3Mln-b$KCid zTsa`b8Hr!OpMV2D0Hbm2*P&%C>-*Ajei@P8~nfi z^f%<&bJiWRQ#xUDR1%?sX-q&rLsK#&2wz`*Bm08zs7^;?Hja+Hgk~~obmTfKI9d?) z59$IX=Y)ZnOw-&Ke}4Wdf)xAWJ2O(FA|SK$=%ys6H-k}fbDp?ZJa`TEYmXbq2t%OG zF7nE&eQ{ye=81`1a_{|q*j1``u%;$4?uFJHXD$sRZMb#8dlemUdUFQtdQeN%0 z7D7@bWm>S5=Af~NVtU1Vkw>~rAuFQj&Tw9>3dKvN)TmIPtSVX7|zDkC}ThrY;PWSnA;-~3+wG~kZgh0RFx3{@&nt%V zgtWd>?t6*t^d7`|K}is!<%rUYb_z~rl+kKN3lIcN*KP1JLP?r8!o8+Z%e+HUrtb;v zl{5p3N_*)&Q9yHoCz@qR#C2oIz@{$6iO#1hQ7xo7@x+L2afQeKTS0{fr8ML6&-k<= zK9kMyjtu;AM<GG`(&`W{&+`N%Y?lz-#<+o NHuk%N@Z;gx?H@G&HGKd8 literal 0 HcmV?d00001 diff --git a/OsmAnd-telegram/res/drawable-mdpi/bg_bottom_bar_shadow_with_line_night.png b/OsmAnd-telegram/res/drawable-mdpi/bg_bottom_bar_shadow_with_line_night.png new file mode 100644 index 0000000000000000000000000000000000000000..50179439a6f7e34865a803c2633639d61866f2f2 GIT binary patch literal 1018 zcmbVLO>fgM7|u4B(4f_%~Y)^S-#823m&rn6BJ;G87dO4cV0Y&8U-8Z@;No!3u9Pv?d6kwLCsMS%MycB3j z+SzSNgwH4kDV=0RDF6EWMFtrO<+paCCuKyZ+2K`1PpBJaKeJ53-An8#tP6{L@B%Ap)4Z3Ng*$jwQDM=K@%9odYInb*R#8L~ys0wL6m%Xle38?F_u^0%FDl7MKnaEvdPu>x z>nfIQc#3DchN3$zq0o0I(e0(3yYStPV?%S_vLXjU*zvr`?{vDlXD;;EaL;>wF85@qHP~T4#i`b@;VpB{P)*WPc>DWqLd4VVYTR}|(rM2Vo&-g4w zVkX<;Eg8h+mQJ(~9I6Ca)PwI|1<|&8@!qicnVyP8R-YV|*AM$s>A{w?@5LZ7*17+)E2~ppdbwCMZqL9`Pw8jmYVF^g{GG6Lf2a-nc3aYCKHpXoAy{w z;?M9dc=F&u5Ipz`1igAze}a?kZuL-la3GnPci!jyeqQZtKUrD2yCg}{N_R8tiG4wQ z%hwmh|IO>Kdt$r8+XKGKhJ1ocDs2!JQ_#)ui1sKZ$IrjeHA%W!r~LsRL|b0MG8H#E zYMm7VElF$Zb%B!u%0Wy=Y3|FvK75oxN_=_GieOX(bewLUlyvuGyPupKBrcKHAAz;n z69zKMF{rb{yz**ap4#=qxe;qJn5ystUp@ATJ8Bd~G~UxP6-~j1Axn-jn)7bx%i={PDe)*t z5Je7F606lxOiOnZ$7<;cv|EHC*QNwob2}H|JEo%}%S2{iBZS(H6S(bm2O5UCVVI@` z=h$vuahxY~?mHE}XIOYC)(c9CIV<~&9nPmrOm0rCv`*i5LZ7)}+7l=k95P!NXnqF_EI--(T-CRw}C)UsXZikD6@v)#}p6O*Z%_GWM5 z&+y{OKj1;|CU_SFPyPUJo}Fwr)kEpQfn;Xhd7tSA&IF<5In zZXhQNfhIpHYOnFdnO%>cTd^X7nF>4f#q*#>@eT-RMSv+=QVMkk*scss*U^lJKvSWm zsICGHNrj&3dMX6-C30^S9(#kZH}}PFzBpm5^b}<}oyt>PrqzK0UDs7qP0=)oYe@A; z!B8U=^=fA!Bz0P4CCg|5T8k*5$IKUbq~|H*WgK4^F6w!qc*&Fol?s$qCC}TuX4*9y zkiTJEs$CCHN}>!%O^>UT_hY=;fqCt&cGN2JXuM}t#+!nULYf}uq+tEf7x{~fGwczZ zLINEmrKW95hN(G{W7?XeS~e!owFp+t&dz1{p5bWFG)yC~AcT?Q1a1`dR9!bVbi**! z4%;tkhKiJQzBBH7jy0~tdO<}Hqt%eoqizazCX~^7LQ40F&=A{B@x$6Bm%LScC!8ufMvV7HE{NO~p*AF*_&G%%VFMRFR@|Jr0Z2xog{`GTV YVNtm8NQk4~yFXh>_M`3a!;}59KaYAi=l}o! literal 0 HcmV?d00001 diff --git a/OsmAnd-telegram/res/drawable-xxhdpi/bg_bottom_bar_shadow_with_line_day.png b/OsmAnd-telegram/res/drawable-xxhdpi/bg_bottom_bar_shadow_with_line_day.png new file mode 100644 index 0000000000000000000000000000000000000000..7939f4b3ab4309a58d1f041cf56cbae292c659aa GIT binary patch literal 1029 zcmbVLO;6N77_O2S0Xe`;Pm_`uP3*_?YdZ}q!M4aI7Rj;+d(ebwXO?ZCozf0&;be#& zOuTsYCwTDWNlgp~5B>$O{s8}i(`6Su5Dre#&dfXS^L{^Xwl*Ix%-xxjBx#|u5p>0V zO?*o?Z;1c$?zWSQcR8yf6x_4nyJ%XpZB9DUcxdJ zH#%ya6#^|uE30*ZlYPoTO!v~fE&u-VO$I4x%R6?YM}<#^>BdP(w@)^E$;p0#h`jm` ztkj+`kWr37ogL(rSGVP{T~C}Fu_lAD3g2(b=Rx(OE#R|~0$X*I1ez{rAr;!lHLM4~ z(4nL0NQ0K5Lr+JZ4#8x}!dpoOUN=~u_!76aJmkFaG;K5*sUuTm<(>u+LYi)9hM@=z zr8>?zu9du6o>~ZKm6U10Q)w;A|M`a@VF<730MeVM3)F_H*yr*R{d&$Y{OMtyJaZ4(;^fihZ5bM+PMrL`p7qtZdtwqAq-vDM`5_Go2Ip9 zT9&O(v7Nl)I8W%*cPe~Ou;!Im&o3$Ftn4v%Fr9*}A>*tXvI6*i)Abg(7vUt$8{z$? zQRjIFv`k-6vR<+bj4SP>mqY>W0T~#Mqfmrm#Ui$;#EB`UE72WnxbeV>Tk-@?{j#%|4g>GxR}eh}j7@gO87PPyYax(K_=0 literal 0 HcmV?d00001 diff --git a/OsmAnd-telegram/res/drawable-xxhdpi/bg_bottom_bar_shadow_with_line_night.png b/OsmAnd-telegram/res/drawable-xxhdpi/bg_bottom_bar_shadow_with_line_night.png new file mode 100644 index 0000000000000000000000000000000000000000..88f85b40c96e409186638062de4b7c8fe1af6532 GIT binary patch literal 1029 zcmbVLO>5LZ7)}+6w)W88^faX42bhn^cS2*S$<{8ITDA*ayx2)*wj0`HVls8pdMkCb%Bz7!az*+(%ct+fBq_h6#L?i8L3ebkWspET$1hM&3lH(wkvR(Ogs9*^a*F4J;Pfv)Q+s-|d~#5JVq zC}*ga@@l!Y5Rxh>(}JZm2aQD((?jNqJkrw?vLcGk4CmFfP`qSHjS2d?#=N-BleUupopT#|hj{XI<5GV@)>< zQ*E)`ykaO%Nb5W0zNc9GLaY~*1Tk9nDLrVXU~5Dftwyu}LC|#F2Dc-Wqw-Q27WoC6UjM;N=}wnpKkr)L|g8LYyJ91yvrB9v~;aFd3&| - - + android:layout_height="0dp" + android:layout_weight="1"> - + + + android:layout_gravity="bottom" + android:scaleType="fitXY" + android:src="?attr/bottom_nav_shadow" /> - + - \ No newline at end of file + + + \ No newline at end of file diff --git a/OsmAnd-telegram/res/values/attrs.xml b/OsmAnd-telegram/res/values/attrs.xml index 8eb8a22285..0beeb60bcb 100644 --- a/OsmAnd-telegram/res/values/attrs.xml +++ b/OsmAnd-telegram/res/values/attrs.xml @@ -1,9 +1,10 @@ - - - - - - + + + + + + + \ No newline at end of file diff --git a/OsmAnd-telegram/res/values/styles.xml b/OsmAnd-telegram/res/values/styles.xml index 95b9dc5850..ddb7ad85e2 100644 --- a/OsmAnd-telegram/res/values/styles.xml +++ b/OsmAnd-telegram/res/values/styles.xml @@ -19,6 +19,8 @@ @color/icon_color_light @color/ctrl_active_color_light @color/ctrl_color_light + + @drawable/bg_bottom_bar_shadow_with_line_day