improved calls/messages/contacts implemtation
used vector image assets
This commit is contained in:
@@ -1,49 +1,30 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="com.tutpro.baresip.ContactsActivity">
|
||||
tools:context=".ContactsActivity">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="fill_parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/newName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="20sp"
|
||||
android:inputType="textPersonName"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginStart="0dp"
|
||||
android:hint="Name of Contact" >
|
||||
</EditText>
|
||||
<ImageButton
|
||||
android:id="@+id/plusButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/plus"
|
||||
android:background="@null"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true" >
|
||||
</ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/addContact"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:src="@drawable/action_add"
|
||||
android:scaleType="centerCrop" >
|
||||
</ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
@@ -1,131 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".MainActivity"
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true" >
|
||||
android:layout_marginBottom="10dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mainActivityLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin">
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true" >
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/AoRList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:drawable/btn_dropdown"
|
||||
android:spinnerMode="dropdown"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/outTitle"
|
||||
<RelativeLayout
|
||||
android:id="@+id/mainActivityLayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/AoRList"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingStart="3dp"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="Outgoing call to ..." >
|
||||
</TextView>
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/calleeRow"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/outTitle" >
|
||||
<Spinner
|
||||
android:id="@+id/AoRList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:drawable/btn_dropdown"
|
||||
android:spinnerMode="dropdown"/>
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/callee"
|
||||
<TextView
|
||||
android:id="@+id/outTitle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight = "1"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_below="@id/AoRList"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingStart="3dp"
|
||||
android:textSize="20sp"
|
||||
android:hint="Callee" >
|
||||
<!-- <requestFocus /> -->
|
||||
</AutoCompleteTextView>
|
||||
android:textColor="@android:color/black"
|
||||
android:text="Outgoing call to ..." >
|
||||
</TextView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/calleeRow"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/outTitle" >
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/callee"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight = "1"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textSize="20sp"
|
||||
android:hint="Callee" >
|
||||
<!-- <requestFocus /> -->
|
||||
</AutoCompleteTextView>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/securityButton"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight = "0"
|
||||
android:layout_gravity = "center_vertical"
|
||||
android:visibility="invisible"
|
||||
android:contentDescription="@string/app_name" >
|
||||
</ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/securityButton"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight = "0"
|
||||
android:layout_gravity = "center_vertical"
|
||||
android:visibility="invisible"
|
||||
android:contentDescription="@string/app_name" >
|
||||
android:id="@+id/callButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:padding="0dp"
|
||||
android:background="@null"
|
||||
android:src="@drawable/call_green" >
|
||||
</ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/holdButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/pause"
|
||||
android:background="@null"
|
||||
android:layout_marginStart="70dp"
|
||||
android:visibility="invisible" >
|
||||
</ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/callButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/call" >
|
||||
</ImageButton>
|
||||
<EditText
|
||||
android:id="@+id/dtmf"
|
||||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:layout_marginStart="140dp"
|
||||
android:inputType="phone"
|
||||
android:textSize="20sp"
|
||||
android:hint="DTMF"
|
||||
android:visibility="invisible" >
|
||||
</EditText>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/holdButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/hold"
|
||||
android:layout_marginStart="70dp"
|
||||
android:visibility="invisible" >
|
||||
</ImageButton>
|
||||
</RelativeLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dtmf"
|
||||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:layout_marginStart="140dp"
|
||||
android:inputType="phone"
|
||||
android:textSize="20sp"
|
||||
android:hint="DTMF"
|
||||
android:visibility="invisible" >
|
||||
</EditText>
|
||||
</ScrollView>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/messagesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:layout_toStartOf="@id/callsButton"
|
||||
android:padding="0dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@null"
|
||||
android:src="@drawable/messages"
|
||||
android:visibility="visible" >
|
||||
</ImageButton>
|
||||
<ImageButton
|
||||
android:id="@+id/contactsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:src="@drawable/contacts"
|
||||
android:layout_toStartOf="@id/messagesButton"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_alignParentBottom="true" >
|
||||
</ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/callsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/calleeRow"
|
||||
android:padding="0dp"
|
||||
android:background="@null"
|
||||
android:src="@drawable/calls"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:visibility="visible" >
|
||||
</ImageButton>
|
||||
<ImageButton
|
||||
android:id="@+id/messagesButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:src="@drawable/messages"
|
||||
android:layout_toStartOf="@id/callsButton"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_alignParentBottom="true" >
|
||||
</ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/callsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:background="@null"
|
||||
android:src="@drawable/calls"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true" >
|
||||
</ImageButton>
|
||||
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -38,13 +39,30 @@
|
||||
android:hint="Message">
|
||||
</EditText>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/sendButton"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/send"
|
||||
android:background="@null" >
|
||||
</ImageButton>
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/sendButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/send"
|
||||
android:background="@null" >
|
||||
</ImageButton>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/callButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:src="@drawable/call"
|
||||
android:background="@null" >
|
||||
</ImageButton>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="com.tutpro.baresip.MessagesActivity">
|
||||
tools:context=".MessagesActivity">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/message"
|
||||
android:id="@+id/messages"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
|
||||
|
||||
@@ -13,17 +13,4 @@
|
||||
android:layout_marginBottom="6dp">
|
||||
</TextView>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/contactAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:icon="@android:drawable/ic_menu_delete"
|
||||
android:scaleType="centerCrop" >
|
||||
</ImageButton>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
Reference in New Issue
Block a user