Update ui
This commit is contained in:
parent
69ecac7d0b
commit
d7fc044957
4 changed files with 19 additions and 138 deletions
|
@ -2,44 +2,39 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:background="@color/colorH"
|
android:background="@color/colorH"
|
||||||
|
android:orientation="vertical"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:contentDescription="@string/content_description_welcome"
|
android:src="@drawable/linphone_orange"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
android:padding="10dp" />
|
||||||
android:src="@drawable/linphone_orange" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:id="@+id/textView1"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:textSize="30dp" />
|
style="@style/font5"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/AboutText"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/about_text"
|
android:text="@string/about_text"
|
||||||
|
style="@style/font9"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textStyle="bold"
|
android:layout_width="wrap_content"
|
||||||
android:textColor="@color/colorB"
|
android:layout_height="wrap_content"/>
|
||||||
android:id="@+id/AboutText"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/AboutLink"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/about_link"
|
android:text="@string/about_link"
|
||||||
android:autoLink="web"
|
android:autoLink="web"
|
||||||
|
style="@style/font9"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textStyle="bold"
|
android:layout_width="wrap_content"
|
||||||
android:textColor="@color/colorB"
|
android:layout_height="wrap_content"/>
|
||||||
android:id="@+id/AboutLink"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:text="@string/call_update_desc"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/call_update_yes"
|
|
||||||
android:id="@+id/yes" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="@string/call_update_no"
|
|
||||||
android:id="@+id/no" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
|
@ -2,22 +2,24 @@
|
||||||
<RelativeLayout 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_width="match_parent"
|
||||||
android:background="@color/colorG"
|
android:background="@color/colorG"
|
||||||
android:layout_height="30dp"
|
android:layout_height="40dp"
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/address"
|
android:id="@+id/address"
|
||||||
style="@style/font13"
|
style="@style/font13"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/statusLed"
|
android:id="@+id/statusLed"
|
||||||
|
android:src="@drawable/status_available"
|
||||||
android:layout_width="25dp"
|
android:layout_width="25dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="25dp"
|
||||||
android:src="@drawable/status_available"
|
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:layout_alignParentRight="true"/>
|
android:layout_alignParentRight="true"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
/*
|
|
||||||
AcceptCallUpdateDialogFragment.java
|
|
||||||
Copyright (C) 2014 Belledonne Communications, Grenoble, France
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License
|
|
||||||
as published by the Free Software Foundation; either version 2
|
|
||||||
of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
package org.linphone;
|
|
||||||
|
|
||||||
import org.linphone.mediastream.Log;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.app.DialogFragment;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("ValidFragment")
|
|
||||||
public class AcceptCallUpdateDialogFragment extends DialogFragment {
|
|
||||||
|
|
||||||
public AcceptCallUpdateDialogFragment() {
|
|
||||||
// Empty constructor required for DialogFragment
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
|
||||||
View view = inflater.inflate(R.layout.accept_call_update_dialog, container);
|
|
||||||
|
|
||||||
getDialog().setTitle(R.string.call_update_title);
|
|
||||||
|
|
||||||
Button yes = (Button) view.findViewById(R.id.yes);
|
|
||||||
yes.setOnClickListener(new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (InCallActivity.isInstanciated()) {
|
|
||||||
Log.d("Call Update Accepted");
|
|
||||||
InCallActivity.instance().acceptCallUpdate(true);
|
|
||||||
}
|
|
||||||
dismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Button no = (Button) view.findViewById(R.id.no);
|
|
||||||
no.setOnClickListener(new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (InCallActivity.isInstanciated()) {
|
|
||||||
Log.d("Call Update Denied");
|
|
||||||
InCallActivity.instance().acceptCallUpdate(false);
|
|
||||||
}
|
|
||||||
dismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCancel(DialogInterface dialog) {
|
|
||||||
super.onCancel(dialog);
|
|
||||||
InCallActivity.instance().acceptCallUpdate(false);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue