Remove/add assets

Main and dialer view in progress
This commit is contained in:
Margaux Clerc 2015-07-27 16:26:26 +02:00
parent cbd7e4805d
commit f9f9f7ddd5
45 changed files with 633 additions and 613 deletions

View file

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/add_call_more_over" />
<item android:state_enabled="false"
android:drawable="@drawable/add_call_more_disable" />
<item <item
android:drawable="@drawable/add_call_more_default" /> android:drawable="@drawable/call_add" />
</selector> </selector>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true"
android:drawable="@drawable/add_contact_over" /> android:drawable="@drawable/contact_add" />
<item android:state_enabled="false" <item android:state_enabled="false"
android:drawable="@drawable/add_contact_disabled" /> android:drawable="@drawable/contact_add" />
<item <item
android:drawable="@drawable/add_contact_default" /> android:drawable="@drawable/contact_add" />
</selector> </selector>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="@color/button_addContactGrey" /> <item android:state_pressed="true" android:drawable="@color/button_addContactGrey" />
<item android:color="@color/button_addContact"/> <item android:drawable="@color/button_addContact"/>
</selector> </selector>

View file

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true"
android:drawable="@drawable/call_over" /> android:drawable="@color/call_selected" />
<item android:state_enabled="false"
android:drawable="@color/call_selected" />
<item <item
android:drawable="@drawable/call_default" /> android:drawable="@color/footer_select" />
</selector> </selector>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true"
android:drawable="@drawable/chat_over" /> android:drawable="@color/footer_select" />
<item android:state_selected="true" <item android:state_selected="true"
android:drawable="@drawable/chat_selected" /> android:drawable="@color/footer_button" />
<item <item
android:drawable="@drawable/chat_default" /> android:drawable="@color/footer_button" />
</selector> </selector>

View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/chat_photo_over" />
<item android:state_enabled="false" <item android:state_enabled="false"
android:drawable="@drawable/chat_photo_disabled" /> android:drawable="@drawable/chat_photo_disabled" />
<item <item

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" <item android:state_enabled="true"
android:drawable="@drawable/contacts_all_default" /> android:drawable="@drawable/contacts_all_selected" />
<item android:state_enabled="false" <item android:state_enabled="false"
android:drawable="@drawable/contacts_all_selected" /> android:drawable="@drawable/contacts_all_selected" />
</selector> </selector>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" <item android:state_enabled="true"
android:drawable="@drawable/contacts_linphone_default" /> android:drawable="@drawable/contacts_sip_selected" />
<item android:state_enabled="false" <item android:state_enabled="false"
android:drawable="@drawable/contacts_linphone_selected" /> android:drawable="@drawable/contacts_sip_default" />
</selector> </selector>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true"
android:drawable="@drawable/dialer_over" /> android:drawable="@color/footer_select" />
<item android:state_selected="true" <item android:state_selected="true"
android:drawable="@drawable/dialer_selected" /> android:drawable="@color/footer_button" />
<item <item
android:drawable="@drawable/dialer_default" /> android:drawable="@color/footer_button" />
</selector> </selector>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@color/footer_select" />
<item android:state_selected="true"
android:drawable="@color/footer_button" />
<item
android:drawable="@color/footer_button" />
</selector>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true"
android:drawable="@drawable/list_detail_over" /> android:drawable="@drawable/list_details_over" />
<item <item
android:drawable="@drawable/list_detail_default" /> android:drawable="@drawable/list_details_default" />
</selector> </selector>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true"
android:drawable="@drawable/numpad_eight_over" /> android:drawable="@drawable/numpad_8" />
<item <item
android:drawable="@drawable/numpad_eight_default" /> android:drawable="@drawable/numpad_8" />
</selector> </selector>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true"
android:drawable="@drawable/switch_camera_over" /> android:drawable="@drawable/camera_switch_over" />
<item <item
android:drawable="@drawable/switch_camera_default" /> android:drawable="@drawable/camera_switch_default" />
</selector> </selector>

View file

@ -125,8 +125,6 @@
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/dialer" /> android:src="@drawable/dialer" />
<include layout="@layout/menu_about_chat_button" />
<RelativeLayout <RelativeLayout
android:id="@+id/completeChat" android:id="@+id/completeChat"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -150,8 +148,6 @@
<include layout="@layout/menu_settings_button" /> <include layout="@layout/menu_settings_button" />
<include layout="@layout/menu_about_settings_button" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout

View file

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/about_chat"
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="0.2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_about"
android:scaleType="fitXY"
android:src="@drawable/about_chat" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignBottom="@id/image"
android:paddingBottom="5dp"
android:textColor="@drawable/text_color"
android:text="@string/button_about"
android:textSize="12sp" />
</RelativeLayout>

View file

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/about_settings"
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="0.2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_about"
android:scaleType="fitXY"
android:src="@drawable/about_settings" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignBottom="@id/image"
android:paddingBottom="5dp"
android:textColor="@drawable/text_color"
android:text="@string/button_about"
android:textSize="12sp" />
</RelativeLayout>

View file

@ -70,7 +70,7 @@
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/content_description_add_contact" android:contentDescription="@string/content_description_add_contact"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/add_contact" /> android:src="@drawable/add_contact_button" />
<org.linphone.ui.CallButton <org.linphone.ui.CallButton
android:id="@+id/Call" android:id="@+id/Call"

View file

@ -150,7 +150,6 @@
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/dialer" /> android:src="@drawable/dialer" />
<include layout="@layout/menu_about_chat_button" />
<RelativeLayout <RelativeLayout
android:id="@+id/completeChat" android:id="@+id/completeChat"
@ -175,7 +174,6 @@
<include layout="@layout/menu_settings_button" /> <include layout="@layout/menu_settings_button" />
<include layout="@layout/menu_about_settings_button" />
</LinearLayout> </LinearLayout>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/about_chat"
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="0.2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_about"
android:scaleType="fitXY"
android:src="@drawable/about_chat" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="@drawable/text_color"
android:text="@string/button_about"
android:textSize="18dp" />
</RelativeLayout>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/about_settings"
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="0.2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_about"
android:scaleType="fitXY"
android:src="@drawable/about_settings" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="@drawable/text_color"
android:text="@string/button_about"
android:textSize="18dp" />
</RelativeLayout>

View file

