Sliding status bar + better incall options
9
res/drawable/options_add_call_alt.xml
Normal 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="@drawable/options_add_over_alt" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/options_add_disabled_alt" />
|
||||
<item
|
||||
android:drawable="@drawable/options_add_default_alt" />
|
||||
</selector>
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.4 KiB |
BIN
res/drawable/options_add_default_alt.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 6.2 KiB |
BIN
res/drawable/options_add_disabled_alt.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.5 KiB |
BIN
res/drawable/options_add_over_alt.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
11
res/drawable/options_alt.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?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/options_over_alt" />
|
||||
<item android:state_enabled="false"
|
||||
android:drawable="@drawable/options_disabled_alt" />
|
||||
<item android:state_selected="true"
|
||||
android:drawable="@drawable/options_selected_alt" />
|
||||
<item
|
||||
android:drawable="@drawable/options_default_alt" />
|
||||
</selector>
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 8.3 KiB |
BIN
res/drawable/options_default_alt.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 8 KiB |
BIN
res/drawable/options_disabled_alt.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.3 KiB |
BIN
res/drawable/options_over_alt.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 8 KiB After Width: | Height: | Size: 9.3 KiB |
BIN
res/drawable/options_selected_alt.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 6.6 KiB |
BIN
res/drawable/statebar_background.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
|
@ -1,191 +1,191 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment android:name="org.linphone.StatusFragment"
|
||||
android:id="@+id/status"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="20dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/switchCamera"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:contentDescription="@string/content_description_switch_camera"
|
||||
android:src="@drawable/switch_camera" />
|
||||
<fragment android:name="org.linphone.StatusFragment"
|
||||
android:id="@+id/status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/menu"
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/switchCamera"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:contentDescription="@string/content_description_switch_camera"
|
||||
android:src="@drawable/switch_camera" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
<ImageView
|
||||
android:id="@+id/transfer"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/options_transfer"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/transfer"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/options_transfer"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:visibility="invisible"/>
|
||||
<ImageView
|
||||
android:id="@+id/addCall"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/options_add_call_alt"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/addCall"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/options_add_call"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_switch_video"
|
||||
android:id="@+id/video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/video_off" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_switch_video"
|
||||
android:id="@+id/video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:layout_weight="0.25"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/video_off" />
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_toggle_micro"
|
||||
android:id="@+id/micro"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/micro_on"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25"/>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_toggle_micro"
|
||||
android:id="@+id/micro"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/micro_on"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25"/>
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_toggle_speaker"
|
||||
android:id="@+id/speaker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/speaker_off"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25"/>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_toggle_speaker"
|
||||
android:id="@+id/speaker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/speaker_off"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25"/>
|
||||
<ImageView
|
||||
android:id="@+id/options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/options"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:src="@drawable/options"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.25" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="0.5">
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_pause"
|
||||
android:id="@+id/pause"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/pause_off"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.3"/>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_pause"
|
||||
android:id="@+id/pause"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/pause_off"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.3"/>
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_hang_up"
|
||||
android:id="@+id/hangUp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/hangup"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.3"/>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_hang_up"
|
||||
android:id="@+id/hangUp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/hangup"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.3"/>
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_numpad"
|
||||
android:id="@+id/dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/dialer_alt"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.3"/>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_numpad"
|
||||
android:id="@+id/dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/dialer_alt"
|
||||
android:scaleType="fitXY"
|
||||
android:layout_weight="0.3"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
|
@ -1,127 +1,115 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- <ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/tutorial"/> -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="6"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="75dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<fragment android:name="org.linphone.StatusFragment"
|
||||
<fragment android:name="org.linphone.StatusFragment"
|
||||
android:id="@+id/status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:id="@+id/history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/history" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missedCalls"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/missed_calls_bg" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/contacts" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:id="@+id/dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/dialer" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_settings"
|
||||
android:id="@+id/settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/settings" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2">
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_chat"
|
||||
android:id="@+id/chat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="75dp"
|
||||
android:orientation="horizontal" />
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/chat" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="90dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/missedChats"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/missed_calls_bg" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2">
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_history"
|
||||
android:id="@+id/history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/history" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missedCalls"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/missed_calls_bg" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_contacts"
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/contacts" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_dialer"
|
||||
android:id="@+id/dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/dialer" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_settings"
|
||||
android:id="@+id/settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/settings" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.2">
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_chat"
|
||||
android:id="@+id/chat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/chat" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/missedChats"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:textSize="20dp"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/missed_calls_bg" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
|
@ -1,40 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout
|
||||
xmlns:linphone="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/statusText"
|
||||
android:text="@string/status_not_connected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<org.linphone.ui.SlidingDrawer
|
||||
android:id="@+id/statusBar"
|
||||
linphone:direction="topToBottom"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
linphone:handle="@+id/handle"
|
||||
linphone:content="@+id/content">
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_led"
|
||||
android:id="@+id/statusLed"
|
||||
android:paddingLeft="5dp"
|
||||
android:src="@drawable/led_disconnected"
|
||||
android:layout_toRightOf="@id/statusText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<RelativeLayout
|
||||
android:id="@id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black">
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_call_quality"
|
||||
android:id="@+id/callQuality"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/call_quality_indicator_0"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="gone" />
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/menu_exit" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_encryption"
|
||||
android:id="@+id/encryption"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:src="@drawable/security_pending"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentRight="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@id/handle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/statebar_background"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/statusText"
|
||||
android:text="@string/status_not_connected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_led"
|
||||
android:id="@+id/statusLed"
|
||||
android:paddingLeft="5dp"
|
||||
android:src="@drawable/led_disconnected"
|
||||
android:layout_toRightOf="@id/statusText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_call_quality"
|
||||
android:id="@+id/callQuality"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/call_quality_indicator_0"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:contentDescription="@string/content_description_encryption"
|
||||
android:id="@+id/encryption"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/security_pending"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentRight="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</org.linphone.ui.SlidingDrawer>
|
||||
|
||||
</RelativeLayout>
|
15
res/values/attrs.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<attr name="direction">
|
||||
<enum name="rightToLeft" value="0" />
|
||||
<enum name="bottomToTop" value="1" />
|
||||
<enum name="leftToRight" value="2" />
|
||||
<enum name="topToBottom" value="3" />
|
||||
</attr>
|
||||
|
||||
<declare-styleable name="SlidingDrawer">
|
||||
<attr name="handle" format="reference" />
|
||||
<attr name="content" format="reference" />
|
||||
<attr name="direction" />
|
||||
</declare-styleable>
|
||||
</resources>
|
|
@ -11,6 +11,7 @@
|
|||
<bool name="hide_accounts">false</bool>
|
||||
<bool name="useFirstLoginActivity">false</bool>
|
||||
<bool name="disable_animations">false</bool>
|
||||
<bool name="lock_statusbar">false</bool>
|
||||
<bool name="only_display_username_if_unknown">true</bool>
|
||||
<bool name="show_full_remote_address_on_incoming_call">true</bool>
|
||||
<bool name="display_messages_time">true</bool> <!-- Used to show the time of each message arrival -->
|
||||
|
|
|
@ -436,30 +436,13 @@ public class InCallActivity extends FragmentActivity implements
|
|||
|
||||
private void hideOrDisplayCallOptions() {
|
||||
if (addCall.getVisibility() == View.VISIBLE) {
|
||||
options.setImageResource(R.drawable.options);
|
||||
if (getResources().getBoolean(R.bool.disable_animations)) {
|
||||
transfer.setVisibility(View.GONE);
|
||||
addCall.setVisibility(View.GONE);
|
||||
} else {
|
||||
final Animation animAddCall = AnimationUtils.loadAnimation(this, R.anim.slide_out_top_to_bottom);
|
||||
animAddCall.setAnimationListener(new AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
addCall.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
Animation animTransfer = AnimationUtils.loadAnimation(this, R.anim.slide_out_top_to_bottom);
|
||||
animTransfer.setAnimationListener(new AnimationListener() {
|
||||
Animation anim = AnimationUtils.loadAnimation(this, R.anim.slide_out_left_to_right);
|
||||
anim.setAnimationListener(new AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
|
@ -473,21 +456,23 @@ public class InCallActivity extends FragmentActivity implements
|
|||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
transfer.setVisibility(View.GONE);
|
||||
addCall.startAnimation(animAddCall);
|
||||
addCall.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
transfer.startAnimation(animTransfer);
|
||||
transfer.startAnimation(anim);
|
||||
addCall.startAnimation(anim);
|
||||
}
|
||||
} else {
|
||||
if (getResources().getBoolean(R.bool.disable_animations)) {
|
||||
transfer.setVisibility(View.VISIBLE);
|
||||
addCall.setVisibility(View.VISIBLE);
|
||||
options.setImageResource(R.drawable.options_alt);
|
||||
} else {
|
||||
final Animation animTransfer = AnimationUtils.loadAnimation(this, R.anim.slide_in_bottom_to_top);
|
||||
animTransfer.setAnimationListener(new AnimationListener() {
|
||||
Animation anim = AnimationUtils.loadAnimation(this, R.anim.slide_in_right_to_left);
|
||||
anim.setAnimationListener(new AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
transfer.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -497,27 +482,13 @@ public class InCallActivity extends FragmentActivity implements
|
|||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
}
|
||||
});
|
||||
|
||||
Animation animAddCall = AnimationUtils.loadAnimation(this, R.anim.slide_in_bottom_to_top);
|
||||
animAddCall.setAnimationListener(new AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
options.setImageResource(R.drawable.options_alt);
|
||||
transfer.setVisibility(View.VISIBLE);
|
||||
addCall.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
transfer.startAnimation(animTransfer);
|
||||
}
|
||||
});
|
||||
addCall.startAnimation(animAddCall);
|
||||
transfer.startAnimation(anim);
|
||||
addCall.startAnimation(anim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,24 +206,20 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
private void changeFragment(Fragment newFragment, FragmentsAvailable newFragmentType, boolean withoutAnimation) {
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
|
||||
if (currentFragment.shouldAddToBackStack()) {
|
||||
if (!withoutAnimation && !getResources().getBoolean(R.bool.disable_animations) && currentFragment.shouldAnimate()) {
|
||||
if (newFragmentType.isRightOf(currentFragment)) {
|
||||
transaction.setCustomAnimations(R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left, R.anim.slide_in_left_to_right, R.anim.slide_out_left_to_right);
|
||||
} else {
|
||||
transaction.setCustomAnimations(R.anim.slide_in_left_to_right, R.anim.slide_out_left_to_right, R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left);
|
||||
}
|
||||
if (!withoutAnimation && !getResources().getBoolean(R.bool.disable_animations) && currentFragment.shouldAnimate()) {
|
||||
if (newFragmentType.isRightOf(currentFragment)) {
|
||||
transaction.setCustomAnimations(R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left, R.anim.slide_in_left_to_right, R.anim.slide_out_left_to_right);
|
||||
} else {
|
||||
transaction.setCustomAnimations(R.anim.slide_in_left_to_right, R.anim.slide_out_left_to_right, R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left);
|
||||
}
|
||||
}
|
||||
try {
|
||||
getSupportFragmentManager().popBackStack(newFragmentType.toString(), FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
transaction.addToBackStack(newFragmentType.toString());
|
||||
}
|
||||
else {
|
||||
try {
|
||||
getSupportFragmentManager().popBackStack("Add to back stack", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
} catch (java.lang.IllegalStateException e) {
|
||||
} catch (java.lang.IllegalStateException e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
transaction.addToBackStack(newFragmentType.toString());
|
||||
transaction.replace(R.id.fragmentContainer, newFragment);
|
||||
|
||||
transaction.commitAllowingStateLoss();
|
||||
|
@ -658,6 +654,9 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
return true;
|
||||
}
|
||||
}
|
||||
if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) {
|
||||
statusFragment.openOrCloseStatusBar();
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
import org.linphone.core.LinphoneCall;
|
||||
import org.linphone.core.LinphoneCore.MediaEncryption;
|
||||
import org.linphone.core.LinphoneCore.RegistrationState;
|
||||
import org.linphone.ui.SlidingDrawer;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
@ -40,6 +41,7 @@ public class StatusFragment extends Fragment {
|
|||
private Handler refreshHandler = new Handler();
|
||||
private TextView statusText;
|
||||
private ImageView statusLed, callQuality, encryption;
|
||||
private SlidingDrawer drawer;
|
||||
private Runnable mCallQualityUpdater;
|
||||
private boolean isInCall, isAttached = false;
|
||||
|
||||
|
@ -54,6 +56,8 @@ public class StatusFragment extends Fragment {
|
|||
callQuality = (ImageView) view.findViewById(R.id.callQuality);
|
||||
encryption = (ImageView) view.findViewById(R.id.encryption);
|
||||
|
||||
drawer = (SlidingDrawer) view.findViewById(R.id.statusBar);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -84,6 +88,18 @@ public class StatusFragment extends Fragment {
|
|||
isAttached = false;
|
||||
}
|
||||
|
||||
public void openOrCloseStatusBar() {
|
||||
if (getResources().getBoolean(R.bool.lock_statusbar)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (getResources().getBoolean(R.bool.disable_animations)) {
|
||||
drawer.toggle();
|
||||
} else {
|
||||
drawer.animateToggle();
|
||||
}
|
||||
}
|
||||
|
||||
public void registrationStateChanged(final RegistrationState state) {
|
||||
if (!isAttached)
|
||||
return;
|
||||
|
@ -173,6 +189,14 @@ public class StatusFragment extends Fragment {
|
|||
// We are obviously connected
|
||||
statusLed.setImageResource(R.drawable.led_connected);
|
||||
statusText.setText(getString(R.string.status_connected));
|
||||
|
||||
if (drawer != null) {
|
||||
drawer.lock();
|
||||
}
|
||||
} else {
|
||||
if (drawer != null && !getResources().getBoolean(R.bool.lock_statusbar)) {
|
||||
drawer.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|