mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Fix first view + some crash
This commit is contained in:
parent
895a8ff2f8
commit
8de8b37505
7 changed files with 194 additions and 114 deletions
|
|
@ -7,125 +7,193 @@
|
|||
android:background="@color/colorH"
|
||||
android:gravity="center">
|
||||
|
||||
<RelativeLayout
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.1"
|
||||
android:gravity="center">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/instruction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/bottom_text"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:lineSpacingExtra="0sp"
|
||||
android:paddingEnd="35dp"
|
||||
android:paddingStart="35dp"
|
||||
android:text="@string/assistant_instruction1"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/step"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/instruction"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/assistant_step1"
|
||||
android:textColor="#ff6600"
|
||||
android:textSize="16.7sp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/header_text"
|
||||
<SurfaceView
|
||||
android:id="@+id/qrcodeCaptureSurface"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_weight="10"
|
||||
android:visibility="visible"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="0.1"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorH">
|
||||
</View>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relative_layout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/imageView3"
|
||||
android:text="Bienvenue sur
|
||||
Mobile Security Intense"
|
||||
android:textColor="#595959"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="20dp"
|
||||
android:src="@drawable/logo_secure_phone_big"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/bottom_text"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="250dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<SurfaceView
|
||||
android:id="@+id/qrcodeCaptureSurface"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_weight="10"
|
||||
android:foreground="@drawable/avatar_mask_border"
|
||||
android:visibility="visible"/>
|
||||
android:background="@color/colorH">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/code_sms"
|
||||
<LinearLayout
|
||||
android:id="@+id/header_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/logo_secure_phone_big"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="Bienvenue sur
|
||||
Mobile Security Intense"
|
||||
android:textColor="#595959"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/step"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/header_text"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/assistant_step1"
|
||||
android:textColor="#ff6600"
|
||||
android:textSize="16.7sp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/instruction"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/step"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:lineSpacingExtra="0sp"
|
||||
android:paddingEnd="35dp"
|
||||
android:paddingStart="35dp"
|
||||
android:text="@string/assistant_instruction1"
|
||||
android:textColor="#000000"
|
||||
android:textSize="20sp"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relative_layout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="#c4c4c4"
|
||||
android:maxLines="1"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/colorB"
|
||||
android:visibility="gone"/>
|
||||
android:layout_height="250dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@+id/relative_layout1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/valider"
|
||||
<LinearLayout
|
||||
android:id="@+id/bottom_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorH">
|
||||
</View>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView4"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="250dp"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/avatar_mask_border"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_button"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorH"
|
||||
android:visibility="gone">
|
||||
|
||||
<Button
|
||||
android:id="@+id/retour"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@+id/valider"
|
||||
android:background="#595959"
|
||||
android:text="retour"
|
||||
android:textColor="#ffffff"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/valider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@+id/code_sms"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="#ff6600"
|
||||
android:text="valider"
|
||||
android:textColor="#ffffff"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/code_sms"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="#c4c4c4"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/colorB"
|
||||
android:visibility="gone"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorH">
|
||||
</View>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@+id/code_sms"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="#ff6600"
|
||||
android:text="valider"
|
||||
android:textColor="#ffffff"
|
||||
android:visibility="gone"/>
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorH">
|
||||
</View>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/retour"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@+id/valider"
|
||||
android:background="#595959"
|
||||
android:text="retour"
|
||||
android:textColor="#ffffff"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -50,7 +50,6 @@ activation_code_length=4
|
|||
prefer_basic_chat_room=0
|
||||
show_login_view=1
|
||||
debug_popup_magic=#1234
|
||||
debug=1
|
||||
server_url=http://85.233.205.218:443/xmlrpc
|
||||
|
||||
[in-app-purchase]
|
||||
|
|
|
|||
|
|
@ -868,7 +868,7 @@ public final class LinphoneUtils {
|
|||
|
||||
public static Spanned getTextWithHttpLinks(String text) {
|
||||
if (text == null) return null;
|
||||
|
||||
|
||||
if (text.contains("<")) {
|
||||
text = text.replace("<", "<");
|
||||
}
|
||||
|
|
@ -917,7 +917,10 @@ public final class LinphoneUtils {
|
|||
for (ChatRoom cr : lc.getChatRooms()) {
|
||||
if (cr != null && cr.getParticipants() != null) {
|
||||
for (Participant pa : cr.getParticipants()) {
|
||||
if (pa.getAddress() != null && pa.getAddress().asStringUriOnly().compareTo(sipUri.asStringUriOnly()) == 0) {
|
||||
if (pa.getAddress() != null
|
||||
&& pa.getAddress().asStringUriOnly() != null
|
||||
&& sipUri.asStringUriOnly() != null
|
||||
&& pa.getAddress().asStringUriOnly().compareTo(sipUri.asStringUriOnly()) == 0) {
|
||||
return pa.getSecurityLevel();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ import android.view.View.OnClickListener;
|
|||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
|
@ -73,9 +75,11 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
|
|||
private ProgressDialog progress;
|
||||
private String qrcodeString;
|
||||
private String remoteUrl;
|
||||
private RelativeLayout bottom;
|
||||
private LinearLayout bottom;
|
||||
private RelativeLayout layout_button;
|
||||
private CoreListenerStub mListener;
|
||||
private SurfaceView mQrcodeView;
|
||||
private ImageView mImageMask;
|
||||
private AndroidVideoWindowImpl androidVideoWindowImpl;
|
||||
private boolean cameraAuthorize = false;
|
||||
private boolean readQRCode = true;
|
||||
|
|
@ -96,10 +100,12 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
|
|||
}
|
||||
|
||||
mQrcodeView = (SurfaceView) findViewById(R.id.qrcodeCaptureSurface);
|
||||
bottom = (RelativeLayout) findViewById(R.id.bottom_text);
|
||||
bottom = (LinearLayout) findViewById(R.id.bottom_text);
|
||||
code_sms = (EditText) findViewById(R.id.code_sms);
|
||||
step = (TextView) findViewById(R.id.step);
|
||||
instruction = (TextView) findViewById(R.id.instruction);
|
||||
mImageMask = (ImageView) findViewById(R.id.imageView4);
|
||||
layout_button = (RelativeLayout) findViewById(R.id.layout_button);
|
||||
|
||||
ok = (Button) findViewById(R.id.valider);
|
||||
back = (Button) findViewById(R.id.retour);
|
||||
|
|
@ -107,7 +113,7 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
|
|||
ok.setOnClickListener(this);
|
||||
back.setOnClickListener(this);
|
||||
|
||||
mQrcodeView.setOnClickListener(new OnClickListener() {
|
||||
mImageMask.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (readQRCode && getPackageManager().checkPermission(Manifest.permission.CAMERA,
|
||||
|
|
@ -122,7 +128,6 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
|
|||
mListener = new CoreListenerStub() {
|
||||
@Override
|
||||
public void onQrcodeFound(Core lc, String result) {
|
||||
//TODO check validitée du qrcode
|
||||
instance.qrcodeString = result;
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
|
|
@ -191,9 +196,11 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
|
|||
|
||||
private void displayQrCode() {
|
||||
mQrcodeView.setVisibility(View.VISIBLE);
|
||||
mImageMask.setVisibility(View.VISIBLE);
|
||||
code_sms.setVisibility(View.GONE);
|
||||
ok.setVisibility(View.GONE);
|
||||
back.setVisibility(View.GONE);
|
||||
layout_button.setVisibility(View.GONE);
|
||||
|
||||
step.setText(getString(R.string.assistant_step1));
|
||||
instruction.setText(getString(R.string.assistant_instruction1));
|
||||
|
|
@ -203,9 +210,11 @@ public class RemoteProvisioningLoginActivity extends Activity implements OnClick
|
|||
|
||||
private void displayCodeSms() {
|
||||
mQrcodeView.setVisibility(View.GONE);
|
||||
mImageMask.setVisibility(View.GONE);
|
||||
code_sms.setVisibility(View.VISIBLE);
|
||||
ok.setVisibility(View.VISIBLE);
|
||||
back.setVisibility(View.VISIBLE);
|
||||
layout_button.setVisibility(View.VISIBLE);
|
||||
|
||||
step.setText(getString(R.string.assistant_step2));
|
||||
instruction.setText(getString(R.string.assistant_instruction2));
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
|||
clearSearchField.setOnClickListener(this);
|
||||
|
||||
searchField = (EditText) view.findViewById(R.id.searchField);
|
||||
searchField.clearFocus();
|
||||
searchField.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c9601870b236ee5090c2e38492ab70af84850163
|
||||
Subproject commit 386fd751b5797faa712c838187183ed833e7efb9
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit d05ff1f27f0ce9fd9612c2adcb02c203f49d5230
|
||||
Subproject commit 18453dd7135b8893ce6dc89abf715e9455e52fc5
|
||||
Loading…
Add table
Reference in a new issue