@ -147,7 +147,6 @@
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/dialer" /> android:src="@drawable/dialer" />
<include layout="@layout/menu_about_chat_button" />
<RelativeLayout <RelativeLayout
android:id="@+id/completeChat" android:id="@+id/completeChat"
@ -172,7 +171,6 @@
<include layout="@layout/menu_settings_button" /> <include layout="@layout/menu_settings_button" />
<include layout="@layout/menu_about_settings_button" />
</LinearLayout> </LinearLayout>

View file

@ -2,67 +2,89 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/background"> android:background="@color/background">
<RelativeLayout
android:id="@+id/AddressBar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_alignParentTop="true">
<org.linphone.ui.EraseButton
android:id="@+id/Erase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:paddingRight="10dp"
android:scaleType="fitXY"
android:src="@drawable/backspace" />
<org.linphone.ui.AddressText
android:id="@+id/Address"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:ellipsize="start"
android:background="@color/transparent"
android:inputType="phone"
android:enabled="false"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_toLeftOf="@id/Erase"
android:layout_centerVertical="true" />
</RelativeLayout>
<org.linphone.ui.AddressText
android:id="@+id/Adress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:background="@drawable/dialer_address_background"
android:inputType="textEmailAddress"
android:hint="@string/addressHint"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:layout_gravity="center"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"/>
<LinearLayout <LinearLayout
android:id="@+id/controls" android:id="@+id/controls"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="60dp">
<ImageView <RelativeLayout
android:contentDescription="@string/content_description_add_contact" android:id="@+id/addContact"
android:id="@+id/addContact" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:adjustViewBounds="true" android:background="@drawable/add_contact_button"
android:scaleType="fitXY" android:adjustViewBounds="true">
android:layout_weight="1"
android:src="@drawable/add_contact" /> <ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center"
android:contentDescription="@string/content_description_contacts"
android:src="@drawable/add_contact_button" />
</RelativeLayout>
<org.linphone.ui.CallButton <org.linphone.ui.CallButton
android:contentDescription="@string/content_description_call" android:contentDescription="@string/content_description_call"
android:id="@+id/Call" android:id="@+id/Call"
android:background="@drawable/call"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:scaleType="fitXY" android:scaleType="center"
android:layout_weight="1" android:layout_weight="0.5"
android:src="@drawable/call" /> android:src="@drawable/call_alt_start" />
<org.linphone.ui.EraseButton </LinearLayout>
android:contentDescription="@string/content_description_backspace"
android:id="@+id/Erase"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:layout_weight="1"
android:src="@drawable/backspace" />
</LinearLayout>
<org.linphone.ui.Numpad <org.linphone.ui.Numpad
android:contentDescription="@string/content_description_numpad" android:contentDescription="@string/content_description_numpad"
android:id="@+id/Dialer" android:id="@+id/Dialer"
android:layout_width="match_parent" android:layout_centerInParent="true"
android:layout_height="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/controls" android:layout_above="@id/controls"
android:layout_below="@id/Adress" /> android:layout_below="@id/AddressBar" />
</RelativeLayout> </RelativeLayout>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textColor="@color/text_contrast"
android:background="?android:attr/activatedBackgroundIndicator"
android:minHeight="?android:attr/listPreferredItemHeightSmall"/>

View file

@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/background" android:background="@color/background"
android:orientation="vertical" > android:orientation="vertical" >
<LinearLayout <LinearLayout

View file

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:background="@color/background_splashscreen">
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/splashscreen_logo" android:src="@drawable/splashscreen"
android:scaleType="center"/> android:scaleType="center"/>
<ProgressBar <ProgressBar

View file

