我找不到一种方法来获得没有边框的FAB.例如,当我尝试:
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/fab"
android:background="@android:color/transparent"
android.support.design:fabSize="normal"
android:adjustViewBounds="true"
style="@style/Fab"/>
Run Code Online (Sandbox Code Playgroud)
我明白了:
请注意FAB周围的边框.我试过adjustViewBounds ="true"和android:background ="@ android:color/transparent"这两个都是建议的解决方案,用于摆脱ImageView(FAB扩展)的边框,但都不起作用.我该怎样摆脱这个边界?
注意:所有@ style/Fab都是定位按钮,与边框无关.
我想执行一个删除操作来取消我正在开发的某个Android应用程序中的用户.以下方法返回"完成"但数据不会从表中删除.这里有什么问题?
public string deleteFriend(int user, int friend) {
int i = db.Friends.Where(x => x.Person.Id == user && x.Person1.Id == friend).Select(x => x.Id).First();
var rec=db.Friends.ToList();
rec.RemoveAll(x=>rec.Any(xx=>xx.Id==i));
db.SaveChanges();
return "Done";
}
Run Code Online (Sandbox Code Playgroud)
我正在使用实体框架工作LINQ.
我希望我的抽屉从工具栏下方的左侧打开.但是,根据材料设计方面,这并不好.但我仍然想这样做.
在这里,我更改了我的XML文件.
---相对布局
-----工具栏
-----抽屉
-------容器
-------抽屉列表
这是我的XML文件.我的应用程序在打开时崩溃了.我不知道我在哪里犯了错误,XML没有显示任何错误.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<android.support.v4.widget.DrawerLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/container_body"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<fragment
android:id="@+id/fragment_navigation_drawer"
android:name="com.myApp.activity.FragmentDrawer"
android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
app:layout="@layout/fragment_navigation_drawer"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) xml android android-layout material-design android-5.0-lollipop
我有这样的textview:
<TextView
android:id="@+id/tvComment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web" />
Run Code Online (Sandbox Code Playgroud)
tvComment.setText(Html.fromHtml(message));
这是我的文字:
<a href='myapp://293482'>Jack </a> http://google.com
Run Code Online (Sandbox Code Playgroud)
问题是<a href>
不可点击.如果我删除android:autoLink="web"
,它是可点击的,但链接http://google.com
不起作用.
如何使它们都可以点击?