好的,我有两个线性布局按钮:
<LinearLayout android:id="@+id/linearLayout1"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
<Button android:id="@+id/aktiviraj_paket"
android:text="Aktiviraj"
android:layout_height="40sp"
android:layout_width="160sp"
android:background="@drawable/my_border3"
android:onClick="myClickHandle"></Button>
<Button android:id="@+id/deaktiviraj_paket"
android:text="Deaktiviraj"
android:layout_height="40sp"
android:layout_width="fill_parent"
android:background="@drawable/my_border3"
android:onClick="myClickHandle">
</Button>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
所以问题是,如果我在两个按钮上使用填充父项,它们是一个在一起,所以我已经制作了第一个按钮160sp宽度,第二个是fill_parent.如果这个显示在4英寸或更小的屏幕上,按钮大小相同,但如果我在平板电脑上尝试这个(10英寸),第一个按钮保持160sp宽,第二个按钮延伸到屏幕结束(因为fill_parent).我可以做到这一点,所以无论屏幕尺寸大小,两个按钮都可以是均匀尺寸吗?
我正在为手机制作应用程序,但我不想让它们在平板电脑上使用.我不知道为什么不能.我在我的android清单文件中使用它:
android:xlargeScreens="true"
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
错误:在'android'包中找不到属性'xlargeScreens'的资源标识符
这是我的清单文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cro.perger.bonbon"
android:versionCode="5"
android:versionName="1.4">
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".bonbon"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Broadcast Receiver that will process AppWidget updates -->
<receiver android:name=".HelloWidget" android:label="@string/w_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/hello_widget_provider" />
</receiver>
<receiver android:name=".SMSReceiver">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
</application>
<supports-screens android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.READ_SMS"/> …Run Code Online (Sandbox Code Playgroud) 我更新了我Eclipse的新版本,现在我无法导出已签名的应用程序.以下是错误报告:
eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=hr_HR
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
Error
Wed Dec 14 15:58:02 CET 2011
Failed to export application
Command-line Error 2
Output:
ERROR: Unknown command 'crunch'
Android Asset Packaging Tool
Usage:
aapt l[ist] [-v] [-a] file.{zip,jar,apk}
List contents of Zip-compatible archive.
aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
badging Print the label and icon for the app declared …Run Code Online (Sandbox Code Playgroud) 我正在计划为一个本地广播电台制作一个Android应用程序,我需要制作一个广播节目的互联网流媒体你能为此提供一些起点,一些教程或其他东西.
好的,我有一个简单的问题。我有市场上的应用程序,可以拨打电话和发送短信,并且可以浏览互联网。该应用程序支持 469 台设备(市场上)。虽然我可以在平板电脑上安装我的应用程序,但我想为平板电脑用户提供可能性,以便他们可以在市场上浏览它。所以我在市场上使用多个 apk 解决方案。现在我的两个应用程序都使用 android.hardware.telephony 作为功能,因此平板电脑(市场上)无法支持它。我想知道在第二个应用程序中,如果我删除此功能,我是否仍然可以发送短信,我不需要电话??
这部分代码用于创建自定义对话框。
final Dialog dialog = new Dialog(preferences.this);
dialog.setContentView(R.layout.customdialog);
dialog.setTitle("Title...");
TextView text = (TextView) dialog.findViewById(R.id.text);
text.setText("Bonboniziraj se i ti :)");
Button button = (Button) dialog.findViewById(R.id.dialogButtonOK);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
dialog.show();
}
});
Run Code Online (Sandbox Code Playgroud)
我收到SetOnClickListener错误!