Update Linphone Main with side menu/ Dialer

This commit is contained in:
Margaux Clerc 2015-09-18 18:08:44 +02:00
parent b1d4d018fb
commit 18d5706572
35 changed files with 857 additions and 992 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

7
res/drawable/quit.xml Normal file
View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -3,31 +3,25 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="10dp"
android:background="@color/colorH"
android:gravity="center">
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
<ImageView
android:contentDescription="@string/content_description_welcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo" />
<View android:layout_weight="5" android:layout_width="0dp" android:layout_height="0dp" />
android:padding="10dp"
android:src="@drawable/linphone_orange" />
<TextView
android:layout_margin="10dp"
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/text_default"
android:textSize="30dp"
android:textStyle="bold" />
android:textSize="30dp" />
<View android:layout_weight="50" android:layout_width="0dp" android:layout_height="0dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -47,8 +41,6 @@
android:textColor="@color/text_contrast"
android:id="@+id/AboutLink"/>
<View android:layout_weight="30" android:layout_width="0dp" android:layout_height="0dp" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
@ -57,30 +49,21 @@
<Button
android:id="@+id/send_log"
android:background="@drawable/button_background"
android:padding="10dp"
android:layout_margin="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/menu_send_log"/>
<Button
android:id="@+id/reset_log"
android:background="@drawable/button_background"
android:padding="10dp"
android:layout_margin="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_reset_log"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingBottom="30dp">
<Button android:id="@+id/exit"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_exit"/>
</LinearLayout>
</LinearLayout>

View file

@ -2,30 +2,22 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@color/colorG"
android:layout_height="30dp">
<LinearLayout
android:layout_centerVertical="true"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_height="30dp"
android:gravity="center">
<TextView
android:id="@+id/address"
style="@style/font13"
android:paddingLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"/>
<ImageView
android:contentDescription="@string/content_description_led"
android:id="@+id/statusLed"
android:src="@drawable/led_disconnected"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/address"
style="@style/font13"
android:paddingLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/statusLed"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/status_available"
android:padding="5dp"
android:layout_alignParentRight="true"/>
</LinearLayout>
</RelativeLayout>

View file

@ -14,12 +14,12 @@
<org.linphone.ui.EraseButton
android:id="@+id/Erase"
android:layout_width="wrap_content"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:paddingRight="10dp"
android:scaleType="fitXY"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:src="@drawable/backspace" />
<org.linphone.ui.AddressText
@ -29,7 +29,7 @@
android:background="@color/colorF"
android:ellipsize="start"
android:inputType="textEmailAddress"
android:hint="@string/addressHint"
android:hint="@string/address_bar_hint"
android:paddingLeft="20dp"
android:paddingRight="5dp"
android:layout_toLeftOf="@id/Erase"
@ -57,29 +57,28 @@
android:id="@+id/addContact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center"
android:padding="20dp"
android:contentDescription="@string/content_description_contacts"
android:src="@drawable/contact_add_button" />
android:src="@drawable/contact_add_button"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
<org.linphone.ui.CallButton
android:id="@+id/Call"
android:contentDescription="@string/content_description_call"
android:id="@+id/Call"
android:background="@drawable/call"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center"
android:padding="15dp"
android:layout_weight="0.5"
android:src="@drawable/call_audio_start" />
</LinearLayout>
<org.linphone.ui.Numpad
android:id="@+id/Dialer"
android:contentDescription="@string/content_description_numpad"
android:id="@+id/Dialer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"

View file

@ -1,12 +0,0 @@
<?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"/>

50
res/layout/edit_list.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/edit_list"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="60dp"
android:visibility="gone">
<ImageView
android:id="@+id/cancel"
android:src="@drawable/cancel_edit"
android:background="@drawable/toolbar_button"
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:layout_alignParentLeft="true"/>
<ImageView
android:id="@+id/delete"
android:src="@drawable/delete"
android:background="@drawable/toolbar_button"
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:layout_alignParentRight="true"/>
<ImageView
android:id="@+id/select_all"
android:src="@drawable/select_all"
android:background="@drawable/toolbar_button"
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:layout_toLeftOf="@id/delete"/>
<ImageView
android:id="@+id/deselect_all"
android:src="@drawable/deselect_all"
android:background="@drawable/toolbar_button"
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:layout_toLeftOf="@id/delete"
android:visibility="gone"/>
</RelativeLayout>

155
res/layout/incall_stats.xml Normal file
View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout
android:id="@+id/callStats"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:background="@android:color/black">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:id="@+id/call_stats_title"
android:textStyle="bold"
android:textColor="@color/text_default"
android:textSize="18sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_codec"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/codec"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_upload"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/uploadBandwith"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_download"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="12sp"/>
<TextView
android:id="@+id/downloadBandwith"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_ice"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/ice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:id="@+id/video_resolution_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_video_resolution"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/video_resolution"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
</TableLayout>
</LinearLayout>

View file

@ -12,8 +12,9 @@
<ImageView
android:src="@drawable/splashscreen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"/>
<TextView
android:text="@string/app_name"

View file

