fix numpad and incoming/outgoing view

This commit is contained in:
Margaux Clerc 2015-10-15 18:52:14 +02:00
parent a68f8010a0
commit fa0f35f4e0
4 changed files with 143 additions and 87 deletions

View file

@ -12,11 +12,17 @@
android:layout_height="40dp" android:layout_height="40dp"
tools:layout="@layout/status" /> tools:layout="@layout/status" />
<FrameLayout
<android.support.v4.widget.DrawerLayout
android:id="@+id/call_stats"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/status" android:layout_below="@id/status">
android:layout_above="@id/menu">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/status">
<LinearLayout <LinearLayout
android:id="@+id/fragmentContainer" android:id="@+id/fragmentContainer"
@ -24,6 +30,11 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" /> android:orientation="horizontal" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/menu">
<LinearLayout <LinearLayout
android:id="@+id/conferenceCalls" android:id="@+id/conferenceCalls"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -37,27 +48,26 @@
<RelativeLayout <RelativeLayout
android:id="@+id/activeCallHeader" android:id="@+id/activeCallHeader"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:visibility="visible"> android:visibility="visible">
<ImageView <LinearLayout
android:id="@+id/contactPicture" android:id="@+id/call_header_description"
android:src="@drawable/avatar" android:layout_width="match_parent"
android:layout_width="200dp" android:layout_height="80dp"
android:layout_height="200dp"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:paddingBottom="10dp"/> android:orientation="vertical"
android:background="@color/colorH"
android:alpha="0.8">
<TextView <TextView
android:id="@+id/contactNameOrNumber" android:id="@+id/contactNameOrNumber"
style="@style/font5" style="@style/font5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10dp" android:paddingTop="5dp"
android:layout_below="@id/contactPicture" android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"/> android:layout_gravity="center"/>
<Chronometer <Chronometer
android:id="@+id/callTimer" android:id="@+id/callTimer"
@ -65,21 +75,69 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/contactNameOrNumber" android:layout_below="@id/contactNameOrNumber"
android:layout_centerHorizontal="true"/> android:layout_gravity="center"/>
</LinearLayout>
<ImageView <ImageView
android:id="@+id/pause" android:id="@+id/pause"
android:contentDescription="@string/content_description_pause" android:contentDescription="@string/content_description_pause"
android:layout_width="wrap_content" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="80dp"
android:padding="10dp"
android:src="@drawable/pause_big_default" android:src="@drawable/pause_big_default"
android:layout_marginRight="20dp" android:layout_below="@+id/call_header_description"
android:layout_above="@+id/contactNameOrNumber" android:layout_alignParentRight="true"/>
android:layout_toRightOf="@+id/contactPicture"
android:layout_toEndOf="@+id/contactPicture"/> <RelativeLayout
android:id="@+id/avatar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/call_header_description"
android:gravity="center">
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="200dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"/>
<ImageView
android:id="@+id/mask"
android:src="@drawable/avatar_mask_border"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="200dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"/>
</RelativeLayout> </RelativeLayout>
<ImageView
android:id="@+id/switchCamera"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="10dp"
android:contentDescription="@string/content_description_switch_camera"
android:visibility="invisible"
android:src="@drawable/switch_camera"
android:layout_below="@+id/call_header_description"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/calls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/activeCallHeader"
android:layout_alignParentBottom="true"
android:background="@color/colorH"
android:layout_gravity="bottom"
android:orientation="vertical">
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/noCurrentCall" android:id="@+id/noCurrentCall"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -103,38 +161,17 @@
android:layout_gravity="center"/> android:layout_gravity="center"/>
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/calls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/activeCallHeader"
android:layout_alignParentBottom="true"
android:background="@color/colorH"
android:layout_gravity="bottom"
android:orientation="vertical">
</LinearLayout>
</FrameLayout> </FrameLayout>
<ImageView
android:id="@+id/switchCamera"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_alignParentLeft="true"
android:padding="10dp"
android:contentDescription="@string/content_description_switch_camera"
android:layout_marginTop="40dp"
android:visibility="invisible"
android:src="@drawable/switch_camera" />
<org.linphone.ui.Numpad <org.linphone.ui.Numpad
android:contentDescription="@string/content_description_numpad" android:contentDescription="@string/content_description_numpad"
android:id="@+id/numpad" android:id="@+id/numpad"
android:background="@color/colorF" android:background="@color/colorF"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone" android:visibility="gone"
android:layout_margin="10dp"
android:layout_above="@id/menu"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/> android:layout_centerVertical="true"/>
@ -154,12 +191,13 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="25dp" android:background="@drawable/button_background"
android:layout_weight="1"> android:layout_weight="1">
<ImageView <ImageView
android:id="@+id/video" android:id="@+id/video"
android:src="@drawable/camera_default" android:src="@drawable/camera_default"
android:padding="25dp"
android:background="@drawable/button_background" android:background="@drawable/button_background"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
@ -271,12 +309,12 @@
android:visibility="invisible" android:visibility="invisible"
android:layout_weight="0.5"/> android:layout_weight="0.5"/>
<TextView <ImageView
android:id="@+id/routeBluetooth" android:id="@+id/routeBluetooth"
android:src="@drawable/route_bluetooth"
android:background="@drawable/button_background"
android:padding="20dp"
android:visibility="invisible" android:visibility="invisible"
android:text="@string/button_bluetooth"
android:gravity="center"
android:textColor="@drawable/text_incall_button_color"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.5" /> android:layout_weight="0.5" />
@ -312,10 +350,12 @@
android:visibility="invisible" android:visibility="invisible"
android:layout_weight="0.5"/> android:layout_weight="0.5"/>
<TextView <ImageView
android:id="@+id/routeReceiver" android:id="@+id/routeEarpiece"
android:src="@drawable/route_earpiece"
android:background="@drawable/button_background"
android:padding="20dp"
android:visibility="invisible" android:visibility="invisible"
android:gravity="center"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.5"/> android:layout_weight="0.5"/>
@ -350,11 +390,12 @@
android:visibility="invisible" android:visibility="invisible"
android:layout_weight="0.5"/> android:layout_weight="0.5"/>
<TextView <ImageView
android:id="@+id/routeSpeaker" android:id="@+id/routeSpeaker"
android:src="@drawable/route_speaker"
android:background="@drawable/button_background"
android:visibility="invisible" android:visibility="invisible"
android:gravity="center" android:padding="20dp"
android:paddingTop="40dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.5"/> android:layout_weight="0.5"/>
@ -371,5 +412,21 @@
</LinearLayout> </LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/side_menu_content"
android:layout_gravity="left"
android:background="@color/colorH">
<include layout="@layout/incall_stats" android:id="@+id/incall_stats"/>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -40,23 +40,22 @@
<TextView <TextView
android:id="@+id/contact_name" android:id="@+id/contact_name"
style="@style/font5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:textAlignment="center"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:padding="5dp" android:paddingTop="5dp"/>
style="@style/font5"/>
<TextView <TextView
android:id="@+id/contact_number" android:id="@+id/contact_number"
style="@style/font2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/font2"
android:layout_below="@id/contact_name" android:layout_below="@id/contact_name"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:padding="5dp"/> android:paddingBottom="10dp"/>
<RelativeLayout <RelativeLayout
android:id="@+id/avatar_layout" android:id="@+id/avatar_layout"