@ -1,141 +1,166 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/topLayout" android:id="@+id/topLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<!-- Hack to adjust perfectly on every screen the bottom of the fragment with the curved menu --> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_above="@id/footer">
<include layout="@layout/status" android:id="@+id/status" />
<include layout="@layout/toolbar" android:id="@+id/toolbar" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
</FrameLayout>
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/mark" android:id="@+id/footer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="80dp"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <RelativeLayout
android:contentDescription="@string/content_description_mark" android:id="@+id/history"
android:layout_width="0dp" android:background="@drawable/footer_button"
android:layout_height="wrap_content" android:layout_weight="1"
android:layout_weight="0.2" android:layout_width="0dp"
android:adjustViewBounds="true" android:layout_height="match_parent">
android:scaleType="fitXY"
android:src="@drawable/mark"
android:visibility="invisible" />
<ImageView <ImageView
android:contentDescription="@string/content_description_mark" android:layout_width="match_parent"
android:layout_width="0dp" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:adjustViewBounds="true"
android:layout_weight="0.2" android:layout_margin="10dp"
android:adjustViewBounds="true" android:scaleType="center"
android:scaleType="fitXY" android:contentDescription="@string/content_description_history"
android:src="@drawable/mark" android:src="@drawable/footer_history" />
android:visibility="invisible" />
<ImageView <RelativeLayout
android:contentDescription="@string/content_description_mark" android:visibility="gone"
android:layout_width="0dp" android:id="@+id/history_select"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_weight="0.2" android:layout_height="5dp"
android:adjustViewBounds="true" android:layout_alignParentBottom="true"
android:scaleType="fitXY" android:background="@color/footer_select" />
android:src="@drawable/mark"
android:visibility="invisible" />
<ImageView <TextView
android:contentDescription="@string/content_description_mark" android:id="@+id/missedCalls"
android:layout_width="0dp" android:layout_width="25dp"
android:layout_height="wrap_content" android:layout_height="25dp"
android:layout_weight="0.2" android:layout_alignParentRight="true"
android:adjustViewBounds="true" android:layout_alignParentTop="true"
android:scaleType="fitXY" android:background="@drawable/missed_calls_bg"
android:src="@drawable/mark" android:gravity="center"
android:visibility="invisible" /> android:textSize="20sp"
android:visibility="gone" />
<ImageView </RelativeLayout>
android:contentDescription="@string/content_description_mark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/mark"
android:visibility="invisible" />
</LinearLayout> <RelativeLayout
android:id="@+id/contacts"
<FrameLayout android:background="@drawable/footer_button"
android:layout_width="match_parent" android:layout_weight="1"
android:layout_height="match_parent" android:layout_width="0dp"
android:layout_above="@id/mark" android:layout_height="match_parent"
android:layout_alignParentTop="true">
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingTop="40dp" />
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/status" />
</FrameLayout>
<LinearLayout
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"> android:adjustViewBounds="true">
<include layout="@layout/menu_history_button" /> <ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center"
android:layout_margin="10dp"
android:contentDescription="@string/content_description_contacts"
android:src="@drawable/footer_contacts" />
<TextView <RelativeLayout
android:id="@+id/missedCalls" android:visibility="gone"
android:layout_width="25dp" android:id="@+id/contacts_select"
android:layout_height="25dp" android:layout_width="match_parent"
android:layout_alignParentRight="true" android:layout_height="5dp"
android:layout_alignParentTop="true" android:layout_alignParentBottom="true"
android:background="@drawable/missed_calls_bg" android:contentDescription="@string/content_description_contacts"
android:gravity="center" android:background="@color/footer_select" />
android:textSize="20sp" </RelativeLayout>
android:visibility="gone" />
</RelativeLayout>
<include layout="@layout/menu_contact_button" />
<ImageView <RelativeLayout
android:id="@+id/dialer" android:id="@+id/dialer"
android:layout_width="0dp" android:background="@drawable/footer_button"
android:layout_height="wrap_content" android:layout_weight="1"
android:layout_weight="1" android:layout_width="0dp"
android:adjustViewBounds="true" android:layout_height="match_parent"
android:scaleType="fitCenter"
android:contentDescription="@string/content_description_dialer"
android:src="@drawable/dialer" />
<include layout="@layout/menu_about_chat_button" />
<RelativeLayout
android:id="@+id/completeChat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true"> android:adjustViewBounds="true">
<include layout="@layout/menu_chat_button" /> <ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center"
android:layout_margin="10dp"
android:contentDescription="@string/content_description_contacts"
android:src="@drawable/footer_dialer" />
<RelativeLayout
android:id="@+id/dialer_select"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:contentDescription="@string/content_description_contacts"
android:background="@color/footer_select" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/chat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/footer_button"
android:adjustViewBounds="true">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center"
android:contentDescription="@string/content_description_contacts"
android:src="@drawable/footer_chat" />
<RelativeLayout
android:visibility="gone"
android:id="@+id/chat_select"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:contentDescription="@string/content_description_contacts"
android:background="@color/footer_select" />
<TextView <TextView
android:id="@+id/missedChats" android:id="@+id/missedChats"
@ -150,10 +175,6 @@
</RelativeLayout> </RelativeLayout>
<include layout="@layout/menu_settings_button" />
<include layout="@layout/menu_about_settings_button" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
@ -166,3 +187,15 @@
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
<!-- The navigation drawer -->
<ListView android:id="@+id/left_drawer"
android:layout_width="300dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="@color/background"/>
</android.support.v4.widget.DrawerLayout>

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/about_chat"
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_about"
android:scaleType="fitXY"
android:src="@drawable/about_chat" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignBottom="@id/image"
android:paddingBottom="10dp"
android:textColor="@drawable/text_color"
android:text="@string/button_about"
android:textSize="12sp" />
</RelativeLayout>

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/about_settings"
android:visibility="gone"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_about"
android:scaleType="fitXY"
android:src="@drawable/about_settings" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignBottom="@id/image"
android:paddingBottom="10dp"
android:textColor="@drawable/text_color"
android:text="@string/button_about"
android:textSize="12sp" />
</RelativeLayout>

View file

@ -2,8 +2,10 @@
<RelativeLayout <RelativeLayout
android:id="@+id/chat" android:id="@+id/chat"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:background="@color/footer_button"
android:layout_height="wrap_content"> android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent">
<ImageView <ImageView
android:id="@+id/image" android:id="@+id/image"
@ -11,7 +13,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/content_description_chat_button" android:contentDescription="@string/content_description_chat_button"
android:src="@drawable/chat" /> android:src="@drawable/footer_chat" />
<TextView <TextView
android:id="@+id/text" android:id="@+id/text"

View file

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout
android:id="@+id/contacts" android:id="@+id/contacts"
android:background="@color/footer_button"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="1" android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:adjustViewBounds="true"> android:adjustViewBounds="true">
<ImageView <ImageView
@ -12,18 +13,16 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:scaleType="center"
android:contentDescription="@string/content_description_contacts" android:contentDescription="@string/content_description_contacts"
android:src="@drawable/contacts" /> android:src="@drawable/footer_contacts" />
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignBottom="@id/image"
android:paddingBottom="10dp"
android:textColor="@drawable/text_color"
android:text="@string/button_contacts"
android:textSize="12sp" />
<RelativeLayout
android:visibility="gone"
android:id="@+id/select"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_alignParentBottom="true"
android:contentDescription="@string/content_description_contacts"
android:background="@color/footer_select" />
</RelativeLayout> </RelativeLayout>

View file

@ -2,26 +2,28 @@
<RelativeLayout <RelativeLayout
android:id="@+id/history" android:id="@+id/history"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:background="@color/footer_button"
android:layout_height="wrap_content"> android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true">
<ImageView <ImageView
android:id="@+id/image" android:id="@+id/image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:scaleType="center"
android:contentDescription="@string/content_description_history" android:contentDescription="@string/content_description_history"
android:src="@drawable/history" /> android:src="@drawable/footer_history" />
<TextView <RelativeLayout
android:id="@+id/text" android:visibility="gone"
android:layout_width="wrap_content" android:id="@+id/select"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_centerHorizontal="true" android:layout_height="8dp"
android:layout_alignBottom="@id/image" android:layout_alignParentBottom="true"
android:paddingBottom="10dp" android:contentDescription="@string/content_description_contacts"
android:textColor="@drawable/text_color" android:background="@color/footer_select" />
android:text="@string/button_history"
android:textSize="12sp" />
</RelativeLayout> </RelativeLayout>

View file

