草庐IT

Parent_process

全部标签

java - Android 抛出 DeadObjectException : Transaction failed on small parcel; remote process probably died just in HUAWEI Android 8. 0.0

1804-1109:43:24.4822296822968ECrashHandler:Inthread:Thread[main,5,main]1904-1109:43:24.4822296822968ECrashHandler:UncaughtExceptiondetected:java.lang.IllegalStateException:FailurereadingAssistStructuredata:android.os.DeadObjectException:Transactionfailedonsmallparcel;remoteprocessprobablydied200

安卓广播接收器 : run it on default process or in a new one?

我有一个包含两个广播接收器的应用程序,一个用于接收数据,另一个用于发送数据。我已经看到它们有一个属性android:process使它们在应用程序的默认进程或另一个进程中运行。在我使用google找到的示例中,接收器设置为在进程“:remote”中运行。我的问题是,使用每个选项的优点和缺点是什么? 最佳答案 当您想与另一个应用程序共享资源时,使用与应用程序的默认进程不同的进程会很方便。要执行此操作,您需要安排两个具有相同进程名称的应用程序,如果您的进程名称以小字符开头,则会生成一个全局进程。如果它以冒号:开头,则该过程是私有(pri

Android:具有 match_parent 的 LinearLayout 与父级不匹配

我有以下xml:LinearLayout具有灰色背景。我希望这个背景填满整个屏幕(蓝条和黑条之间的空间),所以我将LinearLayout的高度设置为match_parent,但它一直包裹着包含内容的列表,所以我得到了一个白色间隙。这是它的样子:谁能给我一个关于如何制作这个的提示?谢谢!编辑:petromo和Tanis.7x几乎是正确的。一些父View没有占用所有可用空间。我修复了它,现在所有父View都占用了所有空间。第一个未填充空间的View是我发布的LinearLayout(IDfilters_view_container)。它有android:layout_height="ma

android - 在 fragment : "The specified child already has a parent. You must call removeView() on the child' s parent first"中使用数据绑定(bind)时出现异常

安卓工作室3.1,java1.8我尝试使用数据绑定(bind):此处settings.xml布局:这里是fragmentSettingsFragment.java:publicclassSettingsFragmentextendsFragment{@Nullable@OverridepublicViewonCreateView(LayoutInflaterinflater,@NullableViewGroupcontainer,@NullableBundlesavedInstanceState){SettingsBindingbinding=DataBindingUtil.setCo

android - myView.getHitRect() 返回相对于父对象的坐标。如何让他们与祖 parent 联系起来?

我正在使用以下代码创建View的触摸委托(delegate)。问题是我想增加可点击区域的View位于非常狭窄的LinearLayout内部。所以下面的代码可以增加我的View的可点击区域,但仅限于我狭窄的LinearLayout范围内。我想传递给这个函数的不是父类而是myView的祖父类(myView.getParent().getParent())。它是一个RelativeLayout,它有更大的可点击区域空间。但随后touchRect将指向错误的位置,并且我的TouchDelegate的位置将不正确..因为:delegate.getHitRect(touchRect);返回相对于p

java.lang.Thread.setPriority 与 android.os.Process.setThreadPriority

java.lang.Thread.setPriority和android.os.Process.setThreadPriority它们有什么不同?首先,在java.lang.Thread类中,java.lang.Thread.setPriority(intpriority)priority的值可以从Thread.MIN_PRIORITY(=1,最低)到Thread.MAX_PRIORITY(=10,最高)。java.lang.Thread类中有相关常量。publicstaticfinalintMIN_PRIORITY=1;publicstaticfinalintNORM_PRIORIT

android - 两列布局,第一列 wrap_content,第二列 fill_parent

我必须将UI设计为包含两列。第一列应包含包含的标签,同一行中的第二列应填满整个空间。下面是一些例子:http://temp.chrzanowski.info/so_layout.png我该怎么做? 最佳答案 使用TableLayout和strechColumns="1"它拉伸(stretch)占据剩余空间的第二列。 关于android-两列布局,第一列wrap_content,第二列fill_parent,我们在StackOverflow上找到一个类似的问题:

android - Glide Process 'command ' git'' 以非零退出值 128 完成

我已经从Github下载了Glide,想在Androidstudio上测试程序。但是一旦我清理了项目,我就有了这个错误Information:Gradletasks[clean]fatal:Notagitrepository(oranyoftheparentdirectories):.gitFAILURE:Buildfailedwithanexception.*Whatwentwrong:Aproblemoccurredevaluatingsettings'glide-master'.>Process'command'git''finishedwithnon-zeroexitvalue

java - 错误 :Execution failed for task: ExecException: Process 'command ' C:\Program Files\Java\jdk1. 7.0_79\bin\java.exe'' 以非零退出值 2 完成

错误:任务“:app:preDexDebug”执行失败。com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'C:\ProgramFiles\Java\jdk1.7.0_79\bin\java.exe''finishedwithnon-zeroexitvalue2dependencies{compilefileTree(dir:'libs',include:['*.jar'])compilefiles('poi-3.13-beta

android - 约束布局 : how to center a view under another and also stay within parent bounds?

我想在另一个像电子邮件下方的“注销”按钮下居中View:我通过使用ConstraintLayout作为父级并将底View的左右边缘限制到顶View的左右边缘来做到这一点。这正确地将两个View居中。(请注意,我不想将父级的View居中。)我遇到的问题是,如果顶View很窄,则底View最终可能会被父级在右侧截断,如下所示(来自布局编辑器):我事先不知道顶View在运行时会有多窄。(不一定是电子邮件地址,即使是,我认识的人的电子邮件地址只有8个字符!)我想设置约束,使底View在顶View下方居中,但如果它向右太远,它会向左移动刚好足以避免越过准则。顶View的右边缘需要保持固定。我怎样