我使用下面的代码进行转换,但似乎只能获取显示屏幕中的内容而无法获取不在显示屏幕中的内容.
有没有办法让所有内容都滚动出来?
Bitmap viewBitmap = Bitmap.createBitmap(mScrollView.getWidth(),mScrollView.getHeight(),Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(viewBitmap);
mScrollView.draw(canvas);
Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个包含在一组项目上方的标题的列表.我在这里看到SeperatedListAdapter:http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/但我遇到了一个错误(ERROR/AndroidRuntime(2025):
java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView
)
Run Code Online (Sandbox Code Playgroud)
现在我正在寻找更多选择,包括制作一个新选项.你们有什么提示吗?
谢谢,布莱恩
我有Image Gridview,我想逐个添加图像到gridview选择从相机中捕获的图库或图像.
adb devices -l
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
Run Code Online (Sandbox Code Playgroud)
当我执行它时,我变得喜欢
padmakumar@padmakumar-desktop:~$ adb devices -l
List of devices attached
Medfield14ABxxxx device usb:2-1.5
Ztedfield14Axxxx device usb:2-1.6
emulator-5554 device
015d2994ec2xxx device usb:2-1.5 product:nakasi model:Nexus_7 device:grouper
Medfield14ABA072 device usb:1-1.1 ( changing to different port)
Run Code Online (Sandbox Code Playgroud)
当我改变到不同的端口时,它显示的总线编号为1和2,如lsusb命令中所示
这是什么设备USB:2- 1.5,1.6,1.1?
那么-l会做什么,具体是设备限定符的含义吗?
我尝试过,lsusb但adb设备-l的信息不同.
padmakumar@padmakumar-desktop:~$ lsusb
Bus 002 Device 008: ID 18d1:4e42 Google Inc.
Bus 002 Device 005: ID 17ef:7470 Lenovo
Bus 002 …Run Code Online (Sandbox Code Playgroud) 错误是
java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.
我打电话给
webview.loadUrl("javascript:myJavaMethod(" + itemArr + "," + telcoID + ");");
Run Code Online (Sandbox Code Playgroud)
在...上
webview.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
Run Code Online (Sandbox Code Playgroud)
这是一个播放flash视频播放器的webview,在2.2,2.3.3等都很好,在冰淇淋三明治上尝试过它并且没有可见的错误(除了它只是黑屏还是视频播放)
有什么想法吗.
当我将启动模式设置为"singleInstance"时,我在MYApp中打开电子邮件时遇到问题.
我附加了示例Android项目,它从电子邮件附件中读取文件名并在屏幕上显示.在onCreate的情况下工作正常但在应用程序启动模式为singleInstance时在onNewIntent中抛出错误.
Launchmode.java
package your.namespace.launchmode;
public class LaunchModeActivity extends Activity {
private static final int OPEN_ACT = 2;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String name = getAttachmetName(getIntent());
if(null != name)
{
TextView textv = (TextView) findViewById(R.id.attachmentnm);
textv.setText(name);
}
}
@Override
protected void onNewIntent(Intent savedInstanceState)
{
super.onNewIntent(savedInstanceState);
String name = getAttachmetName(savedInstanceState);
if(null != name)
{
TextView textv = (TextView) findViewById(R.id.attachmentnm);
textv.setText(name);
}
}
private String getAttachmetName(Intent intent) {
final …Run Code Online (Sandbox Code Playgroud) 我正在使用ubuntu Linux 10.04 Pc,因为我的三星Galaxy 7"(GT-P6210)homeycomb 3.2没有检测到它在eclipse中显示的开发
DeviceMonitor] Failed to start monitoring ???????????? 在控制台
并在设备选项卡中显示?????????????
除了这款7英寸GT-P6210三星平板电脑外,所有其他三星设备都表现不错.
当我关闭平板电脑并连接到USB时,它显示数字和在线状态.附件4641199B0F8488AE设备列表
为什么?什么解决方案是什么问题.
注意: 我已经添加了51-android.rules
Samsung 04E8
Run Code Online (Sandbox Code Playgroud)
我也启用了USB调试模式.
它在Mac上运行良好.
编辑:
我通过$ lsusb命令得到了产品ID
Bus 001 Device 010: ID 04e8:6860 Samsung Electronics Co., Ltd
Run Code Online (Sandbox Code Playgroud)
我还在rules.d文件中添加了产品ID
SUBSYSTEM=="usb", ATTRS{idVendor}=="04E8", ATTRS{idProduct}=="6860", MODE="0666", GROUP="plugdev"
Run Code Online (Sandbox Code Playgroud)
之后我重启了udev
padmakumar@padmakumar-desktop:~$ sudo restart udev
Run Code Online (Sandbox Code Playgroud)
然后我试了
padmakumar@padmakumar-desktop:~$ adb kill-server
padmakumar@padmakumar-desktop:~$ adb start-server
* daemon not running. starting it now on port 5037 * …Run Code Online (Sandbox Code Playgroud) 如何将JSONObject转换"{hello1: hi, hello2: hey}"为"hello1: hi, hello2: hey"没有这些括号{ }?
我知道有机会使用JSONObject.tostring然后我会得到一个带括号的字符串.
谢谢大家.
在adb我面临新的错误,只有我的adb版本正在打印
padmakumar@padmakumar-desktop:~$ adb version
Android Debug Bridge version 1.0.29
Run Code Online (Sandbox Code Playgroud)
除了它显示下面的错误
padmakumar@padmakumar-desktop:~$ adb devices
error: protocol fault (no status)
Run Code Online (Sandbox Code Playgroud)
注意: adb kill-server不工作,即它没有响应.
在我的Eclipse控制台中,我收到错误.
Android Launch!
[2012-01-09 20:31:28 - Shopping List] The connection to adb is down, and a severe error has occured.
[2012-01-09 20:31:28 - Shopping List] You must restart adb and Eclipse.
[2012-01-09 20:31:28 - Shopping List] Please ensure that adb is correctly located at '/home/padmakumar/android-sdk/platform-tools/adb' and can be executed.
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Gradle从ADT导出我的android项目,以便我可以导入到Android Studio中.
我选择Generate Gradle build files并在Export菜单中选择我的项目,但是当我单击Finish时,它会使Creating Gradle构建进度条闪烁一毫秒,然后停留在Export菜单屏幕上.错误日志中创建了一个新错误:消息为空,插件为com.android.ide.eclipse.adt
这是完整的错误日志输出:
!ENTRY com.android.ide.eclipse.adt 4 0 2013-05-20 16:16:45.168
!MESSAGE
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:477)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
at com.android.ide.eclipse.adt.internal.wizards.exportgradle.GradleExportPage.generateBuildfiles(GradleExportPage.java:293)
at com.android.ide.eclipse.adt.internal.wizards.exportgradle.GradleExportWizard.performFinish(GradleExportWizard.java:32)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.internal.handlers.WizardHandler$Export.executeHandler(WizardHandler.java:103)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:171)
at org.eclipse.ui.actions.ExportResourcesAction.run(ExportResourcesAction.java:116)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at …Run Code Online (Sandbox Code Playgroud)