Ant script updated and working

This commit is contained in:
Sylvain Berfini 2012-05-15 12:31:10 +02:00
parent 13730c00d5
commit 4f69fd8b93
6 changed files with 27 additions and 31 deletions

View file

@ -638,28 +638,18 @@
<echo>----------</echo>
<echo>Handling Resources...</echo>
<exec executable="${aapt}" failonerror="true">
<arg value="package" />
<arg value="-f" />
<arg value="-v" />
<arg value="--version-code" />
<arg value="${version.code}" />
<arg value="--debug-mode" />
<arg value="-J" />
<arg path="${gen.absolute.dir}" />
<arg value="-M" />
<arg path="AndroidManifest.xml" />
<arg value="-I" />
<arg path="${android.jar}" />
<arg value="-F" />
<arg path="${out.absolute.dir}/${resource.package.file.name}" />
<arg value="-S" />
<arg path="${resource.absolute.dir}" />
<arg value="--rename-manifest-package"/>
<arg value="${linphone.package.name}"/>
<arg value="--custom-package" />
<arg value="${linphone.package.name}"/>
</exec>
<aapt executable="${aapt}"
command="package"
verbose="${verbose}"
manifest="AndroidManifest.xml"
androidjar="${android.jar}"
rfolder="${gen.absolute.dir}"
nonConstantId="${android.library}"
projectLibrariesResName="project.libraries.res"
projectLibrariesPackageName="project.libraries.package">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
</aapt>
</do-only-if-manifest-hasCode>
</target>
@ -866,8 +856,10 @@
<arg value="--version-code" />
<arg value="${version.code}" />
<arg value="--debug-mode" />
<arg value="-m" />
<arg value="-u" />
<arg value="-J" />
<arg path="${gen.absolute.dir}" />
<arg path="${gen.absolute.dir}" />
<arg value="-M" />
<arg path="AndroidManifest.xml" />
<arg value="-I" />

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ui="http://schemas.android.com/apk/res/org.linphone"
xmlns:ui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ui="http://schemas.android.com/apk/res/org.linphone"
xmlns:ui="http://schemas.android.com/apk/res-auto"
android:id="@+id/video_frame"
android:layout_height="fill_parent" android:layout_width="fill_parent">

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ui="http://schemas.android.com/apk/res/org.linphone"
xmlns:ui="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ui="http://schemas.android.com/apk/res/org.linphone"
xmlns:ui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

View file

@ -19,7 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
package org.linphone.ui;
import org.linphone.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
@ -37,7 +40,6 @@ import android.widget.ImageButton;
*
*/
public class ToggleImageButton extends ImageButton implements Checkable, OnClickListener {
private static final String ns = "http://schemas.android.com/apk/res/org.linphone";
private boolean checked;
private Drawable stateChecked;
private Drawable stateUnChecked;
@ -46,9 +48,11 @@ public class ToggleImageButton extends ImageButton implements Checkable, OnClick
public ToggleImageButton(Context context, AttributeSet attrs) {
super(context, attrs);
stateChecked = getResources().getDrawable(attrs.getAttributeResourceValue(ns, "checked", -1));
stateUnChecked = getResources().getDrawable(attrs.getAttributeResourceValue(ns, "unchecked", -1));
drawablesForBackground = attrs.getAttributeBooleanValue(ns, "bgdrawables", false);
TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.ToggleImageButton);
stateChecked = getResources().getDrawable(array.getResourceId(R.styleable.ToggleImageButton_checked, -1));
stateUnChecked = getResources().getDrawable(array.getResourceId(R.styleable.ToggleImageButton_unchecked, -1));
drawablesForBackground = array.getBoolean(R.styleable.ToggleImageButton_bgdrawables, false);
setBackgroundColor(Color.TRANSPARENT);
setOnClickListener(this);