我以编程方式使用下面的代码隐藏应用程序图标
try{
PackageManager p = getPackageManager();
p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
}catch (Exception e) {
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
现在我想以编程方式显示图标
我正在使用这个
camera.takePicture(null, rawCallback, jpegCallback);
但是有些设备会在相机拍摄图像时发出声音.
请任何人帮忙,我怎样才能将相机快门声静音?
我正在使用下面的代码使用remoteview在小部件imageview上设置图像现在我想将高度和宽度设置为imageview运行时.
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(WidgetActivity1_1.this);
RemoteViews remoteViews = new RemoteViews(WidgetActivity1_1.this.getPackageName(), R.layout.widget_layout1_1);
Intent configIntent = new Intent(WidgetActivity1_1.this,UpdateWidgetService.class);
configIntent.putExtra("Appid", appWidgetId);
PendingIntent configPendingIntent = PendingIntent.getService(WidgetActivity1_1.this, appWidgetId, configIntent, 0);
remoteViews.setImageViewResource(R.id.imgviewGrow, R.drawable.flower1);
}
Run Code Online (Sandbox Code Playgroud) 将google-play-services_lib导入我的工作区,但在所有值文件夹中输入错误我有干净的项目更改Google API,添加google-play-services.jar文件,重启eclipse但错误
在控制台显示错误如下
[2014-05-23 11:54:22 - GPSService] D:\AndroidTool\workspace\google-play-services_lib\res\values\ads_attrs.xml:10: error: Attribute "adSize" has already been defined
[2014-05-23 11:54:22 - GPSService] D:\AndroidTool\workspace\google-play-services_lib\res\values\ads_attrs.xml:17: error: Attribute "adSizes" has already been defined
[2014-05-23 11:54:22 - GPSService] D:\AndroidTool\workspace\google-play-services_lib\res\values\ads_attrs.xml:20: error: Attribute "adUnitId" has already been defined
[2014-05-23 11:54:22 - GPSService] D:\AndroidTool\workspace\google-play-services_lib\res\values\common_colors.xml:4: error: Resource entry common_signin_btn_dark_text_default is already defined.
[2014-05-23 11:54:22 - GPSService] D:\AndroidTool\workspace\google-play-services_lib\res\values\colors.xml:4: Originally defined here.
[2014-05-23 11:54:22 - GPSService] D:\AndroidTool\workspace\google-play-services_lib\res\values\common_colors.xml:5: error: Resource entry common_signin_btn_dark_text_pressed is already defined.
[2014-05-23 11:54:22 - GPSService] D:\AndroidTool\workspace\google-play-services_lib\res\values\colors.xml:5: Originally defined here.
[2014-05-23 …
Run Code Online (Sandbox Code Playgroud) 我有一个错误:
while compiling: CREATE_TABELLOGIN(IDINTEGER PRIMARY KEY AUTOINCREMENT,USERNAME text,PASSWORD text)
Run Code Online (Sandbox Code Playgroud)
数据库类:
public class LoginDataBaseAdapter {
static final String DATABASE_NAME="login.db";
static final int DATABASE_VERSION=1;
public static final int NAME_COLUMN=1;
static final String DATABASE_CREATE= "CREATE_TABEL" + "LOGIN" +
"(" + "ID" + "INTEGER PRIMARY KEY AUTOINCREMENT," + "USERNAME text,PASSWORD text);";
Run Code Online (Sandbox Code Playgroud)