我正试图在我的应用程序中播放Vimeo的视频.问题是在Android 6设备上,视频会在一段时间后停止播放.在具有较低API的设备上,一切都很好.
[MediaHTTPConnection] readAt 25182208 / 32768 => java.net.ProtocolException: unexpected end of stream and shows this in de log
[MediaPlayer] error (1, -1004)
我们现在通过Vimeo支持向他们发送电子邮件数周,但他们无法提供解决方案或可能的原因.现在经过几周的邮寄后,支持部门表示他们不支持Android,但我们已经尝试了他们的建议:
使用视频视图而不是媒体播放器
我们尝试过原生Android和Xamarin Android实现
尝试下载文件=>这是有效的,但我们想要流,因为一些视频超过30分钟(> 100mb).取消注释DownLoadActivity中onCreate中的代码以测试下载.
在浏览器中一切正常.
我在We-Transfer上放置了一个测试项目,你可以看到问题https://bazookas.wetransfer.com/downloads/40dadcc8a01f7ebf025345cdf88b731220170102160508/21970a
问题 是否可以在屏幕底部放置AppBarLayout?
问题 我正在尝试在屏幕底部放置一个条形,当我向下滚动时滚动离开,当我向上滚动时出现.因为协调器布局和appbarlayout帮助我在顶部有工具栏的其他活动中执行此操作,我想在我的按钮栏上尝试这个.
这是我的xml.
<?xml version="1.0" encoding="utf-8"?>
<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/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<MyNameSpace.Views.ScrollViews_Custom.ScrollView_Base
android:id="@+id/scrollview_movieDetail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/bar_movieDetail_buttom"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="vertical"
android:background="@color/actionbar_gray_transparent"
android:animateLayoutChanges="true">
</LinearLayout>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud) 我试图设置自定义字体上Hint
的TextInputLayout
.因此我使用自TextInputLayout
定义属性的自定义子类MyHint
.此属性设置器应格式化文本并设置FormattedText
但不起作用.
如果我只是设置FormattedHint
属性它也不格式化.有谁为什么这些方法失败了?
下面你可以看到我的自定义类属性.
例:
BaseTextInputLayout userNameInput = view.FindViewById<BaseTextInputLayout>(Resource.Id.myId);
userNameInput.MyHint = "My Custom hint text";
Run Code Online (Sandbox Code Playgroud)
类:
public class BaseTextInputLayout: TextInputLayout
{
public string MyHint
{
get
{
return Hint;
}
set {
if (value != null)
{
SpannableStringBuilder builder = new SpannableStringBuilder(value);
builder.SetSpan(new CustomTypeFaceSpan("", Constants_Android.TYPEFACE_YOGA_MET_EVY_CUSTOMFONT), 0, builder.Length(), SpanTypes.InclusiveExclusive);
this.HintFormatted = builder;
}
else
{
this.HintFormatted = null;
}
}
}
Run Code Online (Sandbox Code Playgroud) 我有一个配置为的视图wrap_content
.在该视图中,如果用户未登录,我会显示一个视图.此视图被夸大为ViewStub
.
在屏幕上的第一个单元格中,一切都很好.但是,如果我滚动到屏幕外的单元格,那就错了.这个观点没有达到他的高度.
在第三个单元格android:id="@+id/background"
中View_NoLoggedInView
(那个中的那个ViewStub
)没有达到他的高度.
我删除了不相关的代码,使类和布局更具可读性.
有谁知道为什么第三个细胞只有在他离开屏幕然后再次进入时才会更新,我怎么能解决这个问题?
在这里你可以找到像gif一样的视觉问题:
Viewholder AXML布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/flickrList_red">
<ViewStub
android:id="@+id/noLoggedInViewInclude"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout="@layout/View_NoLoggedInView" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
膨胀的View_NoLoggedInView viewstub布局Axml代码:
<?xml version="1.0" encoding="utf-8"?>
<Kvo.Droid.View_NoLoggedInView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true">
<View
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.75"
android:background="@android:color/black" />
<RelativeLayout
android:id="@+id/whiteCard"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/whitecard">
<ImageView
android:id="@+id/lockIcon"
android:layout_width="30dp"
android:layout_height="30dp"
android:scaleType="centerInside"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:src="@mipmap/lock" />
<MobileFans.Base.Droid.BaseTextView
android:id="@+id/contentText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp" …
Run Code Online (Sandbox Code Playgroud)