@ -4,27 +4,27 @@
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1">
<TableRow android:layout_weight="1"> <TableRow android:layout_weight="1">
<org.linphone.ui.Digit android:id="@+id/Digit1" android:text="1" style="@style/DialerDigit" android:background="@drawable/numpad_one" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit1" android:text="1" style="@style/DialerDigit" android:background="@drawable/numpad_one" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/Digit2" android:text="2" style="@style/DialerDigit" android:background="@drawable/numpad_two" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit2" android:text="2" style="@style/DialerDigit" android:background="@drawable/numpad_two" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/Digit3" android:text="3" style="@style/DialerDigit" android:background="@drawable/numpad_three" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit3" android:text="3" style="@style/DialerDigit" android:background="@drawable/numpad_three" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
</TableRow> </TableRow>
<TableRow android:layout_weight="1"> <TableRow android:layout_weight="1">
<org.linphone.ui.Digit android:id="@+id/Digit4" android:text="4" style="@style/DialerDigit" android:background="@drawable/numpad_four" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit4" android:text="4" style="@style/DialerDigit" android:background="@drawable/numpad_four" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/Digit5" android:text="5" style="@style/DialerDigit" android:background="@drawable/numpad_five" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit5" android:text="5" style="@style/DialerDigit" android:background="@drawable/numpad_five" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/Digit6" android:text="6" style="@style/DialerDigit" android:background="@drawable/numpad_six" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit6" android:text="6" style="@style/DialerDigit" android:background="@drawable/numpad_six" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
</TableRow> </TableRow>
<TableRow android:layout_weight="1"> <TableRow android:layout_weight="1">
<org.linphone.ui.Digit android:id="@+id/Digit7" android:text="7" style="@style/DialerDigit" android:background="@drawable/numpad_seven" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit7" android:text="7" style="@style/DialerDigit" android:background="@drawable/numpad_seven" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/Digit8" android:text="8" style="@style/DialerDigit" android:background="@drawable/numpad_eight" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit8" android:text="8" style="@style/DialerDigit" android:background="@drawable/numpad_eight" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/Digit9" android:text="9" style="@style/DialerDigit" android:background="@drawable/numpad_nine" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit9" android:text="9" style="@style/DialerDigit" android:background="@drawable/numpad_nine" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
</TableRow> </TableRow>
<TableRow android:layout_weight="1"> <TableRow android:layout_weight="1">
<org.linphone.ui.Digit android:id="@+id/DigitStar" android:text="*" style="@style/DialerDigit" android:background="@drawable/numpad_star" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/DigitStar" android:text="*" style="@style/DialerDigit" android:background="@drawable/numpad_star" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/Digit00" android:text="0+" style="@style/DialerDigit" android:background="@drawable/numpad_zero" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/Digit00" android:text="0+" style="@style/DialerDigit" android:background="@drawable/numpad_zero" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
<org.linphone.ui.Digit android:id="@+id/DigitHash" android:text="#" style="@style/DialerDigit" android:background="@drawable/numpad_sharp" android:soundEffectsEnabled="true" /> <org.linphone.ui.Digit android:id="@+id/DigitHash" android:text="#" style="@style/DialerDigit" android:background="@drawable/numpad_sharp" android:soundEffectsEnabled="true" android:layout_margin="10dp"/>
</TableRow> </TableRow>
</TableLayout> </TableLayout>

View file

@ -105,7 +105,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:contentDescription="@string/content_description_validate" android:contentDescription="@string/content_description_validate"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_apply" android:text="@string/setup_apply"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>

View file

@ -85,7 +85,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:contentDescription="@string/content_description_validate" android:contentDescription="@string/content_description_validate"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_apply" android:text="@string/setup_apply"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>

View file

@ -36,7 +36,7 @@
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textAllCaps="true" android:textAllCaps="true"
android:contentDescription="@string/setup_create_account" android:contentDescription="@string/setup_create_account"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_create_account"/> android:text="@string/setup_create_account"/>
</RelativeLayout> </RelativeLayout>
@ -55,7 +55,7 @@
android:textAllCaps="true" android:textAllCaps="true"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:contentDescription="@string/setup_login_linphone" android:contentDescription="@string/setup_login_linphone"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_login_linphone"/> android:text="@string/setup_login_linphone"/>
</RelativeLayout> </RelativeLayout>
@ -74,7 +74,7 @@
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textAllCaps="true" android:textAllCaps="true"
android:contentDescription="@string/setup_login_generic" android:contentDescription="@string/setup_login_generic"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_login_generic"/> android:text="@string/setup_login_generic"/>
</RelativeLayout> </RelativeLayout>
@ -93,7 +93,7 @@
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textAllCaps="true" android:textAllCaps="true"
android:contentDescription="@string/setup_remote_provisioning" android:contentDescription="@string/setup_remote_provisioning"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_remote_provisioning"/> android:text="@string/setup_remote_provisioning"/>
</RelativeLayout> </RelativeLayout>

View file

@ -62,7 +62,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:contentDescription="@string/content_description_validate" android:contentDescription="@string/content_description_validate"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_apply" android:text="@string/setup_apply"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>

View file

@ -200,7 +200,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:contentDescription="@string/content_description_validate" android:contentDescription="@string/content_description_validate"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_create" android:text="@string/setup_create"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>

View file

@ -40,7 +40,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:contentDescription="@string/setup_check_account_validation" android:contentDescription="@string/setup_check_account_validation"
android:background="@drawable/resizable_assistant_button_2" android:background="@drawable/resizable_assistant_button"
android:text="@string/setup_create" android:text="@string/setup_create"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>

View file

@ -1,25 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout
xmlns:linphone="http://schemas.android.com/apk/res-auto" android:id="@+id/statusBar"
android:background="@color/footer_select"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="50dp"
android:orientation="vertical"> android:orientation="horizontal">
<org.linphone.ui.SlidingDrawer
android:id="@+id/statusBar" <RelativeLayout
linphone:direction="topToBottom" android:id="@+id/content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
linphone:handle="@+id/handle"
linphone:content="@+id/content">
<RelativeLayout
android:id="@id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableLayout
<!-- <TableLayout
android:id="@+id/callStats" android:id="@+id/callStats"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -165,42 +161,39 @@
</TableRow> </TableRow>
</TableLayout> </TableLayout> -->
<ListView </RelativeLayout>
android:id="@+id/accounts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stackFromBottom="true"
android:paddingBottom="10dp"
android:background="@android:color/black"/>
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@id/handle" android:id="@+id/handle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="match_parent">
android:layout_marginBottom="10dp">
<ImageView <ImageView
android:id="@+id/background" android:id="@+id/menu_bar"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:scaleType="fitXY" android:scaleType="center"
android:src="@drawable/statebar_background"/> android:src="@drawable/menu"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"/>
<ImageView <ImageView
android:contentDescription="@string/content_description_led" android:contentDescription="@string/content_description_led"
android:id="@+id/statusLed" android:id="@+id/statusLed"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:src="@drawable/led_disconnected" android:src="@drawable/led_disconnected"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:layout_centerVertical="true" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="match_parent"
android:layout_height="match_parent" /> android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/menu_bar"
android:layout_toEndOf="@+id/menu_bar"/>
<TextView <TextView
android:id="@+id/statusText" android:id="@+id/statusText"
android:text="@string/status_not_connected" android:text="@string/status_not_connected"
android:textColor="@android:color/white" android:textColor="@android:color/white"
@ -256,17 +249,11 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:visibility="gone" /> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
</org.linphone.ui.SlidingDrawer>
<ImageView <ImageView
android:contentDescription="@string/content_description_encryption" android:contentDescription="@string/content_description_encryption"
android:id="@+id/encryption" android:id="@+id/encryption"
android:paddingRight="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"

