小编Ham*_*rzi的帖子

Android Horizo​​ntal RecyclerView滚动方向

我做了一个Horizo​​ntal RecyclerView,它运行正常(感谢这一点),但滚动和数据的方向从左向右扩展; 那么如何更改RecyclerView滚动方向,如下图所示?

在此输入图像描述

我的代码:

StaggeredGridLayoutManager staggeredGridLayoutManager =
                new StaggeredGridLayoutManager(
                        2, //The number of Columns in the grid
                        LinearLayoutManager.HORIZONTAL);
Run Code Online (Sandbox Code Playgroud)

android horizontal-scrolling android-recyclerview

40
推荐指数
4
解决办法
10万
查看次数

将PasswordToggle Gravity更改为左侧(对于RTL语言)

我用来TextInputLayout从用户那里获取密码,如下所示:

<android.support.design.widget.TextInputLayout
                android:id="@+id/RegisterPassInput"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="16dp"
                app:passwordToggleEnabled="true"
                android:layout_marginRight="16dp"
                android:layout_toStartOf="@+id/RegisterPassImg">

                <EditText
                    android:id="@+id/RegisterPassET"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="right"
                    android:hint="@string/Password"
                    android:inputType="textPassword"
                    android:maxLength="40" />
            </android.support.design.widget.TextInputLayout>
Run Code Online (Sandbox Code Playgroud)

结果是:

在此输入图像描述

但我想要这样的东西:

在此输入图像描述

如何在editText左侧设置passwordToggle gravity align.
出于很多原因,我rtl清单中禁用了支持

android:supportsRtl="false"
Run Code Online (Sandbox Code Playgroud)

android android-edittext android-textinputlayout

3
推荐指数
1
解决办法
492
查看次数

故事板上的自动排列视图

Xcode中的故事板是一个方便的工具,但是当有很多视图和segue时它会让人感到困惑.有没有办法安排视图和segue像SQL中的排列表?

如你所见,存在很多冲突

正如你所看到的那样,我的故事板中存在很多冲突,而且难以安排它.

xcode storyboard ios

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