小编puk*_*uko的帖子

如何将底部阴影添加到选项卡布局

嗨,我需要在我的标签布局下添加阴影(如在Skype中).

shadow_skype

我的活动xml:

    <RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.v7.widget.Toolbar xmlns:local="http://schemas.android.com/apk/res-auto"
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?attr/actionBarSize"
        android:background="@color/splashGreenTop"
        local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
    <android.support.design.widget.TabLayout
        android:id="@+id/tab_layout"
        android:layout_below="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimary"
        android:elevation="0dp"
        android:minHeight="?attr/actionBarSize" />
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_below="@+id/tab_layout"
        android:id="@+id/tabContainer"
        android:layout_height="match_parent" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

当我添加android:elevation="10dp"到Tablayout时,阴影被添加到底部和顶部..我只需要底部.见图片......

在此输入图像描述

我怎样才能做到这一点 ?提前致谢.

xml android toolbar shadow android-elevation

14
推荐指数
3
解决办法
2万
查看次数

我在哪里可以在xamarin应用程序中添加google-services.json

您好我们正在开发Xamarin应用程序,我们希望监视有多少人从我们的推荐ID安装应用程序.

我找到此文档https://developers.google.com/analytics/devguides/collection/android/v4/ ,其中显示"将刚刚下载的google-services.json文件复制到Android的app /或mobile /目录中工作室项目."

我有visual studio(2013)项目当然缺少这些文件夹.问题是,我在visual studio项目中添加了google-services.json文件?

提前致谢

c# xamarin.android xamarin google-play-services

13
推荐指数
3
解决办法
7131
查看次数

Mosquitto 重新加载配置文件

我想在更改时重新加载mosquitto密码文件。是否可以在 Windows 上发送 SIGHUP(“信号挂断”)或一些等效于 mosquitto 服务器的信息?

windows mqtt mosquitto

6
推荐指数
2
解决办法
6916
查看次数

实体框架性能连接与导航属性

我试图理解为什么加入我的情况比使用导航属性的语句更快.我有两个问题.

首先是导航属性:

          var result = (from users in context.MetricBloodPreasure
                orderby users.User.LastName, users.User.FirstName
                select new
                {
                    UserName = users.User.LastName + ", " + users.User.FirstName,
                    Date = users.DateOfValue,
                }).ToList();
Run Code Online (Sandbox Code Playgroud)

Generatet sql:

SELECT 
    [Project1].[C1] AS [C1], 
    [Project1].[C2] AS [C2], 
    [Project1].[DateOfValue] AS [DateOfValue]
    FROM ( SELECT 
        [Extent1].[DateOfValue] AS [DateOfValue], 
        [Extent2].[FirstName] AS [FirstName], 
        [Extent2].[LastName] AS [LastName], 
        1 AS [C1], 
        CASE WHEN ([Extent2].[LastName] IS NULL) THEN N'' ELSE [Extent2].[LastName] END + N', ' + CASE WHEN ([Extent2].[FirstName] IS NULL) THEN N'' ELSE [Extent2].[FirstName] END AS [C2] …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework

5
推荐指数
1
解决办法
1867
查看次数