50
res/layout/toolbar.xml Normal file
View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:background="@color/button_addContact"
android:layout_width="match_parent"
android:layout_height="60dp">
<RelativeLayout
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:contentDescription="@string/content_description_back"
android:src="@drawable/back" />
</RelativeLayout>
<TextView
android:id="@+id/toolbar_text"
android:text="@string/setup_title"
android:textColor="@color/footer_select"
android:textSize="28sp"
android:textAllCaps="true"
android:textStyle="bold"
android:paddingLeft="10dp"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"/>
<RelativeLayout
android:id="@+id/dialer"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:contentDescription="@string/content_description_dialer"
android:src="@drawable/dialer_back" />
</RelativeLayout>
</RelativeLayout>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="DialerDigit" parent="@android:style/TextAppearance.Medium"> <style name="DialerDigit" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">fill_parent</item> <item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">fill_parent</item> <item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@android:color/transparent</item> <item name="android:textColor">@android:color/transparent</item>
<item name="android:textSize">20sp</item> <item name="android:textSize">20sp</item>
<item name="android:layout_weight">1</item> <item name="android:layout_weight">1</item>

View file

@ -22,6 +22,12 @@
<item>always</item> <item>always</item>
<item>auto</item> <item>auto</item>
</string-array> </string-array>
<string-array name="params">
<item>name</item>
<item>about</item>
<item>lala</item>
<item>exit</item>
</string-array>
<string name="incall_notif_active">Audio call ongoing</string> <string name="incall_notif_active">Audio call ongoing</string>
<string name="incall_notif_paused">Paused call ongoing</string> <string name="incall_notif_paused">Paused call ongoing</string>
<string name="incall_notif_video">Video capturing call ongoing</string> <string name="incall_notif_video">Video capturing call ongoing</string>

View file