@ -12,252 +12,234 @@
android:layout_height="40dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent"
android:layout_below="@id/status">
<!-- The main content view -->
<RelativeLayout
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<android.support.v4.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_above="@id/footer">
<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
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
android:layout_below="@id/status">
<RelativeLayout
android:id="@+id/history"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_margin="10dp"
android:scaleType="center"
android:contentDescription="@string/content_description_history"
android:src="@drawable/footer_history" />
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_above="@id/footer">
<RelativeLayout
android:id="@+id/history_select"
android:background="@color/colorA"
<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
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_height="70dp"
android:layout_alignParentBottom="true"
android:visibility="gone" />
android:orientation="horizontal">
<TextView
android:id="@+id/missedCalls"
style="@style/font18"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/history_chat_indicator"
android:gravity="center"
android:visibility="gone" />
<RelativeLayout
android:id="@+id/history"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent">
</RelativeLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_centerInParent="true"
android:contentDescription="@string/content_description_history"
android:src="@drawable/footer_history"
android:id="@+id/imageView"/>
<RelativeLayout
android:id="@+id/contacts"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true">
<RelativeLayout
android:id="@+id/history_select"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:visibility="gone" />
<ImageView
android:src="@drawable/footer_contacts"
android:contentDescription="@string/content_description_contacts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_margin="10dp"
android:scaleType="center" />
<TextView
android:id="@+id/missedCalls"
style="@style/font18"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_margin="12dp"
android:background="@drawable/history_chat_indicator"
android:gravity="center"
android:visibility="gone"/>
<RelativeLayout
android:id="@+id/contacts_select"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/contacts"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true">
<ImageView
android:src="@drawable/footer_contacts"
android:contentDescription="@string/content_description_contacts"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_centerInParent="true" />
<RelativeLayout
android:id="@+id/contacts_select"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:visibility="gone" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/dialer"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true">
<RelativeLayout
android:id="@+id/dialer"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true">
<ImageView
android:src="@drawable/footer_dialer"
android:contentDescription="@string/content_description_dialer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_margin="10dp"
android:scaleType="center"/>
<ImageView
android:src="@drawable/footer_dialer"
android:contentDescription="@string/content_description_dialer"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_centerInParent="true"/>
<RelativeLayout
android:id="@+id/dialer_select"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"/>
<RelativeLayout
android:id="@+id/dialer_select"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/chat"
android:background="@drawable/footer_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:adjustViewBounds="true">
<RelativeLayout
android:id="@+id/chat"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent">
<ImageView
android:src="@drawable/footer_chat"
android:contentDescription="@string/content_description_chat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_margin="10dp"
android:scaleType="center" />
<ImageView
android:src="@drawable/footer_chat"
android:contentDescription="@string/content_description_chat"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_centerInParent="true" />
<RelativeLayout
android:id="@+id/chat_select"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:visibility="gone"/>
<RelativeLayout
android:id="@+id/chat_select"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:visibility="gone"/>
<TextView
android:id="@+id/missedChats"
style="@style/font18"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/history_chat_indicator"
android:gravity="center"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/fragmentContainer2"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<TextView
android:id="@+id/missedChats"
style="@style/font18"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_margin="12dp"
android:background="@drawable/history_chat_indicator"
android:gravity="center"
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
<!-- The navigation drawer -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/left_drawer"
android:layout_gravity="left">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ListView android:id="@+id/accounts_list"
<LinearLayout
android:id="@+id/fragmentContainer2"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:choiceMode="singleChoice"
android:cacheColorHint="@color/transparent"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="@color/colorB"/>
<ListView android:id="@+id/list_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@color/colorE"
android:cacheColorHint="@color/transparent"
android:dividerHeight="1dp"
android:background="@color/colorH"/>
android:orientation="vertical">
</LinearLayout>
</RelativeLayout>
<!-- Side Menu -->
<RelativeLayout
android:id="@+id/exitLayout"
android:gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/colorA">
android:layout_height="match_parent"
android:id="@+id/side_menu_content"
android:layout_gravity="left">
<ImageView
android:id="@+id/lol"
android:layout_width="25dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:src="@drawable/quit_default"
android:layout_centerVertical="true" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/lol"
android:text="@string/menu_exit"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:gravity="center_vertical"
android:paddingRight="40dp"/>
<include layout="@layout/side_menu_default_account"/>
</RelativeLayout>
<ListView android:id="@+id/accounts_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:choiceMode="singleChoice"
android:cacheColorHint="@color/transparent"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="@color/colorB"/>
<ListView android:id="@+id/item_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@color/colorE"
android:listSelector="@color/colorH"
android:dividerHeight="1dp"
android:background="@color/colorH"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/side_menu_quit"
android:gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/colorA">
<ImageView
android:id="@+id/quit_button"
android:src="@drawable/quit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:padding="5dp"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/quit"
android:text="@string/quit"
style="@style/font14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/quit_button"
android:gravity="center_vertical"
android:layout_centerInParent="true"/>
</RelativeLayout>
</RelativeLayout>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/chat"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorD"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_chat_button"
android:src="@drawable/footer_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_chat"
android:textSize="12sp" />
</RelativeLayout>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/contacts"
android:background="@color/colorD"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true">
<ImageView
android:id="@+id/image"
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_contacts" />
<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/colorD" />
</RelativeLayout>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/history"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorD"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:adjustViewBounds="true">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="center"
android:contentDescription="@string/content_description_history"
android:src="@drawable/footer_history" />
<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/colorD" />
</RelativeLayout>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent" android:shrinkColumns="*" >
android:layout_width="match_parent" android:layout_height="match_parent" >
<TableRow android:layout_weight="1" android:gravity="center">
<org.linphone.ui.Digit android:id="@+id/Digit1" android:text="1" style="@style/DialerDigit" android:background="@drawable/numpad_one" android:soundEffectsEnabled="true"/>
@ -10,7 +10,7 @@
</TableRow>
<TableRow android:layout_weight="1" android:gravity="center">
<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" />
<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/Digit6" android:text="6" style="@style/DialerDigit" android:background="@drawable/numpad_six" android:soundEffectsEnabled="true" />
</TableRow>

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/default_account"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="80dp">
<ImageView
android:id="@+id/icon"
android:src="@drawable/avatar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_centerVertical="true" />
<LinearLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_toRightOf="@+id/icon"
android:gravity="center_vertical">
<TextView
android:id="@+id/display_name"
style="@style/font7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:editable="false"/>
<TextView
android:id="@+id/address"
style="@style/font3"
android:editable="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ImageView
android:id="@+id/status_led"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/status_available"
android:padding="5dp"
android:layout_marginBottom="5dp"
android:layout_alignParentRight="true"
android:layout_alignBottom="@id/layout"/>
</RelativeLayout>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="@style/font6"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"/>

