Skip to content
Snippets Groups Projects
Commit 573045c9 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

* #29924: ui adjustements

parent c51ccb1a
No related branches found
No related tags found
No related merge requests found
......@@ -51,10 +51,11 @@ as that of the covered work.
<TextView
android:id="@+id/empty_list_contact"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="No data" />
android:textSize="40sp"
android:text="No contact found" />
<!-- <TextView -->
<!-- android:id="@+id/empty_list_starred" -->
......
......@@ -10,7 +10,8 @@
android:id="@+id/textField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
android:layout_alignParentTop="true"
android:background="@drawable/item_call_selector" />
<LinearLayout
android:id="@+id/keyboard_choice"
......@@ -28,7 +29,6 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="123" />
<Button
......@@ -37,8 +37,6 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:text="ABC" />
</LinearLayout>
<ImageButton
......
......@@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lighter_gray"
android:orientation="vertical"
android:paddingLeft="8dp"
......@@ -12,7 +13,7 @@
style="@style/CallElementList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
android:layout_margin="10dp" />
<TextView
android:id="@id/android:empty"
......@@ -20,6 +21,7 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:text="No history" />
android:text="No history"
android:textSize="30sp" />
</LinearLayout>
\ No newline at end of file
......@@ -34,71 +34,101 @@ as that of the covered work.
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lighter_gray"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp" >
<LinearLayout
android:id="@+id/linear1"
<RelativeLayout
android:id="@+id/calls_layouts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/linear2"
android:layout_alignParentLeft="true"
android:orientation="horizontal"
android:weightSum="4" >
android:layout_height="100dp"
android:layout_alignParentTop="true"
android:layout_margin="10dp"
android:background="@drawable/item_call_selector" >
<TextView
android:id="@+id/calls_counter"
android:layout_width="0dp"
<LinearLayout
android:id="@+id/linear1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="0"
android:textSize="40sp" />
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:weightSum="4" >
<TextView
android:id="@+id/calls_counter"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="0"
android:textSize="40sp" />
<TextView
android:id="@+id/textView2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="Calls"
android:textSize="30sp" />
</LinearLayout>
<TextView
android:id="@+id/textView2"
android:layout_width="0dp"
<ListView
android:id="@+id/calls_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="Calls"
android:textSize="30sp" />
</LinearLayout>
android:layout_alignParentBottom="true"
android:layout_below="@+id/linear1" >
</ListView>
</RelativeLayout>
<LinearLayout
android:id="@+id/linear2"
<RelativeLayout
android:id="@+id/confs_layouts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerInParent="true"
android:orientation="horizontal"
android:weightSum="4" >
android:layout_height="100dp"
android:layout_below="@+id/calls_layouts"
android:layout_margin="10dp"
android:background="@drawable/item_call_selector" >
<TextView
android:id="@+id/confs_counter"
android:layout_width="0dp"
<LinearLayout
android:id="@+id/linear2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="0"
android:textSize="40sp" />
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:weightSum="4" >
<TextView
android:id="@+id/confs_counter"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="0"
android:textSize="40sp" />
<TextView
android:id="@+id/textView4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="Conferences"
android:textSize="30sp" />
</LinearLayout>
<TextView
android:id="@+id/textView4"
android:layout_width="0dp"
<ListView
android:id="@+id/confs_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="Conferences"
android:textSize="30sp" />
</LinearLayout>
android:layout_alignParentBottom="true"
android:layout_below="@+id/linear2" >
</ListView>
</RelativeLayout>
<Button
android:id="@+id/access_callactivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_below="@+id/confs_layouts"
android:layout_centerHorizontal="true"
android:layout_marginBottom="134dp"
android:text="Go to current calls"
android:visibility="gone" />
......
......@@ -179,6 +179,7 @@ public class ContactListFragment extends Fragment implements OnQueryTextListener
});
list.setOnItemLongClickListener(mItemLongClickListener);
list.setEmptyView(inflatedView.findViewById(R.id.empty_list_contact));
View header = inflater.inflate(R.layout.frag_contact_list_header, null);
list.addHeaderView(header, null, false);
TACGridView grid = (TACGridView) header.findViewById(R.id.favorites_grid);
......
......@@ -44,6 +44,7 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
......@@ -58,6 +59,7 @@ public class HomeFragment extends Fragment {
private Callbacks mCallbacks = sDummyCallbacks;
Button access_calls;
TextView nb_calls, nb_confs;
ListView list_calls, list_confs;
/**
* A dummy implementation of the {@link Callbacks} interface that does nothing. Used only when this fragment is not attached to an activity.
......@@ -106,10 +108,10 @@ public class HomeFragment extends Fragment {
try {
HashMap<String, SipCall> calls = (HashMap<String, SipCall>) mCallbacks.getService().getCallList();
HashMap<String, Conference> confs = (HashMap<String, Conference>) mCallbacks.getService().getConferenceList();
Log.i(TAG, "Call size " + calls.size());
nb_calls.setText(""+calls.size());
nb_confs.setText(""+confs.size());
updateCallList(calls);
updateConferenceList(confs);
if(!calls.isEmpty() || !confs.isEmpty()){
access_calls.setVisibility(View.VISIBLE);
} else {
......@@ -124,6 +126,15 @@ public class HomeFragment extends Fragment {
}
private void updateConferenceList(HashMap<String, Conference> confs) {
nb_confs.setText(""+confs.size());
}
private void updateCallList(HashMap<String, SipCall> calls) {
nb_calls.setText(""+calls.size());
}
@Override
public void onDetach() {
super.onDetach();
......@@ -165,6 +176,9 @@ public class HomeFragment extends Fragment {
nb_calls = (TextView) inflatedView.findViewById(R.id.calls_counter);
nb_confs = (TextView) inflatedView.findViewById(R.id.confs_counter);
list_calls = (ListView) inflatedView.findViewById(R.id.calls_list);
list_confs = (ListView) inflatedView.findViewById(R.id.confs_list);
access_calls.setOnClickListener(new OnClickListener() {
@Override
......
......@@ -6,6 +6,7 @@ import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;
......@@ -37,7 +38,8 @@ public class ClearableEditText extends RelativeLayout {
inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.clearable_edit_text, this, true);
edit_text = (EditText) findViewById(R.id.clearable_edit);
edit_text.setSingleLine();
edit_text.setImeOptions(EditorInfo.IME_ACTION_DONE);
btn_clear = (Button) findViewById(R.id.clearable_button_clear);
btn_clear.setVisibility(RelativeLayout.INVISIBLE);
clearText();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment