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

ui: added v3 background

parent 5079b45f
No related branches found
No related tags found
No related merge requests found
res/drawable/bg_72.png

39.7 KiB

......@@ -2,16 +2,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/sfl_light_blue"
android:background="@drawable/bg_72"
android:divider="@drawable/divider"
android:orientation="vertical"
android:showDividers="middle" >
<RelativeLayout
style="?android:attr/actionBarSplitStyle"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@null" >
android:layout_height="?android:attr/actionBarSize" >
<ImageView
android:id="@+id/button1"
......@@ -38,8 +36,8 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/dialpad_btn"
android:singleLine="true"
android:maxWidth="80dp"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/white" />
......@@ -51,7 +49,7 @@
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="#00000000"
android:src="@drawable/ic_action_dial_pad" />
android:src="@drawable/ic_action_dial_pad_light" />
</RelativeLayout>
<org.sflphone.model.BubblesView
......
......@@ -2,10 +2,9 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
android:layout_marginLeft="15dp"
android:background="@color/lighter_gray"
android:layout_marginRight="15dp"
android:layout_marginTop="15dp"
android:padding="5dp" >
<org.sflphone.views.ClearableEditText
......
......@@ -2,7 +2,6 @@
<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"
android:paddingRight="8dp" >
......
......@@ -32,8 +32,7 @@ as that of the covered work.
<RelativeLayout 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:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/calls_layouts"
......
......@@ -38,11 +38,15 @@ import org.sflphone.R;
import org.sflphone.fragments.CallFragment;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Paint.Style;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.os.Handler;
import android.os.Message;
......@@ -56,7 +60,6 @@ import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.Toast;
public class BubblesView extends SurfaceView implements SurfaceHolder.Callback, OnTouchListener {
private static final String TAG = BubblesView.class.getSimpleName();
......@@ -72,6 +75,8 @@ public class BubblesView extends SurfaceView implements SurfaceHolder.Callback,
private float density;
private float textDensity;
private Bitmap mBackground;
private boolean dragging_bubble = false;
private CallFragment callback;
......@@ -79,6 +84,8 @@ public class BubblesView extends SurfaceView implements SurfaceHolder.Callback,
public BubblesView(Context context, AttributeSet attrs) {
super(context, attrs);
Bitmap tmp = BitmapFactory.decodeResource(getResources(), R.drawable.bg_72);
mBackground = Bitmap.createScaledBitmap(tmp, getResources().getDisplayMetrics().widthPixels, getResources().getDisplayMetrics().heightPixels, false);
density = getResources().getDisplayMetrics().density;
textDensity = getResources().getDisplayMetrics().scaledDensity;
......@@ -253,7 +260,7 @@ public class BubblesView extends SurfaceView implements SurfaceHolder.Callback,
}
/**
* I got multiple IndexOutOfBoundsException, when switching calls. //FIXME
* got multiple IndexOutOfBoundsException, when switching calls. //FIXME
*
* @param canvas
*/
......@@ -265,7 +272,12 @@ public class BubblesView extends SurfaceView implements SurfaceHolder.Callback,
Paint tryMe = new Paint();
canvas.drawColor(getResources().getColor(R.color.sfl_light_blue));
Paint paint = new Paint();
paint.setXfermode(new PorterDuffXfermode(Mode.CLEAR));
canvas.drawPaint(paint);
paint.setXfermode(new PorterDuffXfermode(Mode.SRC));
// canvas.drawColor(Color.LTGRAY);
if (dragging_bubble) {
Paint p = new Paint();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment