From dd6623b4c3936865faad2237f91c01d96972ea66 Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Mon, 2 Dec 2013 16:23:40 -0500 Subject: [PATCH] ui: adjustement on left menu --- res/drawable-hdpi/ic_action_expand.png | Bin 0 -> 539 bytes res/drawable-hdpi/ic_action_expand_light.png | Bin 0 -> 442 bytes res/drawable-mdpi/ic_action_expand.png | Bin 0 -> 409 bytes res/drawable-mdpi/ic_action_expand_light.png | Bin 0 -> 337 bytes res/drawable-xhdpi/ic_action_expand.png | Bin 0 -> 692 bytes res/drawable-xhdpi/ic_action_expand_light.png | Bin 0 -> 529 bytes res/drawable-xxhdpi/ic_action_expand.png | Bin 0 -> 974 bytes .../ic_action_expand_light.png | Bin 0 -> 726 bytes res/layout/frag_menu.xml | 44 +++++++++++------- res/layout/item_account.xml | 19 +++++--- res/layout/item_menu.xml | 2 +- .../adapters/AccountSelectionAdapter.java | 11 +++-- src/org/sflphone/adapters/MenuAdapter.java | 5 -- src/org/sflphone/fragments/MenuFragment.java | 11 ++--- 14 files changed, 50 insertions(+), 42 deletions(-) create mode 100644 res/drawable-hdpi/ic_action_expand.png create mode 100644 res/drawable-hdpi/ic_action_expand_light.png create mode 100644 res/drawable-mdpi/ic_action_expand.png create mode 100644 res/drawable-mdpi/ic_action_expand_light.png create mode 100644 res/drawable-xhdpi/ic_action_expand.png create mode 100644 res/drawable-xhdpi/ic_action_expand_light.png create mode 100644 res/drawable-xxhdpi/ic_action_expand.png create mode 100644 res/drawable-xxhdpi/ic_action_expand_light.png diff --git a/res/drawable-hdpi/ic_action_expand.png b/res/drawable-hdpi/ic_action_expand.png new file mode 100644 index 0000000000000000000000000000000000000000..eacb248484f1ae6ea9cdca9e15cf0519463b5a33 GIT binary patch literal 539 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4mJh`hH$2z?F<YIk|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+825U*IEGZ*dNXak|6vD_<I&S3&+s&vI3}c}O%pk? zVROR8&CUv^;u{?s9M2^faBMK1AvvpoA<)=x(yCdU8*1V|DNH{dTNWKJ`hN1BFPnDX z`(5|`c=TeAKoM6En)2UE#>&9=a;}Zh5tH+uBZZSDBsUxvC~TF9SA3td*6_c?#&!wC ziz^sEnmq3)?r|+|P?wLezpQtsechF=xwfTe`**5OvQBX3G!_eRuX!dQ@1va(5IJqV z=cJm&H#hIH>Tv!dDzP~x*hY3L_mOprXP13*Ji{=1hI2-1n)pStT^XYM7tD{(&<e0Q zTX>E;!Rh!%zDM(2%MTcQ<XkAPa>K~+t+J6vGLzQXnP2~{uUKXG{*n6$qm3!Tzxzbr zEY?3Z<B;;d7X3A6nF_f-cDuc6IDUltKId&0@mlMWe3_{^F9iLy<8v3O_GLZN+*p5T z$K1l&elyLfy;25!$2J~!c_R3q<zs(o@pcuS3p1Z{T`iw-v+wa#&LjS+MconxS|JD3 zZp}*!$y}%S&sS^x3`VoS!q!(G|2K2Ky}*0qylQcml!4ZjGphnh#P!VAn)Jp$5|z)K nc*K4FB8@HxI@`~{%wWy7VC&W&@A?@S7#KWV{an^LB{Ts5uIK0b literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/ic_action_expand_light.png b/res/drawable-hdpi/ic_action_expand_light.png new file mode 100644 index 0000000000000000000000000000000000000000..fd2e7ff6d51c2c95d878c77186bcbb3a8bf20aa7 GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4mJh`hH$2z?F<YIk|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+7-KwL978H@y_tTIx5+@D?O-`u0i##}ugn3~2eGx{ z_pg38YT#Rt{DMjE0RvCN^(Q`3MXX%9ohR=<3A)s_`~T}gcAZ7`^4tul;2`6yWu7P2 zrMwPE+LGTlv87<$iFrAx4F8utjITV)z#S*)Ey?a<!{L9UK22wRo7|--QWqGnig4@; z-+IKl_lDw)wq<iSe7*R(P-egE(d8y{Pfk1ZZRVf5dzk)o^(@nk{Cy>RlPzm4@0Z2$ z$0r{>-}>jy-t+~fMP3~1j&IbrkU!*j<I*GU>poW38Q3*WEOB5Lno-_yUiZ=c<Rks3 z8Uh+tZuqNUxb(uwO?)3qFDSjs+!&TvV=GZo#_;&!30;ASt~IWYR<GQ+m*I;@y2-K| z>Fh5u`xoDO`zC&|&YB0)XMZ`QUDNe_USl7h>B`Gz_!1o6^!PVh9Xg<|iV_453Ts#; Y7)tfmt)6=I+f0y@r>mdKI;Vst0Pjh-9{>OV literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_action_expand.png b/res/drawable-mdpi/ic_action_expand.png new file mode 100644 index 0000000000000000000000000000000000000000..e8e646b6e69bc05d21159431fc8c5578fec63873 GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+7_B{B978H@B_&9(E=~~XX$ov$mynh|&15Lf`fH~{ z+JoT3J?D!QLRpTm1qB7A&$F-pH#_9?!e4V6f30WyT7PI+A7{VhOa~q#mM0U!oa_!h z`VqDwPH#md&l0NyQGxpAO$YZeO654TJY@@*e|XV5=_@*y7BNVq=sP&Fr_5q7)E1e| zbo3t6(|Hdz+!69v>U8yx&U@?XZ*O!b$ug84Q4jdTJTuGT48JJbQcl4IcUVnM3pY&B zpL8L4#Z&zcHxGI^HJxg)VqtUOi{MCYXWXbdN#?}y%Z=0Ol~c@=J2kBt&n`M1AZ6Jo z#~!t(A;Ng3XCZ^ejmCrjWlvmb<NB!V%4_kENjKiVYv!3HVtNklci2^3GD;NGw=H!z z%|9_q&e&2_MnhcT>4f_ij+B)y=*o(03pC(zJE$SSD#Fmfz|63dJK6r0)3cWh3=9mO Lu6{1-oD!M<E<BqL literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_action_expand_light.png b/res/drawable-mdpi/ic_action_expand_light.png new file mode 100644 index 0000000000000000000000000000000000000000..236f4fe1e58da7d688f308203d27cb0cac99f643 GIT binary patch literal 337 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k|nMYCBgY=CFO}lsSJ)O z`AMk?p1FzXsX?iUDV2pMQ*9U+7(RQtIEGZ*N=lPRIAHUtA&|YtD&YzvPqXBo|NrB8 zJ1R9VoaZ)b7CQZ%`J+*h4CB@s$tyf_`Vx*LA4pSB<$PMl_Nc_o?O5~?D>;v|EJ-sC z&u9MnD=GMN%kepJD~|F6G^a7~mMI)6VmCQ$?|gQVhSWKQ#CV%mwHL3vQ=h^n(OJ+U zGT{|tQcCkShUP7dzOo(fn^jo4)(I`xl`dk*Fm1ttJ_9!)JBA~@0cD1>o~AFHR<D*~ zrra6WbapyVi&J|RUxSsB(5vJ%oZ=Zji>gEd_GNSy+wVK#c{-@b-cWPywLS@n)9$Mu iL%ntQ7$XBC8^gZ94azO9eO(L;3=E#GelF{r5}E)j+<-v< literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_expand.png b/res/drawable-xhdpi/ic_action_expand.png new file mode 100644 index 0000000000000000000000000000000000000000..4772487c42b9e68a340673fa66ed0490219fe969 GIT binary patch literal 692 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9o4mJh`hE<t`_ZS!$BuiW)N`mv#O3D+9QW+dm z@{>{(JaZG%Q-e|yQz{EjrrIztFok)#IEGZ*dNX~Y|6vD-qt?@A&E!-&A;iPftawwv zSb~R%CyDJK3s)n<!T5#)3JyGtGma%}&^W^5?Z9Jbd~i}?n%ay5AM8F&H1V#!dn-=* z&~Mf0hjx73_rCCZ+-r*#0VfVc7?HL(XyuzE5u=#>3Z_SPy4xLlR2s9*(CpOHqI?UP zzTmt%$?3s8rEB63{JMLE<-jA;m~UUgZ!(68e4I9o<JKQew?O--gTIv5*l*Bd5Q{(h zG~-pWc(QSppx_bvYo>eGy!MkhTfD!O!*s^E80B{}c|OZTDktT3a$Y!6Vg9F<z12*| zMF0C8L!Zj)x1K49Z(b1P;W&M+-*e-2mtR-LoB3oX&kb9p*|7Orld(F}IyN7{=BUGS z^q%=CneAWk{O*-M%(M1;+p>kW%#)ZeF~PAVYD!DMa{I#?lFPPU_>-)5o>5Ma?a@B1 zrq{+tug;J;KTF`%mv*U*btg9Na{9c!@b!81!~h}NPw~@q<pZ{?HZ(nWr_SSZ^o}>| z9hxWlcDsH4tCHpK!XTR1!**NC$uMD7g_Gx>!wG9{D;}$AeCF<Xb#AecTkLMRNdiSF zv-Wc?yl-hxakBq%@|~l;qOX~J_G;&}9$oTJMy$BMaE_fYqfJ^`mBz0xd;Dk2*_XTe z*dAX-6GgUH+>V?NrH<@${e0dmdy7^>*N26ifu<&}ukW#O{g!h*J(j`W$);7M<+}8_ z$tAzeum%Y3Q)tS0t}0vSVRKLA?U$J|AI#AYni!w)?+D+A%89dHOe`?D|9<ZOwj)d2 mRN-;Vq1ZCP<cC-S!#>q(n~ahry%`u77(8A5T-G@yGywq7zbxVa literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_action_expand_light.png b/res/drawable-xhdpi/ic_action_expand_light.png new file mode 100644 index 0000000000000000000000000000000000000000..0452d8bd435298ae594346cb7d82905d58df5e48 GIT binary patch literal 529 zcmeAS@N?(olHy`uVBq!ia0y~yU~m9o4mJh`hE<t`_ZS!$BuiW)N`mv#O3D+9QW+dm z@{>{(JaZG%Q-e|yQz{EjrrIztFmCpAaSW-r^=8K1+(QNe#~<%YXOL)Mjaa~ZfiZ&N z9`}3A_e<U<GO{%=N;K#lV0g<QsjxTry`s~RKH2%rSN{8NV)819-*;#3<WvS^@av+< z*{(3VMgQjHN_hWlyEgS&=d~P`zs48On&mh>-NT|)zxZ^}KfjDn&1QvNS{Kji997Hr zY525LqyES_iQ=HLd9u1zdFws@PcLJ;ac`&7=eZ&`T^HnDG*Xz(vtj9<nPrcZH+|O0 zPpo{RCK<4r&EfWfD~#rXK}AnF4o&O%%{Rq<>FIk9|1>_4cd9iw<=VMYRXDG4>OHe` z9=%;^mwsDLpL<Hz@yDC&H7sB6D(1hA{&<z?!mW*)uFjSZoOIE>U1pwsPV-s*``^!M zd}TPI5wVi%^#jih#<S|%*533yoy=XdC2PK7%Ch^`bL@|o*;TRKnJ*gkxafJ_sr>M3 zGABO<9roMGP*Kw1v-?uN7z5{_)hq|U--zk{EbjaJ3iE@Dm)Xzr`AakO^DPW|Ik~iP zp6sD%m!?lSr+&6U?yuc1&QB{JcKX|;$EN=JU0*Pp=kF9&<ZxAJh-YMD$ntsKbfc5; P0Z7Kv)z4*}Q$iB}r2^$R literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_expand.png b/res/drawable-xxhdpi/ic_action_expand.png new file mode 100644 index 0000000000000000000000000000000000000000..22003198b45cb61d51ccb07748599367d02d9c17 GIT binary patch literal 974 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RWBuiW)N`mv#O3D+9QW+dm z@{>{(JaZG%Q-e|yQz{EjrrIztFc)~bIEGZ*dNWJ0K-f{F?fr`@M_iUHnmm(BD=BFP z=dzAjucTab)D2uimM}FR4O<}4p=4kx!Lx|X#m6YvMZi!nb(yK5;K~&bZ7a-EoMzo= zyOY-cbKlIluS+(a-S_|P?Z4&g16dfb16TEPuldcTdSxq3md-8ReK%3?=tK#vPaaF= zdh>)=)*N^9W7a?U*kzVl;`*qyb^G`2lN0r+k^SwRdHd2UA?N6%9o%+|YIUdC*5!Cr z>oE4HG|00G*89tyUpn<oxT?2P`c==035S2oHv6o8kwJ)i4aXyO;YZ7tcxUYpRcOB6 zcwYGD#50R@XSz;r>{|cWe$MBKb3^;>&m}%fab&L0m%eQw@UV27{bkNc8@r{t%QCz# zOgo%zdSM!?T+<I-_K&g2UpKROMt)mr)6Um8W$D}XmlbDTu6(Mo;@rP(h3^cdmP#wE z=I+`#-*pLJrb2D|yrb(+KCU>HRxQ6PW}om!YscFGf}h;dw{pFn(4rn?yDw+e+i-oO zK7G;uAxGYeKT=rc-No_is@B3erSTK&RA1gc9a*z=lE3V(7o0yz<Cg!lc%Be@xAoGt z#s4kZH=2mwNO_;9`z_>CXYzyauuqRgyY9~_beLl;_~iHbPuJ28yEA=xpmh55T3ydb z*`T{-&oA0{tzRT>*|lEu$HjKDIH3eji5b3YQ}6sa^=!hlZ7bF4P9IFmI$A66asQ7? zN28h4a#pQ&z7>B=apq;qxI-_$)MPy}WfbOHnLPEuqX|j2Z&F468x-xf@cuqW`hHb~ ze}n47Ym+u;ubs3pTKBZ;jNBjW-W~g=U9ON>J2TW$rP#_nEYi_(?gOoaHs>zc7H`=g zf9;b;*59bw|N6t#`7VDxmmc5$jcdj&6XABf{bs(ucRnpxzIe?WtDpNl4@}7|*{RSi zV_!e(I`=mxJx61iNw==FOUhna)_gYP;{7(2x&qD_n^x+HS4Nt@d+^UzZ3jz)&^sN@ z)Z^MMGyT+m)%M%-8D6vClG$x%7qRKLD~I3m0#SodUfbj0b0_;fFMjcnbv}c4(>=wn zx}4o+v9VeAI)2>m5{Om=1yS0L6W+Pc7HAZTsxb=lz1$Z*cjrDU6~=n&C2wDx|35!& s)^U0F2UitU%Vx4;PwosG%<8xd7^W_a5q)!K`Bac1Pgg&ebxsLQ0E>yMmH+?% literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_action_expand_light.png b/res/drawable-xxhdpi/ic_action_expand_light.png new file mode 100644 index 0000000000000000000000000000000000000000..51070821baa3d0b8dd89e7d313606243be201dfb GIT binary patch literal 726 zcmeAS@N?(olHy`uVBq!ia0y~yU`POA4mJh`hDS5XEf^RWBuiW)N`mv#O3D+9QW+dm z@{>{(JaZG%Q-e|yQz{EjrrIztFjaWEIEGZ*dUNw&Ad{g;L*lgGVhdO=Fz^O2h&V7; ziN9M@{y~p7qM>>^(-uaq4UAj|#Gk+2ak$6%klM|Z=l|1;G@569zo%BYyU&dQ1N^s` ze_mK}z0o`4zK3ziGoF}z3_7;E$6r$ZChLcC#@Y-XwP{92?n}0N?Ax>F)Q-#B>-JCo zE-tBBztGUcbN^+DQ%|@R!i@CRR~Ucv<#WAYnHP03-^avkJ=gik>z}07JxwkR6bW5) zvfu9i#^>7Uc^@zCtSOVu@_$>9mMi;gzsEX;wYK+<>0Ft2>*1MMtX-zB#IC%Vzs=7` zF4a^1_p1^;zG&(5M)$v~@F&i_5ha|x_~nFUwkq|nX4D8@zLoxI@A`%*>(<1CWeFOb zNXswX$yq&Fp}cW&e$>gOhx=tre=ZmJtjWY4{c7s7q61fr%Jwl|+qp)^dhRjD@MoGK zeO(^j`-*t(ybdjYoYhmbUuY@Atd^yZ=PuE7x>|bw>gN?jKKmjY^9?@<tz}qy`2ER^ zpLhKHuzR7TLH&ExFk^we42ITAV%~W!5_g!K{Lg(u=^e3eljiJw`o4a`boS$K&wcrE ze`E1QZ^kJ0#hOj0eQ#WC-uRx`em2t&zlar0eES&ew)I?yzV(3n!qW>^)=#c|GtrmP zYD@3ph}>L`$5Xf#bXH!`J?8du!k^@<lm2<EB{d}za+Xg%%ayUVC9QtF?Vnv%SD&cw zX3`65e*O6Iwg>&&+2b3et(PpZn)`-(f$NN{_4RKr<o+xDG1WQdrpSR!zP{_u%7iek zEAcp4W_7dFahmL<g<roZ9)FU4-sZ&R_DYOo!LawIU;;yUthe)@Hfep3w5O||%Q~lo FCIC$@MmGQe literal 0 HcmV?d00001 diff --git a/res/layout/frag_menu.xml b/res/layout/frag_menu.xml index ec4b03c8a..f70f99d28 100644 --- a/res/layout/frag_menu.xml +++ b/res/layout/frag_menu.xml @@ -8,7 +8,7 @@ <RelativeLayout android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="100dp" android:background="@color/sfl_blue_0" android:padding="5dp" > @@ -23,30 +23,38 @@ android:id="@+id/user_name" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerVertical="true" + android:layout_alignParentRight="true" android:layout_marginLeft="15dp" android:layout_toRightOf="@+id/user_photo" android:singleLine="true" android:textColor="@color/white" android:textSize="20sp" android:textStyle="bold" /> - </RelativeLayout> - <TextView - android:id="@+id/list_header_title" - style="?android:attr/listSeparatorTextViewStyle" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingBottom="2dip" - android:paddingLeft="5dip" - android:paddingTop="2dip" - android:text="@string/frag_menu_accounts_title" - android:textColor="@color/black" /> - - <Spinner - android:id="@+id/account_selection" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/user_name" + android:layout_alignRight="@+id/user_name" + android:layout_alignParentBottom="true" + android:layout_below="@+id/user_name" > + + <Spinner + android:id="@+id/account_selection" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/sfl_blue_0" /> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:clickable="false" + android:focusable="false" + android:src="@drawable/ic_action_expand_light" /> + </RelativeLayout> + </RelativeLayout> <ListView android:id="@+id/listView" diff --git a/res/layout/item_account.xml b/res/layout/item_account.xml index 7554fb3a9..3f085216b 100644 --- a/res/layout/item_account.xml +++ b/res/layout/item_account.xml @@ -2,6 +2,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@color/sfl_blue_0" android:padding="4dp" > <TextView @@ -12,24 +13,28 @@ android:layout_alignParentTop="true" android:layout_marginBottom="4dp" android:layout_marginLeft="4dp" - android:textAppearance="?android:attr/textAppearanceLarge" /> - - <TextView + android:textAppearance="?android:attr/textAppearanceLargeInverse" /> + + <TextView android:id="@+id/account_host" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/account_alias" + android:layout_marginBottom="4dp" android:layout_marginLeft="4dp" - android:textAppearance="?android:attr/textAppearanceSmall" /> + android:textAppearance="?android:attr/textAppearanceSmallInverse" /> + - <RadioButton - android:id="@+id/account_checked" + <ImageView + android:id="@+id/account_selected" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" + android:background="@null" android:clickable="false" - android:focusable="false" /> + android:focusable="false" + android:src="@drawable/ic_action_accept" /> </RelativeLayout> \ No newline at end of file diff --git a/res/layout/item_menu.xml b/res/layout/item_menu.xml index ef00c7a4a..02e21a76b 100644 --- a/res/layout/item_menu.xml +++ b/res/layout/item_menu.xml @@ -2,7 +2,7 @@ <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/menu_title_categorie" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="?android:attr/listPreferredItemHeight" android:gravity="center_vertical" android:paddingBottom="10dip" android:paddingLeft="15dip" diff --git a/src/org/sflphone/adapters/AccountSelectionAdapter.java b/src/org/sflphone/adapters/AccountSelectionAdapter.java index 9f90d945f..a927319bc 100644 --- a/src/org/sflphone/adapters/AccountSelectionAdapter.java +++ b/src/org/sflphone/adapters/AccountSelectionAdapter.java @@ -12,6 +12,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; +import android.widget.ImageView; import android.widget.RadioButton; import android.widget.TextView; @@ -59,7 +60,7 @@ public class AccountSelectionAdapter extends BaseAdapter { entryView = new AccountView(); entryView.alias = (TextView) rowView.findViewById(R.id.account_alias); entryView.host = (TextView) rowView.findViewById(R.id.account_host); - entryView.select = (RadioButton) rowView.findViewById(R.id.account_checked); + entryView.select = (ImageView) rowView.findViewById(R.id.account_selected); rowView.setTag(entryView); } else { entryView = (AccountView) rowView.getTag(); @@ -67,9 +68,11 @@ public class AccountSelectionAdapter extends BaseAdapter { entryView.alias.setText(accounts.get(pos).getAlias()); entryView.host.setText(accounts.get(pos).getHost() + " - " + accounts.get(pos).getRegistered_state()); - // accManager.displayAccountDetails(accounts.get(pos), entryView); +// accManager.displayAccountDetails(accounts.get(pos), entryView); if (pos == selectedAccount) { - entryView.select.setChecked(true); + entryView.select.setVisibility(View.VISIBLE); + } else { + entryView.select.setVisibility(View.GONE); } return rowView; @@ -81,7 +84,7 @@ public class AccountSelectionAdapter extends BaseAdapter { public class AccountView { public TextView alias; public TextView host; - public RadioButton select; + public ImageView select; } public void setSelectedAccount(int pos) { diff --git a/src/org/sflphone/adapters/MenuAdapter.java b/src/org/sflphone/adapters/MenuAdapter.java index 2823b0176..700d9e0fb 100644 --- a/src/org/sflphone/adapters/MenuAdapter.java +++ b/src/org/sflphone/adapters/MenuAdapter.java @@ -21,11 +21,6 @@ public class MenuAdapter extends BaseAdapter { headers = new ArrayAdapter<String>(context, R.layout.item_menu_header); } - public void addSection(String section, Adapter adapter) { - this.headers.add(section); - this.sections.put(section, adapter); - } - public Object getItem(int position) { for (Object section : this.sections.keySet()) { Adapter adapter = sections.get(section); diff --git a/src/org/sflphone/fragments/MenuFragment.java b/src/org/sflphone/fragments/MenuFragment.java index 9bf2cffc3..d069d9e09 100644 --- a/src/org/sflphone/fragments/MenuFragment.java +++ b/src/org/sflphone/fragments/MenuFragment.java @@ -57,8 +57,10 @@ import android.content.Loader; import android.os.Bundle; import android.os.RemoteException; import android.provider.ContactsContract.Profile; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; +import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; @@ -66,14 +68,12 @@ import android.widget.AdapterView.OnItemSelectedListener; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.ListView; -import android.widget.RadioButton; import android.widget.Spinner; import android.widget.TextView; public class MenuFragment extends Fragment implements LoaderCallbacks<Bundle>, AccountsInterface { private static final String TAG = MenuFragment.class.getSimpleName(); - public static final String ARG_SECTION_NUMBER = "section_number"; MenuAdapter mAdapter; String[] mProjection = new String[] { Profile._ID, Profile.DISPLAY_NAME_PRIMARY, Profile.LOOKUP_KEY, Profile.PHOTO_URI }; @@ -108,8 +108,8 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<Bundle>, A mCallbacks.getService().registerAllAccounts(); } catch (RemoteException e) { e.printStackTrace(); - } catch (Exception e1){ - + } catch (Exception e1) { + } getLoaderManager().initLoader(LoaderConstants.ACCOUNTS_LOADER, null, this); @@ -179,9 +179,6 @@ public class MenuFragment extends Fragment implements LoaderCallbacks<Bundle>, A @Override public void onItemSelected(AdapterView<?> arg0, View view, int pos, long arg3) { - if (null != view) { - ((RadioButton) view.findViewById(R.id.account_checked)).toggle(); - } mAccountAdapter.setSelectedAccount(pos); try { mCallbacks.getService().setAccountOrder(mAccountAdapter.getAccountOrder()); -- GitLab