Rename ui parts

This commit is contained in:
Margaux Clerc 2015-10-26 19:15:11 +01:00
parent b9f6cbd3b7
commit 4e9151ad79
4 changed files with 28 additions and 30 deletions

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?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"
android:background="@color/colorH"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/colorH"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:id="@+id/topbar" android:id="@+id/top_bar"
android:background="@color/colorF" android:background="@color/colorF"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="70dp"> android:layout_height="70dp">
@ -47,7 +47,7 @@
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
<TextView <TextView
android:id="@+id/AboutText" android:id="@+id/about_text"
android:text="@string/about_text" android:text="@string/about_text"
style="@style/font9" style="@style/font9"
android:layout_gravity="center" android:layout_gravity="center"
@ -56,7 +56,7 @@
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
<TextView <TextView
android:id="@+id/AboutLink" android:id="@+id/about_link"
android:text="@string/about_link" android:text="@string/about_link"
android:autoLink="web" android:autoLink="web"
style="@style/font9" style="@style/font9"

View file

@ -5,7 +5,7 @@
android:background="@color/colorH"> android:background="@color/colorH">
<RelativeLayout <RelativeLayout
android:id="@+id/AddressBar" android:id="@+id/address_bar"
android:background="@color/colorF" android:background="@color/colorF"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="60dp"
@ -13,29 +13,29 @@
android:layout_alignParentTop="true"> android:layout_alignParentTop="true">
<org.linphone.ui.EraseButton <org.linphone.ui.EraseButton
android:id="@+id/Erase" android:id="@+id/erase"
android:src="@drawable/backspace"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp" />
android:src="@drawable/backspace" />
<org.linphone.ui.AddressText <org.linphone.ui.AddressText
android:id="@+id/Address" android:id="@+id/address"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorF" android:background="@color/colorF"
android:textColorHint="@color/colorE"
style="@style/font5"
android:ellipsize="start" android:ellipsize="start"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:hint="@string/address_bar_hint" android:hint="@string/address_bar_hint"
android:textColorHint="@color/colorE" android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="20dp" android:paddingLeft="20dp"
android:paddingRight="5dp" android:paddingRight="5dp"
android:layout_toLeftOf="@id/Erase" android:layout_toLeftOf="@id/erase"
android:layout_centerVertical="true" android:layout_centerVertical="true"/>
style="@style/font5"/>
</RelativeLayout> </RelativeLayout>
@ -47,33 +47,31 @@
android:layout_height="70dp"> android:layout_height="70dp">
<RelativeLayout <RelativeLayout
android:focusable="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:focusable="true"
android:background="@drawable/toolbar_button"
android:adjustViewBounds="true"> android:adjustViewBounds="true">
<ImageView <ImageView
android:id="@+id/addContact" android:id="@+id/add_contact"
android:src="@drawable/contact_add_button"
android:background="@drawable/toolbar_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="20dp" android:padding="20dp"
android:contentDescription="@string/content_description_contacts"
android:src="@drawable/contact_add_button"
android:layout_alignParentBottom="true"/> android:layout_alignParentBottom="true"/>
</RelativeLayout> </RelativeLayout>
<org.linphone.ui.CallButton <org.linphone.ui.CallButton
android:id="@+id/Call" android:id="@+id/call"
android:contentDescription="@string/content_description_call" android:src="@drawable/call_audio_start"
android:background="@drawable/call" android:background="@drawable/call"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="15dp" android:padding="15dp"
android:layout_weight="0.5" android:layout_weight="0.5"/>
android:src="@drawable/call_audio_start" />
</LinearLayout> </LinearLayout>
@ -84,7 +82,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="10dp" android:padding="10dp"
android:layout_above="@id/controls" android:layout_above="@id/controls"
android:layout_below="@id/AddressBar" android:layout_below="@id/address_bar"
android:layout_centerInParent="true"/> android:layout_centerInParent="true"/>
</RelativeLayout> </RelativeLayout>

View file

@ -43,7 +43,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.about, container, false); View view = inflater.inflate(R.layout.about, container, false);
TextView aboutText = (TextView) view.findViewById(R.id.AboutText); TextView aboutText = (TextView) view.findViewById(R.id.about_text);
try { try {
aboutText.setText(String.format(getString(R.string.about_text), getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0).versionName)); aboutText.setText(String.format(getString(R.string.about_text), getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0).versionName));
} catch (NameNotFoundException e) { } catch (NameNotFoundException e) {

View file

@ -56,13 +56,13 @@ public class DialerFragment extends Fragment {
instance = this; instance = this;
View view = inflater.inflate(R.layout.dialer, container, false); View view = inflater.inflate(R.layout.dialer, container, false);
mAddress = (AddressText) view.findViewById(R.id.Address); mAddress = (AddressText) view.findViewById(R.id.address);
mAddress.setDialerFragment(this); mAddress.setDialerFragment(this);
EraseButton erase = (EraseButton) view.findViewById(R.id.Erase); EraseButton erase = (EraseButton) view.findViewById(R.id.erase);
erase.setAddressWidget(mAddress); erase.setAddressWidget(mAddress);
mCall = (CallButton) view.findViewById(R.id.Call); mCall = (CallButton) view.findViewById(R.id.call);
mCall.setAddressWidget(mAddress); mCall.setAddressWidget(mAddress);
if (LinphoneActivity.isInstanciated() && LinphoneManager.getLc().getCallsNb() > 0) { if (LinphoneActivity.isInstanciated() && LinphoneManager.getLc().getCallsNb() > 0) {
if (isCallTransferOngoing) { if (isCallTransferOngoing) {
@ -79,7 +79,7 @@ public class DialerFragment extends Fragment {
numpad.setAddressWidget(mAddress); numpad.setAddressWidget(mAddress);
} }
mAddContact = (ImageView) view.findViewById(R.id.addContact); mAddContact = (ImageView) view.findViewById(R.id.add_contact);
mAddContact.setEnabled(!(LinphoneActivity.isInstanciated() && LinphoneManager.getLc().getCallsNb() > 0)); mAddContact.setEnabled(!(LinphoneActivity.isInstanciated() && LinphoneManager.getLc().getCallsNb() > 0));
addContactListener = new OnClickListener() { addContactListener = new OnClickListener() {