@ -33,6 +33,7 @@ import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RelativeLayout;
/** /**
* @author Sylvain Berfini * @author Sylvain Berfini
@ -44,7 +45,7 @@ public class DialerFragment extends Fragment {
public boolean mVisible; public boolean mVisible;
private AddressText mAddress; private AddressText mAddress;
private CallButton mCall; private CallButton mCall;
private ImageView mAddContact; private RelativeLayout mAddContact;
private OnClickListener addContactListener, cancelListener, transferListener; private OnClickListener addContactListener, cancelListener, transferListener;
private boolean shouldEmptyAddressField = true; private boolean shouldEmptyAddressField = true;
@ -54,7 +55,7 @@ public class DialerFragment extends Fragment {
instance = this; instance = this;
View view = inflater.inflate(R.layout.dialer, container, false); View view = inflater.inflate(R.layout.dialer, container, false);
mAddress = (AddressText) view.findViewById(R.id.Adress); mAddress = (AddressText) view.findViewById(R.id.Address);
mAddress.setDialerFragment(this); mAddress.setDialerFragment(this);
EraseButton erase = (EraseButton) view.findViewById(R.id.Erase); EraseButton erase = (EraseButton) view.findViewById(R.id.Erase);
@ -69,7 +70,7 @@ public class DialerFragment extends Fragment {
mCall.setImageResource(R.drawable.add_call); mCall.setImageResource(R.drawable.add_call);
} }
} else { } else {
mCall.setImageResource(R.drawable.call); mCall.setImageResource(R.drawable.call_audio_start);
} }
AddressAware numpad = (AddressAware) view.findViewById(R.id.Dialer); AddressAware numpad = (AddressAware) view.findViewById(R.id.Dialer);
@ -77,7 +78,7 @@ public class DialerFragment extends Fragment {
numpad.setAddressWidget(mAddress); numpad.setAddressWidget(mAddress);
} }
mAddContact = (ImageView) view.findViewById(R.id.addContact); mAddContact = (RelativeLayout) view.findViewById(R.id.addContact);
addContactListener = new OnClickListener() { addContactListener = new OnClickListener() {
@Override @Override
@ -165,12 +166,13 @@ public class DialerFragment extends Fragment {
mCall.resetClickListener(); mCall.resetClickListener();
} }
mAddContact.setEnabled(true); mAddContact.setEnabled(true);
mAddContact.setImageResource(R.drawable.cancel); //mAddContact.setImageResource(R.drawable.cancel);
mAddContact.setOnClickListener(cancelListener); mAddContact.setOnClickListener(cancelListener);
} else { } else {
mCall.setImageResource(R.drawable.call); mCall.setImageResource(R.drawable.call_audio_start);
//mCall.setAlpha(30);
mAddContact.setEnabled(true); mAddContact.setEnabled(true);
mAddContact.setImageResource(R.drawable.add_contact); //mAddContact.setImageResource(R.drawable.add_contact_button);
mAddContact.setOnClickListener(addContactListener); mAddContact.setOnClickListener(addContactListener);
enableDisableAddContact(); enableDisableAddContact();
} }

View file

@ -53,16 +53,24 @@ import android.app.Activity;
import android.app.Fragment; import android.app.Fragment;
import android.app.FragmentManager; import android.app.FragmentManager;
import android.app.FragmentTransaction; import android.app.FragmentTransaction;
import android.app.SearchManager;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
import android.view.Gravity; import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.OrientationEventListener; import android.view.OrientationEventListener;
import android.view.Surface; import android.view.Surface;
import android.view.View; import android.view.View;
@ -71,11 +79,17 @@ import android.view.ViewGroup;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.BaseExpandableListAdapter;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat;
/** /**
* @author Sylvain Berfini * @author Sylvain Berfini
@ -90,11 +104,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private static LinphoneActivity instance; private static LinphoneActivity instance;
private StatusFragment statusFragment; //private StatusFragment statusFragment;
private TextView missedCalls, missedChats; private TextView missedCalls, missedChats;
private ImageView dialer;
private LinearLayout menu, mark; private LinearLayout menu, mark;
private RelativeLayout contacts, history, settings, chat, aboutChat, aboutSettings; private RelativeLayout contacts, history, dialer, chat;
private RelativeLayout contacts_selected, history_selected, dialer_selected, chat_selected;
private FragmentsAvailable currentFragment, nextFragment; private FragmentsAvailable currentFragment, nextFragment;
private List<FragmentsAvailable> fragmentsHistory; private List<FragmentsAvailable> fragmentsHistory;
private Fragment dialerFragment, messageListFragment, friendStatusListenerFragment; private Fragment dialerFragment, messageListFragment, friendStatusListenerFragment;
@ -103,6 +117,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private boolean isAnimationDisabled = false, preferLinphoneContacts = false; private boolean isAnimationDisabled = false, preferLinphoneContacts = false;
private OrientationEventListener mOrientationHelper; private OrientationEventListener mOrientationHelper;
private LinphoneCoreListenerBase mListener; private LinphoneCoreListenerBase mListener;
private String[] mParams;
private String mTitle;
private ListView mDrawerList;
private DrawerLayout mDrawerLayout;
private ActionBarDrawerToggle mDrawerToggle;
static final boolean isInstanciated() { static final boolean isInstanciated() {
return instance != null; return instance != null;
@ -160,6 +179,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
setContentView(R.layout.main); setContentView(R.layout.main);
instance = this; instance = this;
fragmentsHistory = new ArrayList<FragmentsAvailable>(); fragmentsHistory = new ArrayList<FragmentsAvailable>();
createDrawer();
initButtons(); initButtons();
currentFragment = nextFragment = FragmentsAvailable.DIALER; currentFragment = nextFragment = FragmentsAvailable.DIALER;
@ -255,6 +277,129 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
updateAnimationsState(); updateAnimationsState();
} }
public void createDrawer() {
mTitle = "lala";
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mParams = getResources().getStringArray(R.array.params);
mDrawerList = (ListView) findViewById(R.id.left_drawer);
// set a custom shadow that overlays the main content when the drawer opens
//mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
// set up the drawer's list view with items and click listener
mDrawerList.setAdapter(new ArrayAdapter<String>(this,
R.layout.drawer_list_item, mParams));
mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
// enable ActionBar app icon to behave as action to toggle nav drawer
//getActionBar().setDisplayHomeAsUpEnabled(true);
//getActionBar().setHomeButtonEnabled(true);
// ActionBarDrawerToggle ties together the the proper interactions
// between the sliding drawer and the action bar app icon
mDrawerToggle = new ActionBarDrawerToggle(
this, /* host Activity */
mDrawerLayout, /* DrawerLayout object */
R.drawable.menu, /* nav drawer image to replace 'Up' caret */
R.string.menu_about, /* "open drawer" description for accessibility */
R.string.menu_exit /* "close drawer" description for accessibility */
) {
public void onDrawerClosed(View view) {
//getActionBar().setTitle(mTitle);
//invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
}
public void onDrawerOpened(View drawerView) {
//getActionBar().setTitle(mTitle);
//invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
}
};
mDrawerLayout.setDrawerListener(mDrawerToggle);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
return super.onCreateOptionsMenu(menu);
}
/* Called whenever we call invalidateOptionsMenu() */
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
// If the nav drawer is open, hide action items related to the content view
boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);
menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);
return super.onPrepareOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// The action bar home/up action should open or close the drawer.
// ActionBarDrawerToggle will take care of this.
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
// Handle action buttons
switch(item.getItemId()) {
case R.id.action_websearch:
return true;
default:
return super.onOptionsItemSelected(item);
}
}
/* The click listner for ListView in the navigation drawer */
private class DrawerItemClickListener implements ListView.OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
selectItem(position);
}
}
private void selectItem(int position) {
// update the main content by replacing fragments
/*Fragment fragment = new PlanetFragment();
Bundle args = new Bundle();
args.putInt(PlanetFragment.ARG_PLANET_NUMBER, position);
fragment.setArguments(args);
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();
// update selected item and title, then close the drawer
mDrawerList.setItemChecked(position, true);
setTitle(mPlanetTitles[position]);*/
mDrawerLayout.closeDrawer(mDrawerList);
}
@Override
public void setTitle(CharSequence title) {
mTitle = (String) title;
//getActionBar().setTitle(mTitle);
}
/**
* When using the ActionBarDrawerToggle, you must call it during
* onPostCreate() and onConfigurationChanged()...
*/
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
// Sync the toggle state after onRestoreInstanceState has occurred.
mDrawerToggle.syncState();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// Pass any configuration change to the drawer toggls
mDrawerToggle.onConfigurationChanged(newConfig);
}
private void initButtons() { private void initButtons() {
menu = (LinearLayout) findViewById(R.id.menu); menu = (LinearLayout) findViewById(R.id.menu);
@ -264,27 +409,24 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
history.setOnClickListener(this); history.setOnClickListener(this);
contacts = (RelativeLayout) findViewById(R.id.contacts); contacts = (RelativeLayout) findViewById(R.id.contacts);
contacts.setOnClickListener(this); contacts.setOnClickListener(this);
dialer = (ImageView) findViewById(R.id.dialer); dialer = (RelativeLayout) findViewById(R.id.dialer);
dialer.setOnClickListener(this); dialer.setOnClickListener(this);
settings = (RelativeLayout) findViewById(R.id.settings);
settings.setOnClickListener(this);
chat = (RelativeLayout) findViewById(R.id.chat); chat = (RelativeLayout) findViewById(R.id.chat);
chat.setOnClickListener(this); chat.setOnClickListener(this);
aboutChat = (RelativeLayout) findViewById(R.id.about_chat);
aboutSettings = (RelativeLayout) findViewById(R.id.about_settings); history_selected = (RelativeLayout) findViewById(R.id.history_select);
contacts_selected = (RelativeLayout) findViewById(R.id.contacts_select);
dialer_selected = (RelativeLayout) findViewById(R.id.dialer_select);
chat_selected = (RelativeLayout) findViewById(R.id.chat_select);
if (getResources().getBoolean(R.bool.replace_chat_by_about)) { if (getResources().getBoolean(R.bool.replace_chat_by_about)) {
chat.setVisibility(View.GONE); chat.setVisibility(View.GONE);
chat.setOnClickListener(null); chat.setOnClickListener(null);
findViewById(R.id.completeChat).setVisibility(View.GONE); findViewById(R.id.completeChat).setVisibility(View.GONE);
aboutChat.setVisibility(View.VISIBLE);
aboutChat.setOnClickListener(this);
} }
if (getResources().getBoolean(R.bool.replace_settings_by_about)) { if (getResources().getBoolean(R.bool.replace_settings_by_about)) {
settings.setVisibility(View.GONE); //settings.setVisibility(View.GONE);
settings.setOnClickListener(null); //settings.setOnClickListener(null);
aboutSettings.setVisibility(View.VISIBLE);
aboutSettings.setOnClickListener(this);
} }
missedCalls = (TextView) findViewById(R.id.missedCalls); missedCalls = (TextView) findViewById(R.id.missedCalls);
@ -300,7 +442,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
return; return;
} }
findViewById(R.id.status).setVisibility(View.GONE); //findViewById(R.id.status).setVisibility(View.GONE);
findViewById(R.id.fragmentContainer).setPadding(0, 0, 0, 0); findViewById(R.id.fragmentContainer).setPadding(0, 0, 0, 0);
} }
@ -309,12 +451,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
return; return;
} }
if (statusFragment != null && !statusFragment.isVisible()) { /*if (statusFragment != null && !statusFragment.isVisible()) {
// Hack to ensure statusFragment is visible after coming back to // Hack to ensure statusFragment is visible after coming back to
// dialer from chat // dialer from chat
statusFragment.getView().setVisibility(View.VISIBLE); statusFragment.getView().setVisibility(View.VISIBLE);
} }*/
findViewById(R.id.status).setVisibility(View.VISIBLE); //findViewById(R.id.status).setVisibility(View.VISIBLE);
findViewById(R.id.fragmentContainer).setPadding(0, LinphoneUtils.pixelsToDpi(getResources(), 40), 0, 0); findViewById(R.id.fragmentContainer).setPadding(0, LinphoneUtils.pixelsToDpi(getResources(), 40), 0, 0);
} }
@ -415,9 +557,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
} }
private void changeFragment(Fragment newFragment, FragmentsAvailable newFragmentType, boolean withoutAnimation) { private void changeFragment(Fragment newFragment, FragmentsAvailable newFragmentType, boolean withoutAnimation) {
if (statusFragment != null) { /*if (statusFragment != null) {
statusFragment.closeStatusBar(); statusFragment.closeStatusBar();
} }*/
FragmentTransaction transaction = getFragmentManager().beginTransaction(); FragmentTransaction transaction = getFragmentManager().beginTransaction();
@ -458,9 +600,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
// hideStatusBar(); // hideStatusBar();
// } // }
// } // }
if (statusFragment != null) { /*if (statusFragment != null) {
statusFragment.closeStatusBar(); statusFragment.closeStatusBar();
} }*/
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2); LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
@ -599,7 +741,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
public void displayAbout() { public void displayAbout() {
changeCurrentFragment(FragmentsAvailable.ABOUT, null); changeCurrentFragment(FragmentsAvailable.ABOUT, null);
settings.setSelected(true); //settings.setSelected(true);
} }
public boolean displayChatMessageNotification(String address){ public boolean displayChatMessageNotification(String address){
@ -680,42 +822,26 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
if (id == R.id.history) { if (id == R.id.history) {
changeCurrentFragment(FragmentsAvailable.HISTORY, null); changeCurrentFragment(FragmentsAvailable.HISTORY, null);
history.setSelected(true); history_selected.setVisibility(View.VISIBLE);
LinphoneManager.getLc().resetMissedCallsCount(); LinphoneManager.getLc().resetMissedCallsCount();
displayMissedCalls(0); displayMissedCalls(0);
} else if (id == R.id.contacts) { } else if (id == R.id.contacts) {
changeCurrentFragment(FragmentsAvailable.CONTACTS, null); changeCurrentFragment(FragmentsAvailable.CONTACTS, null);
contacts.setSelected(true); contacts_selected.setVisibility(View.VISIBLE);
} else if (id == R.id.dialer) { } else if (id == R.id.dialer) {
changeCurrentFragment(FragmentsAvailable.DIALER, null); changeCurrentFragment(FragmentsAvailable.DIALER, null);
dialer.setSelected(true); dialer_selected.setVisibility(View.VISIBLE);
} else if (id == R.id.settings) {
changeCurrentFragment(FragmentsAvailable.SETTINGS, null);
settings.setSelected(true);
} else if (id == R.id.about_chat) {
Bundle b = new Bundle();
b.putSerializable("About", FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT);
changeCurrentFragment(FragmentsAvailable.ABOUT_INSTEAD_OF_CHAT, b);
aboutChat.setSelected(true);
} else if (id == R.id.about_settings) {
Bundle b = new Bundle();
b.putSerializable("About", FragmentsAvailable.ABOUT_INSTEAD_OF_SETTINGS);
changeCurrentFragment(FragmentsAvailable.ABOUT_INSTEAD_OF_SETTINGS, b);
aboutSettings.setSelected(true);
} else if (id == R.id.chat) { } else if (id == R.id.chat) {
changeCurrentFragment(FragmentsAvailable.CHATLIST, null); changeCurrentFragment(FragmentsAvailable.CHATLIST, null);
chat.setSelected(true); chat_selected.setVisibility(View.VISIBLE);
} }
} }
private void resetSelection() { private void resetSelection() {
history.setSelected(false); history_selected.setVisibility(View.GONE);
contacts.setSelected(false); contacts_selected.setVisibility(View.GONE);
dialer.setSelected(false); dialer_selected.setVisibility(View.GONE);
settings.setSelected(false); chat_selected.setVisibility(View.GONE);
chat.setSelected(false);
aboutChat.setSelected(false);
aboutSettings.setSelected(false);
} }
@SuppressWarnings("incomplete-switch") @SuppressWarnings("incomplete-switch")
@ -726,29 +852,27 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
switch (menuToSelect) { switch (menuToSelect) {
case HISTORY: case HISTORY:
case HISTORY_DETAIL: case HISTORY_DETAIL:
history.setSelected(true); history_selected.setVisibility(View.VISIBLE);
break; break;
case CONTACTS: case CONTACTS:
case CONTACT: case CONTACT:
case EDIT_CONTACT: case EDIT_CONTACT:
contacts.setSelected(true); contacts_selected.setVisibility(View.VISIBLE);
break; break;
case DIALER: case DIALER:
dialer.setSelected(true); dialer_selected.setVisibility(View.VISIBLE);
break; break;
case SETTINGS: case SETTINGS:
case ACCOUNT_SETTINGS: case ACCOUNT_SETTINGS:
settings.setSelected(true); //settings.setSelected(true);
break; break;
case ABOUT_INSTEAD_OF_CHAT: case ABOUT_INSTEAD_OF_CHAT:
aboutChat.setSelected(true);
break; break;
case ABOUT_INSTEAD_OF_SETTINGS: case ABOUT_INSTEAD_OF_SETTINGS:
aboutSettings.setSelected(true);
break; break;
case CHATLIST: case CHATLIST:
case CHAT: case CHAT:
chat.setSelected(true); chat_selected.setVisibility(View.VISIBLE);
break; break;
} }
} }
@ -773,12 +897,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
} }
public void updateStatusFragment(StatusFragment fragment) { public void updateStatusFragment(StatusFragment fragment) {
statusFragment = fragment; //statusFragment = fragment;
} }
public void displaySettings() { public void displaySettings() {
changeCurrentFragment(FragmentsAvailable.SETTINGS, null); changeCurrentFragment(FragmentsAvailable.SETTINGS, null);
settings.setSelected(true); //settings.setSelected(true);
} }
public void applyConfigChangesIfNeeded() { public void applyConfigChangesIfNeeded() {
@ -791,11 +915,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putInt("Account", accountNumber); bundle.putInt("Account", accountNumber);
changeCurrentFragment(FragmentsAvailable.ACCOUNT_SETTINGS, bundle); changeCurrentFragment(FragmentsAvailable.ACCOUNT_SETTINGS, bundle);
settings.setSelected(true); //settings.setSelected(true);
} }
public StatusFragment getStatusFragment() { public StatusFragment getStatusFragment() {
return statusFragment; //return statusFragment;
return null;
} }
public List<String> getChatList() { public List<String> getChatList() {
@ -1244,11 +1369,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
} }
} }
} }
} else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) { } /*else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) {
if (event.getRepeatCount() < 1) { if (event.getRepeatCount() < 1) {
statusFragment.openOrCloseStatusBar(true); statusFragment.openOrCloseStatusBar(true);
} }
} }*/
return super.onKeyDown(keyCode, event); return super.onKeyDown(keyCode, event);
} }
} }