View file

@ -1,263 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/status"
android:background="@color/colorA"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal">
<RelativeLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- <TableLayout
android:id="@+id/callStats"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:background="@android:color/black">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:id="@+id/call_stats_title"
android:textStyle="bold"
android:textColor="@color/text_default"
android:textSize="18sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_codec"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/codec"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_upload"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/uploadBandwith"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_download"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="12sp"/>
<TextView
android:id="@+id/downloadBandwith"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_ice"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/ice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
<TableRow
android:id="@+id/video_resolution_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/call_stats_video_resolution"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="12sp"/>
<TextView
android:id="@+id/video_resolution"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:gravity="right|center_vertical"
android:textColor="@android:color/white"
android:textSize="12sp"/>
</TableRow>
</TableLayout> -->
</RelativeLayout>
<RelativeLayout
android:id="@+id/handle"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/status_bar"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/menu_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:src="@drawable/menu_burger"
android:layout_centerVertical="true"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"/>
<ImageView
android:id="@+id/side_menu_button"
android:src="@drawable/menu_burger"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"/>
<ImageView
android:contentDescription="@string/content_description_led"
android:id="@+id/statusLed"
android:paddingLeft="5dp"
android:src="@drawable/led_disconnected"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/menu_icon"/>
<ImageView
android:id="@+id/call_quality"
android:src="@drawable/call_quality_indicator_0"
android:contentDescription="@string/content_description_call_quality"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"
android:visibility="invisible" />
<TextView
android:id="@+id/statusText"
android:text="@string/status_not_connected"
android:textColor="@android:color/white"
android:textSize="18sp"
android:paddingLeft="5dp"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_toRightOf="@id/statusLed" />
<LinearLayout
android:id="@+id/moreStatusLed"
android:layout_width="wrap_content"
android:layout_height="10dp"
android:orientation="horizontal"
android:layout_toRightOf="@id/statusLed"/>
<ImageView
android:contentDescription="@string/content_description_call_quality"
android:id="@+id/callQuality"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:src="@drawable/call_quality_indicator_0"
android:adjustViewBounds="true"
android:layout_centerHorizontal="true"
android:visibility="gone" />
<TextView
android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/menu_exit"
android:textColor="@android:color/white"
android:visibility="gone"
android:textSize="18sp" />
<TextView
android:id="@+id/voicemailCount"
android:textColor="@android:color/white"
android:layout_alignParentRight="true"
android:textSize="18sp"
android:paddingLeft="5dp"
android:paddingRight="10dp"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:visibility="gone" />
</RelativeLayout>
<ImageView
android:id="@+id/status_led"
android:src="@drawable/led_disconnected"
android:contentDescription="@string/content_description_led"
android:paddingLeft="5dp"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/side_menu_button"/>
<ImageView
android:contentDescription="@string/content_description_encryption"
android:id="@+id/encryption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:src="@drawable/security_pending"
android:adjustViewBounds="true"
android:visibility="gone"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true" />
<TextView
android:id="@+id/status_text"
android:text="@string/status_not_connected"
style="@style/font16"
android:paddingLeft="5dp"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_toRightOf="@id/status_led" />
<ImageView
android:id="@+id/voicemail"
android:src="@drawable/voicemail"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:visibility="gone" />
<TextView
android:id="@+id/voicemail_count"
style="@style/font16"
android:layout_alignParentRight="true"
android:paddingLeft="5dp"
android:paddingRight="10dp"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:visibility="gone" />
<ImageView
android:id="@+id/encryption"
android:src="@drawable/security_ko"
android:contentDescription="@string/content_description_encryption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:padding="5dp"
android:layout_centerInParent="true"
android:visibility="gone"
android:layout_alignParentRight="true" />
</RelativeLayout>
</RelativeLayout>

View file

@ -13,6 +13,9 @@
<color name="colorJ">#ffa645</color>
<color name="colorK">#3eb5c0</color>
<color name="colorL">#96c11f</color>
<color name="colorAB">#ffeee5</color>
<!-- end -->

View file

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="DialerDigit" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">50dp</item>
<item name="android:layout_height">50dp</item>
<item name="android:textColor">@android:color/transparent</item>
<item name="android:textSize">20sp</item>
<item name="android:scaleType">center</item>
<item name="android:adjustViewBounds">true</item>
<item name="android:layout_margin">10dp</item>
<item name="android:layout_margin">30dp</item>
</style>
<declare-styleable name="Numpad">

View file

@ -21,10 +21,6 @@
<string name="wizard_url">https://www.linphone.org/wizard.php</string>
<!-- Interface settings -->
<bool name="replace_settings_by_about">false</bool>
<bool name="replace_chat_by_about">false</bool>
<bool name="display_about_in_settings">true</bool>
<bool name="exit_button_on_dialer">false</bool>
<bool name="hide_camera_settings">false</bool>
<bool name="replace_wizard_with_old_interface">false</bool>
@ -50,7 +46,6 @@
<bool name="disable_animations">false</bool>
<bool name="show_statusbar_only_on_dialer">true</bool>
<bool name="lock_statusbar">false</bool>
<bool name="emoticons_in_messages">true</bool>
<bool name="only_display_username_if_unknown">true</bool> <!-- Display username for all sip addresses (if not in contact and display name empty) -->
<bool name="never_display_sip_addresses">false</bool> <!-- To use only with the above setting set to true -->

