我正在尝试使用与搜索着陆页中的Google地图应用类似的折叠工具栏.也就是说,有三个"锚点"或位置.代替地图,我会有一张照片.
优选地,app应该在这些位置之间捕捉.
截至目前,我的布局基本上正常.
app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior"
.我相信这是一个错误AppBarLayout
这是我的布局:
请注意,这app:layout_behavior="@string/appbar_anchor_behavior">
只是一个未经修改的子类AppBarLayout.Behavior
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/actions_bar_dark"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true"
app:layout_behavior="@string/appbar_anchor_behavior">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll"
android:fitsSystemWindows="true">
<ImageView
android:id="@+id/item_preview_thumb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_centerInParent="true"
app:layout_collapseMode="parallax"
/>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="pin" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/contentRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<include layout="@layout/item_detail_content"/>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:layout_height="wrap_content"
android:layout_width="wrap_content"
app:layout_anchor="@id/appbar"
app:layout_anchorGravity="bottom|right|end"
android:src="@drawable/ic_download"
android:layout_margin="16dp"
android:clickable="true"/>
Run Code Online (Sandbox Code Playgroud)
如何使用自定义行为实现此目的?
编辑:事实证明它不是Chrome但是Android System WebView
.Google Play商店中的其他几位用户都发布了Crashes应用等响应,没有任何错误.
原帖:
今晚我的Chrome应用 更新了(Android 5.0.2),当我尝试在DEBUG模式下构建我的Xamarin Android应用时,我收到错误消息:
[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###
[google-breakpad] Chrome构建指纹:
[google-breakpad] 1.0
[google-breakpad] 1
[google-breakpad] 5c230f07-455f-4c1f-91eb-9c44019cd813
[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###
[google-breakpad] JB MR2 +用户构建禁用了Tombstones.
[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###
在控制台中,我可以找到错误消息:
E/SysUtils:ApplicationStat中的ApplicationContext为null
这似乎是铬的一部分.
错误显示在控制台中,当webview返回时,应用程序返回(但不会被销毁).webview在另一个框架中发布.
自从昨天一切正常以来,我没有做任何改变.
构建(并崩溃)从设备运行应用程序功能为例外.
我的目标构建版本是API 21,API最小值是14(但它在19时也失败).
这个话题说明了一切.我应该如何使用NavigationView检索onClick侦听器上的项目位置?另外,为什么没有getHeader方法?最后我以编程方式执行所有操作,但标题仍然可以点击.有什么想法吗?
谢谢!
使用selectableItemBackground属性进行“触摸波纹效果”时,似乎正常触摸速度太快,无法出现“触摸波纹”。我必须触摸更长的时间,一切正常。是否有可能以某种方式强制这种效果,即使是短距离触摸?
我正在尝试创建一个Xamarin Java绑定到Spotify Android SDK.SDK现在分为两部分,一部分用于身份验证,另一部分用于播放器.以前的java绑定工作,然而,秒给我一个错误.
最初的问题是在Xamarin论坛上提出的.
嗨,
我正在尝试为Spotify Android SDK创建一个绑定项目.
SDK分为两个.aar文件.一个用于身份验证,一个用于媒体播放(播放器).首先,我尝试在一个绑定项目中同时使用.aar文件,但是忽略了Player.aar.然而,将它移动到它自己似乎工作.
现在,我的问题是有关Java接口NativePlayerNotificationCallback
,其产生的IPlayerNotificationCallback
(因此缺乏OG通知),但在播放器类它试图实现:global::Com.Spotify.Android.Player.INativePlayerNotificationCallback
.
我INativePlayerNotificationCallback
在反编译文件中找不到其他提及.只有IPlayerNotificationCallback
.
我知道这有点难以想象.以下是JD-GUI中的java类文件:
生成的文件列在这里:
在Com.Spotify.Sdk.Android.Player.IPlayerNotificationCallback.cs文件中:
而错误信息本身
错误CS0234:namespaceCom.Spotify.Sdk.Android.Player中不存在类型或命名空间名称INativePlayerNotificationCallback'.你错过了装配参考吗?
我真的很感激任何有关如何使其工作的见解.在我看来,界面的命名有一些不一致,但我不确定.
感谢你帮忙,弗雷德里克
是否可以通过编程方式在新导航视图中设置MenuItem的样式?我正在动态构建菜单,不能使用静态XML文件.我一直无法找到有关此事的任何信息.
更新:我熟悉设置标题和图标,但不是我如何设置文本的alpha.
更新2:在类NavigationView中有setItemTextColor(ColorStateList)
.据我所知,不可能设置单独的项目颜色?谢谢
更新:感谢jgoldberger,我已经解决了
<remove-node path="/api/package[@name='com.spotify.sdk.android.authentication']/interface[@name='AuthenticationClient.AuthenticationCompleteListener']" />
Run Code Online (Sandbox Code Playgroud)
我正在尝试为Android Spotify SDK创建一个Java绑定项目。我已经使用Metadata.xml解决了大多数问题,但是我无法解决最后一个问题。
在SDK中,类AuthenticationClient内有一个私有接口AuthenticationCompleteListener。
我尝试使用
<attr path="/api/package[@name='com.spotify.sdk.android.authentication']/class[@name='AuthenticationClient.AuthenticationCompleteListener']" name="visibility">public</attr>
Run Code Online (Sandbox Code Playgroud)
以及各种变化,包括
<attr path="/api/package[@name='com.spotify.sdk.android.authentication']/class[@name='AuthenticationClient']/interface[@name='AuthenticationCompleteListener']" name="visibility">public</attr>
Run Code Online (Sandbox Code Playgroud)
但是,构建时出现以下错误:
错误:AuthenticationCompleteListener在AuthenticationClient中不是公共的;无法从外部程序包访问。
我能做什么?
感谢您对
弗雷德的帮助
在上一篇文章中,我了解到可以使用 SpannableString 来更改菜单项标题上的文本颜色(使用“新”导航视图)。
以前,当我使用视图时,我可以通过执行 iconView.setAlpha(0.5); 来更改图标 alpha。
是否可以使用导航视图来执行此操作,而无需使用所需的 alpha 创建新的可绘制对象?