小编Dio*_*raj的帖子

完整日历 - 突出显示鼠标悬停单元格上的行和列

我正在使用完整日历,当光标位于单元格上方时,我想突出显示(或以某种方式更改颜色)行和列。到目前为止,我已经能够通过此 css 突出显示该行:

.fc-content td:hover{
        background: #DBDBDB; 
        opacity: 0.4;
    }
Run Code Online (Sandbox Code Playgroud)

现在是这样的视图: 在此输入图像描述

正如你所看到的,我所指的细胞的原始颜色较暗。我想为专栏做同样的事情。

如果可能的话,我还想突出显示原始资源(可以看到没有突出显示)。

任何帮助,将不胜感激!

css jquery fullcalendar

5
推荐指数
0
解决办法
1894
查看次数

ConstraintLayout 内的 RecyclerView - 父级顶部的开始位置

为简单ConstraintLayout起见,我有2 个孩子: aRecyclerView和 a Button

我希望RecyclerView从父级的顶部开始显示。如果只有几个项目要显示在 中RecyclerView,它应该包装它们。像这样的东西:

在此处输入图片说明

但是,如果RecyclerView有足够的项目可以到达屏幕末尾,则它应该到达 的顶部,而Button不是到达其父项的底部。像这样: 在此处输入图片说明

为了达到这个效果,我尝试了以下组合:

<android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <Button
            android:id="@+id/my_button"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent" />


        <android.support.v7.widget.RecyclerView
            android:id="@+id/my_recycler_view"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constrainedHeight="true"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)

RecyclerView只有几个项目要显示时,这个解决方案非常好。否则,如果它必须扩展到屏幕之外,它将在Button.

修改上述的XML(注意行之后app:layout_constraintBottom_toTopOf="@id/my_button"RecyclerView):

<android.support.constraint.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <Button
        android:id="@+id/my_button"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent" />


    <android.support.v7.widget.RecyclerView
        android:id="@+id/my_recycler_view"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constrainedHeight="true"
        app:layout_constraintBottom_toTopOf="@id/my_button"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)

我得到的结果是:

在此处输入图片说明

也就是说,RecyclerViewis …

android android-layout android-recyclerview recyclerview-layout android-constraintlayout

2
推荐指数
1
解决办法
1005
查看次数

SonarQube:确保此处加密数据安全。AES / GCM /无填充,RSA / ECB / PKCS1填充

我正在使用:

1. RSA / ECB / PKCS1Padding

2. AES / GCM /无填充

在我的Android(Java)应用程序中加密我的数据。在SonarQube 的文档中指出:

高级加密标准(AES)加密算法可用于各种模式。不带填充的Galois /计数器模式(GCM)应优先于以下不安全的组合:

  • 电子密码本(ECB)模式:在给定密钥下,任何给定的明文块始终被加密为相同的密文块。因此,它不能很好地隐藏数据模式。从某种意义上说,它不提供严格的消息机密性,并且完全不建议在加密协议中使用它。
  • 具有PKCS#5填充(或PKCS#7)的密码块链接(CBC)易受填充oracle攻击。

因此,根据建议,我AES/GCM/NoPadding用作:

Cipher c = Cipher.getInstance("AES/GCM/NoPadding");
Run Code Online (Sandbox Code Playgroud)

但是,它仍然会警告我确保此处加密数据是安全的。

相同的:

Cipher c = Cipher.getInstance("RSA/ECB/PKCS1Padding");
Run Code Online (Sandbox Code Playgroud)

SonarQube为什么会发出该警告?这些用途不再安全吗?

encryption rsa aes padding aes-gcm

2
推荐指数
1
解决办法
224
查看次数