View file

@ -37,20 +37,22 @@
<string name="assistant_password_confirm">Confirm password</string>
<!-- 1. Dailer -->
<string name="addressHint">Enter a number or an address</string>
<string name="address_bar_hint">Enter a number or an address</string>
<!-- 2. History -->
<!-- 3. Contacts -->
<!-- Left Menu -->
<string-array name="menu_entry">
<!-- Side Menu -->
<string-array name="side_menu_item">
<item>Settings</item>
<item>Assistant</item>
<item>About</item>
</string-array>
<string name="quit">Quit</string>
<!-- Call -->
<string name="incoming_call">incoming call</string>
<string name="outgoing_call">outgoing call</string>
@ -258,7 +260,6 @@
<string name="menu_send_log">Send log</string>
<string name="menu_reset_log">Reset log</string>
<string name="pref_audio">Audio</string>
<string name="menu_exit">Exit</string>
<string name="pref_prefix">Prefix</string>
<string name="pref_advanced">Advanced</string>
<string name="menu_settings">Settings</string>

View file

@ -9,12 +9,12 @@
<item name="android:textColor">@color/colorA</item>
<item name="android:textAllCaps">true</item>
<item name="android:textStyle">bold</item>
<item name="android:textSize">30sp</item>
<item name="android:textSize">28sp</item>
</style>
<style name="font2" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/colorA</item>
<item name="android:textSize">20sp</item>
<item name="android:textSize">18sp</item>
</style>
<style name="font3" parent="@android:style/TextAppearance.Small">
@ -31,12 +31,12 @@
<style name="font5" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/colorC</item>
<item name="android:textSize">40sp</item>
<item name="android:textSize">32sp</item>
</style>
<style name="font6" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/colorC</item>
<item name="android:textSize">28sp</item>
<item name="android:textSize">20sp</item>
</style>
<style name="font7" parent="@android:style/TextAppearance.Medium">
@ -48,7 +48,7 @@
<style name="font8" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/colorC</item>
<item name="android:textAllCaps">true</item>
<item name="android:textSize">20sp</item>
<item name="android:textSize">18sp</item>
</style>
<style name="font9" parent="@android:style/TextAppearance.Small">
@ -58,7 +58,7 @@
<style name="font10" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/colorD</item>
<item name="android:textSize">24sp</item>
<item name="android:textSize">20sp</item>
</style>
<style name="font11" parent="@android:style/TextAppearance.Medium">
@ -78,7 +78,7 @@
<style name="font14" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">@color/colorH</item>
<item name="android:textSize">30sp</item>
<item name="android:textSize">26sp</item>
</style>
<style name="font15" parent="@android:style/TextAppearance.Small">
@ -89,7 +89,7 @@
<style name="font16" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">@color/colorH</item>
<item name="android:textSize">22sp</item>
<item name="android:textSize">20sp</item>
</style>
<style name="font17" parent="@android:style/TextAppearance.Small">
@ -110,4 +110,15 @@
<item name="android:textSize">22sp</item>
</style>
<style name="font20" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">@color/colorI</item>
<item name="android:textSize">14sp</item>
</style>
<style name="font21" parent="@android:style/TextAppearance.Large">
<item name="android:textColor">@color/colorH</item>
<item name="android:textAllCaps">true</item>
<item name="android:textSize">50sp</item>
</style>
</resources>

View file

@ -62,10 +62,6 @@ public class AboutFragment extends Fragment implements OnClickListener {
resetLogButton.setOnClickListener(this);
resetLogButton.setVisibility(LinphonePreferences.instance().isDebugEnabled() ? View.VISIBLE : View.GONE);
exitButton = view.findViewById(R.id.exit);
exitButton.setOnClickListener(this);
exitButton.setVisibility(View.VISIBLE);
return view;
}
@ -88,7 +84,6 @@ public class AboutFragment extends Fragment implements OnClickListener {
if (LinphoneActivity.isInstanciated()) {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (v == sendLogButton) {
//LinphoneUtils.collectLogs(LinphoneActivity.instance(), getString(R.string.about_bugreport_email));
if (lc != null) {
lc.uploadLogCollection();
}
@ -96,8 +91,6 @@ public class AboutFragment extends Fragment implements OnClickListener {
if (lc != null) {
lc.resetLogCollection();
}
} else {
LinphoneActivity.instance().exit();
}
}
}

View file

@ -1,68 +0,0 @@
package org.linphone;
/*
ChatActivity.java
Copyright (C) 2015 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
import android.app.Activity;
import android.app.FragmentManager;
import android.os.Bundle;
/**
* @author Margaux Clerc
*/
public class ChatActivity extends Activity {
private static final String CHAT_FRAGMENT = "chatFragment";
private ChatFragment chatFragment;
private StatusFragment status;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.chat_activity);
Bundle extras = new Bundle();
if( getIntent().getExtras() != null) {
extras.putString("SipUri", getIntent().getExtras().getString("SipUri"));
extras.putString("DisplayName", getIntent().getExtras().getString("DisplayName"));
extras.putString("PictureUri", getIntent().getExtras().getString("PictureUri"));
extras.putString("ThumbnailUri", getIntent().getExtras().getString("ThumbnailUri"));
}
ChatFragment fragment = new ChatFragment();
fragment.setArguments(extras);
getFragmentManager().beginTransaction().add(R.id.fragmentContainer, fragment, "ChatFragment").commit();
FragmentManager fm = getFragmentManager();
chatFragment = (ChatFragment) fm.findFragmentByTag(CHAT_FRAGMENT);
// If the Fragment is non-null, then it is currently being
// retained across a configuration change.
if (chatFragment == null) {
chatFragment = new ChatFragment();
chatFragment.setArguments(extras);
fm.beginTransaction().add(R.id.fragmentContainer, chatFragment, CHAT_FRAGMENT).commit();
}
}
public void updateStatusFragment(StatusFragment fragment) {
status = fragment;
}
}