View file

@ -40,23 +40,22 @@
<TextView <TextView
android:id="@+id/contact_name" android:id="@+id/contact_name"
style="@style/font5"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:textAlignment="center"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:padding="5dp" android:paddingTop="5dp"/>
style="@style/font5"/>
<TextView <TextView
android:id="@+id/contact_number" android:id="@+id/contact_number"
style="@style/font2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/font2"
android:layout_below="@id/contact_name" android:layout_below="@id/contact_name"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:padding="5dp"/> android:paddingBottom="10dp"/>
<RelativeLayout <RelativeLayout
android:id="@+id/avatar_layout" android:id="@+id/avatar_layout"

View file

@ -118,7 +118,7 @@ public class CallActivity extends Activity implements OnClickListener {
instance = this; instance = this;
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
setContentView(R.layout.incall); setContentView(R.layout.call);
isTransferAllowed = getApplicationContext().getResources().getBoolean(R.bool.allow_transfers); isTransferAllowed = getApplicationContext().getResources().getBoolean(R.bool.allow_transfers);
@ -320,6 +320,7 @@ public class CallActivity extends Activity implements OnClickListener {
dialer.setOnClickListener(this); dialer.setOnClickListener(this);
numpad = (Numpad) findViewById(R.id.numpad); numpad = (Numpad) findViewById(R.id.numpad);
numpad.getBackground().setAlpha(240);
//Others //Others