View file

@ -63,9 +63,6 @@ public class StatusFragment extends Fragment {
private Handler refreshHandler = new Handler(); private Handler refreshHandler = new Handler();
private TextView statusText, exit, voicemailCount; private TextView statusText, exit, voicemailCount;
private ImageView statusLed, callQuality, encryption, background; private ImageView statusLed, callQuality, encryption, background;
private ListView sliderContentAccounts;
private TableLayout callStats;
private SlidingDrawer drawer;
// private LinearLayout allAccountsLed; // private LinearLayout allAccountsLed;
private Runnable mCallQualityUpdater; private Runnable mCallQualityUpdater;
private boolean isInCall, isAttached = false; private boolean isInCall, isAttached = false;
@ -84,17 +81,6 @@ public class StatusFragment extends Fragment {
encryption = (ImageView) view.findViewById(R.id.encryption); encryption = (ImageView) view.findViewById(R.id.encryption);
background = (ImageView) view.findViewById(R.id.background); background = (ImageView) view.findViewById(R.id.background);
// allAccountsLed = (LinearLayout) view.findViewById(R.id.moreStatusLed); // allAccountsLed = (LinearLayout) view.findViewById(R.id.moreStatusLed);
callStats = (TableLayout) view.findViewById(R.id.callStats);
drawer = (SlidingDrawer) view.findViewById(R.id.statusBar);
drawer.setOnDrawerOpenListener(new OnDrawerOpenListener() {
@Override
public void onDrawerOpened() {
populateSliderContent();
}
});
sliderContentAccounts = (ListView) view.findViewById(R.id.accounts);
voicemailCount = (TextView) view.findViewById(R.id.voicemailCount); voicemailCount = (TextView) view.findViewById(R.id.voicemailCount);
@ -134,8 +120,6 @@ public class StatusFragment extends Fragment {
}); });
} }
// setMiniLedsForEachAccount(); // setMiniLedsForEachAccount();
populateSliderContent();
sliderContentAccounts.invalidate();
} catch (IllegalStateException ise) {} } catch (IllegalStateException ise) {}
} }
@ -204,40 +188,23 @@ public class StatusFragment extends Fragment {
return; return;
} }
if (getResources().getBoolean(R.bool.disable_animations)) {
drawer.toggle();
} else {
drawer.animateToggle();
}
} }
public void closeStatusBar() { public void closeStatusBar() {
if (getResources().getBoolean(R.bool.lock_statusbar)) { if (getResources().getBoolean(R.bool.lock_statusbar)) {
return; return;
} }
if (getResources().getBoolean(R.bool.disable_animations)) {
drawer.close();
} else {
drawer.animateClose();
}
} }
private void populateSliderContent() { private void populateSliderContent() {
if (LinphoneManager.isInstanciated() && LinphoneManager.getLc() != null) { if (LinphoneManager.isInstanciated() && LinphoneManager.getLc() != null) {
sliderContentAccounts.setVisibility(View.GONE);
callStats.setVisibility(View.GONE);
voicemailCount.setVisibility(View.GONE); voicemailCount.setVisibility(View.GONE);
if (isInCall && isAttached && getResources().getBoolean(R.bool.display_call_stats)) { if (isInCall && isAttached && getResources().getBoolean(R.bool.display_call_stats)) {
callStats.setVisibility(View.VISIBLE);
LinphoneCall call = LinphoneManager.getLc().getCurrentCall(); LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
initCallStatsRefresher(call, callStats); //initCallStatsRefresher(call, callStats);
} else if (!isInCall) { } else if (!isInCall) {
voicemailCount.setVisibility(View.VISIBLE); voicemailCount.setVisibility(View.VISIBLE);
sliderContentAccounts.setVisibility(View.VISIBLE);
AccountsListAdapter adapter = new AccountsListAdapter();
sliderContentAccounts.setAdapter(adapter);
} }
} }
} }
@ -379,11 +346,6 @@ public class StatusFragment extends Fragment {
if (getResources().getBoolean(R.bool.exit_button_on_dialer)) if (getResources().getBoolean(R.bool.exit_button_on_dialer))
exit.setVisibility(View.VISIBLE); exit.setVisibility(View.VISIBLE);
if (drawer != null && getResources().getBoolean(R.bool.lock_statusbar)) {
drawer.lock();
} else if (drawer != null) {
drawer.unlock();
}
} }
} }