- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在我的 list Activity 中使用调整平移,并且它在 ScrollView 中正常工作,但我有一些 ScrollView 之外的东西正在调整大小。
我将此代码放在 list 上的 Activity 上:
android:windowSoftInputMode="adjustPan"
你可以在图片中看到这一点。
我在 viewpager 旁边使用它:
这是我的 viewpager xml,其中包含大量 edittext 。
Xml fragment :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<AutoCompleteTextView android:id="@+id/autotext"
android:layout_width="0dp"
android:layout_height="0dp"
android:nextFocusUp="@id/autotext"
android:nextFocusLeft="@id/autotext"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:orientation="horizontal"
android:weightSum="2">
<Spinner
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/spinnerKind"
android:layout_weight="1"/>
<Spinner
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/spinnerSazande"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/model"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="مدل"
android:focusableInTouchMode="true"/>
<EditText
android:id="@+id/serial"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="سریال"
android:focusableInTouchMode="true"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/LIMEI"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/IMEI1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="IMEI"
android:gravity="right"
android:focusableInTouchMode="true"/>
<EditText
android:id="@+id/IMEI2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="IMEI2"
android:gravity="right"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/Size"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="سایز"
android:focusableInTouchMode="true"/>
<EditText
android:id="@+id/Color"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="رنگ"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:id="@+id/LMojdegani"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/MacAddress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="MacAddress"
android:gravity="right"
android:focusableInTouchMode="true"/>
<EditText
android:id="@+id/mojdegani"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="مژدگانی"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:id="@+id/LFactor"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/FactorNumber"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="شماره فاکتور"
android:focusableInTouchMode="true"/>
<EditText
android:id="@+id/NameForoshande"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="نام فروشنده"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:id="@+id/LTarikh"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="1"
>
<EditText
android:id="@+id/Tarikh_Kharid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="تاریخ خرید"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/Name"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="نام"
android:focusableInTouchMode="true"/>
<EditText
android:id="@+id/LastName"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="نام خانوادگی"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/CodeMelli"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="کد ملی 10 رقمی"
android:focusableInTouchMode="true"/>
<EditText
android:id="@+id/Mobile"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="شماره موبایل"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:orientation="horizontal"
android:weightSum="2"
>
<EditText
android:id="@+id/Explain"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="توضیحات مربوط به کالا (اختیاری)"
android:focusableInTouchMode="true"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:orientation="vertical"
android:weightSum="2"
>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="جنسیت"
android:gravity="center_vertical"
android:layout_marginRight="5dp"
android:layout_weight="1"/>
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_weight="1"
android:weightSum="2">
<RadioButton
android:id="@+id/mard"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="مرد"/>
<RadioButton
android:id="@+id/zan"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="زن"/>
</RadioGroup>
</LinearLayout>
<Space
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:weightSum="1"
>
<TextView
android:id="@+id/confirm"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="تایید"
android:gravity="center"
android:background="@drawable/confirm"
android:layout_weight="1"
android:clickable="true"
android:layout_margin="5dp"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
这是我的主要 xml,它有一个线性布局,其中有 4 个可单击的文本,通过选择这些文本可以在页面之间查看寻呼机更改。
主要 XML :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="2"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.85">
<LinearLayout
android:layout_margin="5dp"
android:background="@drawable/card2"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="4"
android:layout_weight="1.8">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
>
<TextView
android:gravity="center"
android:text="کالای مسروقه"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/stolled"
android:layout_weight="1"
android:clickable="true"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
>
<TextView
android:gravity="center"
android:text="کالای گم شده"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/losted"
android:layout_weight="1"
android:clickable="true"
/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
>
<TextView
android:gravity="center"
android:text="پیدا شده"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/founded"
android:layout_weight="1"
android:clickable="true"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
>
<TextView
android:gravity="center"
android:text="کالای نو"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fresh"
android:layout_weight="1"
android:clickable="true"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.15"
android:id="@+id/ViewPager"
>
</android.support.v4.view.ViewPager>
</LinearLayout>
</LinearLayout>
最佳答案
我认为,正如您所说,您已在 list 中声明了调整调整大小,如下右图所示?
<activity
android:name=".MainActivity"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
那么,请尝试添加
android:fitsSystemWindows="true"
在 xml 的父布局中。
关于java - 调整平移不适用于 ScrollView 之外的参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49850722/
我正在努力解决一个问题 Rahul 正在玩一个非常有趣的游戏。他有 N 个圆盘(每个圆盘的半径相等)。每个磁盘都有一个不同的数字,从 1 到 N 与之相关联。磁盘一个接一个地放在一堆中。 Rahul
我正在尝试使用此代码发出请求: public JsonObject account() throws BinanceApiException { return (new Request
我使用的是 Mac OS 和 emacs -nw (终端模式)。 我不知道如何在 emacs 之外粘贴东西(已由 M-w 在 emacs -nw 中实现)。 我知道emacs -ns可以做到。 搜索互
我试图让导航栏菜单出现在“标题容器”菜单中,但由于某种原因,导航栏链接流到外面(在修改浏览器窗口之前)。我不明白为什么,但我怀疑它与这一行有关: div class="collapse navbar-
我们的项目是在 WAS 6.1/hibernate/struts 上使用 RAD 7.0 开发的中型 Web 应用程序,该应用程序已投入生产。目前我们在属性文件中硬编码了生产系统的 IP 地址,在 h
我的要求是在传单中创建 N 类型的标记。该列表很大,无法容纳在 map 区域中。 我想要类似的东西: http://blog.georepublic.info/2012/leaflet-example
如 docs 中所述,基于 spring-boot 的 Web 服务正在使用 Sentry .它工作正常,但不应将某些异常发送到 Sentry ,例如为了在某些请求上返回 HTTP 状态 410
我已经阅读了 Apple Core Animation 文档。它说核心动画没有提供在窗口中实际显示图层的方法,它们必须由 View 托管。当与 View 配对时, View 必须为底层图层提供事件处理
我试图在滚动时检查元素是否在我的视口(viewport)内。如果它在我的视口(viewport)之外,我会添加一个类来将元素固定到顶部。 我用来确定元素是否在视口(viewport)之外的函数是: i
我正在查询中创建一个弹出窗口。悬停时弹出窗口一切正常。当用户的鼠标离开 div 以关闭它时,我让它看到计时器启动。如果他在计时器完成之前再次进入 div,则计时器将被清除。 这很好,但是如果用户点击
我使用名为 zonemap 的字典创建了一个 4x6 区域 map 。我在该字典中嵌套了多个字典;每个区域代表玩家可以访问并与之互动的区域。我希望能够将玩家的移动限制在该 4x6 区域,并重新显示他们
我正在构建一个页面,该页面将使用 ajax 来更新主要内容区域。用户将单击左侧菜单栏中的项目来更新右侧的 div 并包含搜索结果。 我想检测用户是否向下滚动到目前为止导致右侧结果 div 移出视口(v
好的,我在 div 中有一个带有拖放类的表格,其溢出设置为“自动”,这允许我隐藏部分时间表,只在底部放置一个滚动条。但是,我只是在可滚动 div 之外创建了一些可放置元素,并且我的可拖动元素无法离开可
我有大量项目绑定(bind)到 ListBox,VirtualizingStackPanel 设置为它的 ItemsPanel。随着用户滚动和项目容器的创建,我做了一些工作来用数据填充项目(使用数据库
我想知道是否有一种方法可以将类成员的访问范围专门限定为在 C# 中获取/设置实现,以减少我意外直接访问它们的可能性。类似 private 的东西,但只允许 get/set 访问它,我想我可以将每个变量
我正在尝试编写一个小游戏,以应用我自己在本类(class)中学到的概念。当游戏打开时,我想要一个自定义模态视图来告诉用户如何玩。同样,当他们输了时,我想呈现一个结果页面,该页面将位于 if 语句内。我
我有一个非常具体的 HTML/CSS 和/或 JS 问题。我在 this fiddle here 创建了一个示例显示问题。 我有一个可滚动的 div,它是一个表的父级: ...我的表格行之一包
我的 jar 文件中打包了一个 exe,我试图将它复制到一个临时位置,以便我可以使用 Desktop.browse() 运行它,为此我设置了一个使用 class.getResourceAsStream
您好,我对这段代码有疑问。我的问题是第一个 console.log(smile_per_sec) 给了我需要的值,但是第二个给了我声明变量时给它的值。 $.getJSON( twitter
我必须更改标记弹出窗口的默认大小以容纳我想放入其中的数据。我更改了一些 map 设置,因此当用户将其拖出 View 时,它总是会弹回最大范围。我遇到的问题是,对于靠近边缘的标记,当它的弹出窗口打开时,
我是一名优秀的程序员,十分优秀!