如何在android中使用通知风格或需要进行自定义布局时在frist时间显示通知中的完整内容?
我可以通过电话获得联系电话.我想知道如何从中删除国家/地区代码.也就是说,如果用户的电话号码带有国家代码(+ 91-9876543210),我需要没有带前缀国家代码的电话号码(9876543210).
提前致谢.
请帮我找到一个适用于android studio的JSON查看器插件,如Eclipse JSON Editor插件.
我尝试了JSONFormatter和JSON在线查看器,但不像Eclipse JSON Editor插件那样工作.
我需要这样的输出.这是HorizontalRecyclerView作为VerticalRecyclerView的标头.
目前我正在使用NestedScrollView来实现这种设计.但我觉得滚动不顺畅.
请提出任何想法.提前致谢.
布局:
<android.support.v4.widget.NestedScrollView
android:id="@+id/nsv_my_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="ifContentScrolls"
android:visibility="gone"
android:clipChildren="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="15dp">
<LinearLayout
android:id="@+id/ll_continue_watching"
android:layout_width="match_parent"
android:layout_height="132dp"
android:visibility="gone"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="29dp"
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<customview.font.TextView
android:id="@+id/txt_edit_remove_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/btn_profile_edit"
android:gravity="center"
android:paddingTop="2dp"
android:text="EDIT"
android:textSize="10sp" />
<customview.font.TextView
android:id="@+id/txt_continue_watchng"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:text="Continue watching"
android:textSize="12sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/horizontal_view_color" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_horizontal_view"
android:layout_width="match_parent"
android:layout_height="102dp"
android:paddingBottom="15dp"
android:paddingTop="15dp" />
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/horizontal_view_color" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_vertical_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
Run Code Online (Sandbox Code Playgroud) 最近,我将 gradle 版本从 4.0.0 更新到了 7.0.3。在此更新之后,获取 dexOptions 已过时警告。尽管如此,我仍然能够编译该项目,但不知道如何修复此警告。这就是我目前的实现,
dexOptions {
preDexLibraries = true
}
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用以下代码段更新recyclerview项目.
public void setItemToPostion(WatchListEpisodeBean watchListBean, int itemPosition) {
this.watchListBean.add(itemPosition, watchListBean);
notifyItemChanged(itemPosition);
}
Run Code Online (Sandbox Code Playgroud)
它工作正常.该位置的项目使用新数据更新.但问题是项目克隆到下一个位置(出现在下一个位置).我没有发现我的代码有什么问题.
这是appcompat和支持设计lib版本:
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题.提前致谢.