View file

@ -22,7 +22,6 @@ import static android.content.Intent.ACTION_MAIN;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.List;
@ -44,17 +43,15 @@ import org.linphone.core.LinphoneCore.RegistrationState;
import org.linphone.core.LinphoneCoreException;
import org.linphone.core.LinphoneCoreFactory;
import org.linphone.core.LinphoneCoreListenerBase;
import org.linphone.core.LinphonePlayer;
import org.linphone.core.LinphoneProxyConfig;
import org.linphone.core.Reason;
import org.linphone.mediastream.Log;
import org.linphone.assistant.RemoteProvisioningLoginActivity;
import org.linphone.ui.AddressText;
import org.linphone.ui.LedPreference;
import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.Fragment;
import android.app.FragmentManager;
@ -65,12 +62,11 @@ import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.text.Layout;
import android.support.v4.widget.DrawerLayout;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@ -85,16 +81,12 @@ import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TableLayout;
import android.widget.TextView;
import android.widget.Toast;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.app.ActionBarDrawerToggle;
/**
* @author Sylvain Berfini
@ -111,7 +103,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private StatusFragment statusFragment;
private TextView missedCalls, missedChats;
private LinearLayout menu, mark;
private RelativeLayout contacts, history, dialer, chat;
private RelativeLayout contacts_selected, history_selected, dialer_selected, chat_selected;
private FragmentsAvailable currentFragment, nextFragment;
@ -123,12 +114,14 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private boolean isAnimationDisabled = false, preferLinphoneContacts = false;
private OrientationEventListener mOrientationHelper;
private LinphoneCoreListenerBase mListener;
private String[] mParams;
private DrawerLayout sideMenu;
private String[] sideMenuItems;
private String mTitle;
private RelativeLayout mDrawerList, exitLayout, headerLayout;
private DrawerLayout mDrawerLayout;
private ActionBarDrawerToggle mDrawerToggle;
ListView mDrawerListB;
private RelativeLayout sideMenuContent, quitLayout, defaultAccount;
private ListView accountsList, sideMenuItemList;
private ImageView menu;
static final boolean isInstanciated() {
return instance != null;
@ -151,7 +144,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
}
if (!LinphoneManager.isInstanciated()) {
Log.e("No service running: avoid crash by starting the launcher", this.getClass().getName());
Log.e("No service running: avoid crash by starting the launch", this.getClass().getName());
// super.onCreate called earlier
finish();
startActivity(getIntent().setClass(this, LinphoneLauncherActivity.class));
@ -175,16 +168,15 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
if (getResources().getBoolean(R.bool.use_linphone_tag)) {
ContactsManager.getInstance().initializeSyncAccount(getApplicationContext(), getContentResolver());
} else {
ContactsManager.getInstance().initializeContactManager(getApplicationContext(), getContentResolver());
ContactsManager.getInstance().initializeContactManager(getApplicationContext(), getContentResolver());
}
setContentView(R.layout.main);
instance = this;
fragmentsHistory = new ArrayList<FragmentsAvailable>();
createDrawer();
initButtons();
createSideMenu();
currentFragment = nextFragment = FragmentsAvailable.DIALER;
fragmentsHistory.add(currentFragment);
@ -231,13 +223,13 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
displayCustomToast(getString(R.string.error_io_error), Toast.LENGTH_LONG);
}
}
//initAccounts();
initAccounts();
}
@Override
public void callState(LinphoneCore lc, LinphoneCall call, LinphoneCall.State state, String message) {
if (state == State.IncomingReceived) {
//finish();
startActivity(new Intent(LinphoneActivity.instance(), IncomingCallActivity.class));
} else if (state == State.OutgoingInit || state == State.OutgoingProgress) {
startActivity(new Intent(LinphoneActivity.instance(), OutgoingCallActivity.class));
@ -290,212 +282,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
updateAnimationsState();
}
public void createDrawer() {
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mParams = getResources().getStringArray(R.array.menu_entry);
mDrawerList = (RelativeLayout) findViewById(R.id.left_drawer);
mDrawerListB = (ListView) findViewById(R.id.list_drawer);
List<String> dataList = new ArrayList<String>();
mDrawerListB.setAdapter(new ArrayAdapter<String>(this,R.layout.drawer_list_item, mParams));
mDrawerListB.setOnItemClickListener(new DrawerItemClickListener());
initAccounts();
ImageView menubar = (ImageView) findViewById(R.id.menu_icon);
menubar.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if(mDrawerLayout.isDrawerVisible(Gravity.LEFT)){
mDrawerLayout.closeDrawer(mDrawerList);
} else {
mDrawerLayout.openDrawer(mDrawerList);
}
}
});
exitLayout = (RelativeLayout) findViewById(R.id.exitLayout);
exitLayout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
exit();
}
});
}
public void initAccounts() {
ListView accounts = (ListView) findViewById(R.id.accounts_list);
//accounts.setVisibility(View.VISIBLE);
accounts.setAdapter(new AccountsListAdapter());
accounts.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Log.w("Tag " + i);
int position = (int) view.getTag();
displayAccountSettings(position);
mDrawerLayout.closeDrawer(mDrawerList);
}
});
}
private int getStatusIconResource(LinphoneCore.RegistrationState state, boolean isDefaultAccount) {
try {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
boolean defaultAccountConnected = (isDefaultAccount && lc != null && lc.getDefaultProxyConfig() != null && lc.getDefaultProxyConfig().isRegistered()) || !isDefaultAccount;
if (state == RegistrationState.RegistrationOk && defaultAccountConnected) {
return R.drawable.led_connected;
} else if (state == RegistrationState.RegistrationProgress) {
return R.drawable.led_inprogress;
} else if (state == RegistrationState.RegistrationFailed) {
return R.drawable.led_error;
} else {
return R.drawable.led_disconnected;
}
} catch (Exception e) {
e.printStackTrace();
}
return R.drawable.led_disconnected;
}
class AccountsListAdapter extends BaseAdapter {
List<LinphoneProxyConfig> proxy_list;
AccountsListAdapter() {
proxy_list = new ArrayList<LinphoneProxyConfig>();
refresh();
}
public void refresh(){
proxy_list = new ArrayList<LinphoneProxyConfig>();
proxy_list.add(LinphoneManager.getLc().getDefaultProxyConfig());
for(LinphoneProxyConfig proxyConfig : LinphoneManager.getLc().getProxyConfigList()){
if(proxyConfig != LinphoneManager.getLc().getDefaultProxyConfig()){
proxy_list.add(proxyConfig);
}
}
}
public int getCount() {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (proxy_list != null) {
return proxy_list.size();
} else {
return 0;
}
}
public Object getItem(int position) {
return proxy_list.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(final int position, View convertView, ViewGroup parent) {
refresh();
boolean isDefaultAccount = false;
View view = null;
Log.w(position);
LinphoneProxyConfig lpc = (LinphoneProxyConfig) getItem(position);
//if (convertView != null) {
// view = convertView;
//} else {
if(lpc == LinphoneManager.getLc().getDefaultProxyConfig()) {
isDefaultAccount = true;
view = getLayoutInflater().inflate(R.layout.main_account, parent, false);
Log.w("Default account");
} else {
view = getLayoutInflater().inflate(R.layout.accounts, parent, false);
}
//}
ImageView status = (ImageView) view.findViewById(R.id.statusLed);
TextView address = (TextView) view.findViewById(R.id.address);
String sipAddress = (lpc.getIdentity() != null && lpc.getIdentity().startsWith("sip:")) ? lpc.getIdentity().split("sip:")[1] : lpc.getIdentity();
//identity.setText(sipAddress);
try {
LinphoneAddress identity = LinphoneCoreFactory.instance().createLinphoneAddress(lpc.getIdentity());
address.setText(identity.asStringUriOnly());
if(isDefaultAccount) {
TextView displayName = (TextView) findViewById(R.id.display_name);
if (identity.getDisplayName() != null)
displayName.setText(identity.getDisplayName());
else
displayName.setText(identity.getUserName());
}
} catch (Exception e) {
e.printStackTrace();
}
int nbAccounts = LinphonePreferences.instance().getAccountCount();
int accountIndex = 0;
for (int i = 0; i < nbAccounts; i++) {
String username = LinphonePreferences.instance().getAccountUsername(i);
String domain = LinphonePreferences.instance().getAccountDomain(i);
String id = username + "@" + domain;
if (id.equals(address)) {
accountIndex = i;
view.setTag(accountIndex);
break;
}
}
status.setImageResource(getStatusIconResource(lpc.getState(),isDefaultAccount));
view.setTag(accountIndex);
return view;
}
}
private class DrawerItemClickListener implements ListView.OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
selectItem(view,position);
}
}
private void selectItem(View view,int position) {
Log.w(mDrawerListB.getAdapter().getItem(position).toString());
mDrawerListB.setItemChecked(position, true);
if(mDrawerListB.getAdapter().getItem(position).toString().equals("Settings")){
displaySettings();
}
if(mDrawerListB.getAdapter().getItem(position).toString().equals("About")){
displayAbout();
}
if(mDrawerListB.getAdapter().getItem(position).toString().equals("Assistant")){
displayAssistant();
}
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) {
@ -513,8 +299,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private void initButtons() {
menu = (LinearLayout) findViewById(R.id.menu);
history = (RelativeLayout) findViewById(R.id.history);
history.setOnClickListener(this);
contacts = (RelativeLayout) findViewById(R.id.contacts);
@ -863,11 +647,13 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
return;
}
Log.w("Display chat sipuri" + sipUri);
if(sipUri == null) {
Intent intent = new Intent(this, ChatActivity.class);
startOrientationSensor();
startActivityForResult(intent, CHAT_ACTIVITY);
Bundle extras = new Bundle();
changeCurrentFragment(FragmentsAvailable.CHAT, extras);
} else {
Log.w("Display chat");
LinphoneAddress lAddress;
try {
lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
@ -885,38 +671,38 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
thumbnailUri = contact.getThumbnailUri().toString();
}
if (currentFragment == FragmentsAvailable.CHATLIST || currentFragment == FragmentsAvailable.CHAT){
if (isTablet()){
Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2);
if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.CHAT) {
ChatFragment chatFragment = (ChatFragment) fragment2;
chatFragment.changeDisplayedChat(sipUri, displayName, pictureUri);
} else {
Bundle extras = new Bundle();
extras.putString("SipUri", sipUri);
if (contact != null) {
extras.putString("DisplayName", displayName);
extras.putString("PictureUri", pictureUri);
extras.putString("ThumbnailUri", thumbnailUri);
}
changeCurrentFragment(FragmentsAvailable.CHAT, extras);
}
if (currentFragment == FragmentsAvailable.CHATLIST || currentFragment == FragmentsAvailable.CHAT) {
Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2);
if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.CHAT) {
ChatFragment chatFragment = (ChatFragment) fragment2;
chatFragment.changeDisplayedChat(sipUri, displayName, pictureUri);
} else {
Bundle extras = new Bundle();
extras.putString("SipUri", sipUri);
if (lAddress.getDisplayName() != null) {
extras.putString("DisplayName", contact.getName());
extras.putString("DisplayName", displayName);
extras.putString("PictureUri", pictureUri);
extras.putString("ThumbnailUri", thumbnailUri);
}
changeCurrentFragment(FragmentsAvailable.CHAT, extras);
}
if (messageListFragment != null && messageListFragment.isVisible()) {
((ChatListFragment) messageListFragment).refresh();
} else {
Bundle extras = new Bundle();
extras.putString("SipUri", sipUri);
if (lAddress.getDisplayName() != null) {
extras.putString("DisplayName", displayName);
extras.putString("PictureUri", pictureUri);
extras.putString("ThumbnailUri", thumbnailUri);
}
changeCurrentFragment(FragmentsAvailable.CHAT, extras);
}
if (messageListFragment != null && messageListFragment.isVisible()) {
((ChatListFragment) messageListFragment).refresh();
}
LinphoneService.instance().resetMessageNotifCount();
LinphoneService.instance().removeMessageNotification();
displayMissedChats(getChatStorage().getUnreadMessageCount());
@ -999,11 +785,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
messageListFragment = fragment;
}
public void hideMenu(boolean hide) {
menu.setVisibility(hide ? View.GONE : View.VISIBLE);
mark.setVisibility(hide ? View.GONE : View.VISIBLE);
}
public void updateStatusFragment(StatusFragment fragment) {
statusFragment = fragment;
}
@ -1094,11 +875,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private void displayMissedChats(final int missedChatCount) {
if (missedChatCount > 0) {
missedChats.setText(missedChatCount + "");
if (missedChatCount > 99) {
missedChats.setTextSize(12);
} else {
missedChats.setTextSize(20);
}
missedChats.setVisibility(View.VISIBLE);
if (!isAnimationDisabled) {
missedChats.startAnimation(AnimationUtils.loadAnimation(LinphoneActivity.this, R.anim.bounce));
@ -1311,7 +1087,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
}
}
public void exit() {
public void quit() {
finish();
stopService(new Intent(ACTION_MAIN).setClass(this, LinphoneService.class));
}
@ -1320,7 +1096,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_FIRST_USER && requestCode == SETTINGS_ACTIVITY) {
if (data.getExtras().getBoolean("Exit", false)) {
exit();
quit();
} else {
FragmentsAvailable newFragment = (FragmentsAvailable) data.getExtras().getSerializable("FragmentToDisplay");
changeCurrentFragment(newFragment, null, true);
@ -1498,6 +1274,206 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
}*/
return super.onKeyDown(keyCode, event);
}
//SIDE MENU
public void openOrCloseSideMenu(boolean open) {
if(open) {
sideMenu.openDrawer(sideMenuContent);
} else {
sideMenu.closeDrawer(sideMenuContent);
}
}
public void createSideMenu() {
sideMenu = (DrawerLayout) findViewById(R.id.side_menu);
sideMenuItems = getResources().getStringArray(R.array.side_menu_item);
sideMenuContent = (RelativeLayout) findViewById(R.id.side_menu_content);
sideMenuItemList = (ListView)findViewById(R.id.item_list);
menu = (ImageView) findViewById(R.id.side_menu_button);
sideMenuItemList.setAdapter(new ArrayAdapter<String>(this, R.layout.side_menu_item, sideMenuItems));
sideMenuItemList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
if(sideMenuItemList.getAdapter().getItem(i).toString().equals("Settings")){
LinphoneActivity.instance().displaySettings();
}
if(sideMenuItemList.getAdapter().getItem(i).toString().equals("About")){
LinphoneActivity.instance().displayAbout();
}
if(sideMenuItemList.getAdapter().getItem(i).toString().equals("Assistant")){
LinphoneActivity.instance().displayAssistant();
}
openOrCloseSideMenu(false);
}
});
initAccounts();
menu.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if(sideMenu.isDrawerVisible(Gravity.LEFT)){
sideMenu.closeDrawer(sideMenuContent);
} else {
sideMenu.openDrawer(sideMenuContent);
}
}
});
quitLayout = (RelativeLayout) findViewById(R.id.side_menu_quit);
quitLayout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
LinphoneActivity.instance().quit();
}
});
}
private void initAccounts() {
accountsList = (ListView) findViewById(R.id.accounts_list);
defaultAccount = (RelativeLayout) findViewById(R.id.default_account);
if (LinphoneManager.getLc().getDefaultProxyConfig() != null) {
defaultAccount.setVisibility(View.VISIBLE);
ImageView status = (ImageView)findViewById(R.id.status_led);
TextView address = (TextView) findViewById(R.id.address);
TextView displayName = (TextView) findViewById(R.id.display_name);
try {
LinphoneAddress identity = LinphoneCoreFactory.instance().createLinphoneAddress((LinphoneManager.getLc().getDefaultProxyConfig().getIdentity()));
address.setText(identity.asStringUriOnly());
if (identity.getDisplayName() != null) {
displayName.setText(identity.getDisplayName());
} else if (identity.getUserName() != null) {
displayName.setText(identity.getUserName());
} else {
displayName.setText("");
}
} catch (Exception e) {
e.printStackTrace();
}
status.setImageResource(getStatusIconResource(LinphoneManager.getLc().getDefaultProxyConfig().getState()));
defaultAccount.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
LinphoneActivity.instance().displayAccountSettings(LinphonePreferences.instance().getDefaultAccountIndex());
openOrCloseSideMenu(false);
}
});
} else {
defaultAccount.setVisibility(View.GONE);
}
if(LinphoneManager.getLc().getProxyConfigList().length > 1) {
accountsList.setVisibility(View.VISIBLE);
accountsList.setAdapter(new AccountsListAdapter());
accountsList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
int position = Integer.parseInt(view.getTag().toString());
LinphoneActivity.instance().displayAccountSettings(position);
openOrCloseSideMenu(false);
}
});
} else {
accountsList.setVisibility(View.GONE);
}
}
private int getStatusIconResource(LinphoneCore.RegistrationState state) {
try {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (state == RegistrationState.RegistrationOk) {
return R.drawable.led_connected;
} else if (state == RegistrationState.RegistrationProgress) {
return R.drawable.led_inprogress;
} else if (state == RegistrationState.RegistrationFailed) {
return R.drawable.led_error;
} else {
return R.drawable.led_disconnected;
}
} catch (Exception e) {
e.printStackTrace();
}
return R.drawable.led_disconnected;
}
class AccountsListAdapter extends BaseAdapter {
List<LinphoneProxyConfig> proxy_list;
AccountsListAdapter() {
proxy_list = new ArrayList<LinphoneProxyConfig>();
refresh();
}
public void refresh(){
proxy_list = new ArrayList<LinphoneProxyConfig>();
for(LinphoneProxyConfig proxyConfig : LinphoneManager.getLc().getProxyConfigList()){
if(proxyConfig != LinphoneManager.getLc().getDefaultProxyConfig()){
proxy_list.add(proxyConfig);
}
}
}
public int getCount() {
if (proxy_list != null) {
return proxy_list.size();
} else {
return 0;
}
}
public Object getItem(int position) {
return proxy_list.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(final int position, View convertView, ViewGroup parent) {
View view = null;
LinphoneProxyConfig lpc = (LinphoneProxyConfig) getItem(position);
if (convertView != null) {
view = convertView;
} else {
view = getLayoutInflater().inflate(R.layout.accounts, parent, false);
}
ImageView status = (ImageView) view.findViewById(R.id.statusLed);
TextView address = (TextView) view.findViewById(R.id.address);
String sipAddress = (lpc.getIdentity() != null && lpc.getIdentity().startsWith("sip:")) ? lpc.getIdentity().split("sip:")[1] : lpc.getIdentity();
try {
LinphoneAddress identity = LinphoneCoreFactory.instance().createLinphoneAddress(lpc.getIdentity());
address.setText(identity.asStringUriOnly());
} catch (Exception e) {
e.printStackTrace();
}
int nbAccounts = LinphonePreferences.instance().getAccountCount();
int accountIndex = 0;
for (int i = 0; i < nbAccounts; i++) {
String username = LinphonePreferences.instance().getAccountUsername(i);
String domain = LinphonePreferences.instance().getAccountDomain(i);
String id = username + "@" + domain;
if (id.equals(sipAddress)) {
accountIndex = i;
view.setTag(accountIndex);
break;
}
}
status.setImageResource(getStatusIconResource(lpc.getState()));
return view;
}
}
}
interface ContactPicked {

View file

@ -297,7 +297,7 @@ public final class LinphoneService extends Service {
notificationTextId = R.string.incall_notif_paused;
break;
case VIDEO:
inconId = R.drawable.conf_video;
inconId = R.drawable.topbar_videocall_notification;
notificationTextId = R.string.incall_notif_video;
break;
default:
@ -405,10 +405,10 @@ public final class LinphoneService extends Service {
try {
bm = MediaStore.Images.Media.getBitmap(getContentResolver(), pictureUri);
} catch (Exception e) {
bm = BitmapFactory.decodeResource(getResources(), R.drawable.unknown_small);
bm = BitmapFactory.decodeResource(getResources(), R.drawable.avatar);
}
} else {
bm = BitmapFactory.decodeResource(getResources(), R.drawable.unknown_small);
bm = BitmapFactory.decodeResource(getResources(), R.drawable.avatar);
}
mMsgNotif = Compatibility.createMessageNotification(getApplicationContext(), mMsgNotifCount, fromName, message, bm, notifContentIntent);

View file

@ -138,7 +138,7 @@ public class AssistantActivity extends Activity implements OnClickListener {
back.setOnClickListener(this);
cancel = (ImageView) findViewById(R.id.cancel);
cancel.setOnClickListener(this);
status.enableLeftMenu(false);
status.enableSideMenu(false);
}
private void changeFragment(Fragment newFragment) {

View file

@ -62,7 +62,7 @@ public class RemoteProvisioningFragment extends Fragment implements OnClickListe
Intent intent = new Intent();
intent.setClass(getActivity(), LinphoneLauncherActivity.class);
getActivity().finish();
LinphoneActivity.instance().exit();
LinphoneActivity.instance().quit();
startActivity(intent);
}
}

View file

@ -73,7 +73,7 @@ public class AddressText extends EditText implements AddressType {
}
private String getHintText() {
String resizedText = getContext().getString(R.string.addressHint);
String resizedText = getContext().getString(R.string.address_bar_hint);
if (getHint() != null) {
resizedText = getHint().toString();
}