问题标签 [viewswitcher]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 在 AndroidStudio 中预览 ViewSwitcher
是否有一种简单的方法可以在 Android Studio 预览中的 ViewSwitcher 中的显示视图之间切换,或者是一次将 XML 换成子视图的唯一方法?
android - 使用 FragmentManager 更改两个片段和使用 ViewSwitcher 更改两个视图有什么区别?
何时选择使用两个片段并在活动中用另一个替换一个(或另一个片段中的子片段)或使用两个视图并使用 ViewSwitcher(或 ViewFlipper)更改它们?
例如,在加载数据时,我使用了一个加载视图,然后我想切换到主视图。
asp.net-mvc - 为什么“找到与名为'ViewSwitcher'的控制器匹配的多种类型”?
我有一个基于 MVC 5 的解决方案,带有一个Client和Data项目。它包括_ViewSwitcher我想为移动和桌面浏览器提供服务的部分。在主页上,当我单击 ViewSwitcher 的Mobile view链接时,出现以下异常:
'ViewSwitcher', and found only one .cs result, in the我已经对术语(不是整个单词) .Client project, and three results in_Layout.Mobile.cshtml _ViewSwitcher.cshtml`的所有文件进行了解决方案范围的搜索and。另外,我手动检查了文件系统是否有任何重复项,但没有发现任何重复项。
这可能是什么原因造成的?
android - ViewSwitcher 预加载
我目前正在开发一个幻灯片应用程序,它在自己的 ImageSwitcher 实现中显示多个带有动画的图像。在 ImageSwitcher 显示之前,我使用 Picasso 预加载(缓存)图像fetch()。
当下一个图像应该加载时,将调用以下方法:
image.setVisibility(View.VISIBLE)需要使毕加索能够读取 ImageView 的尺寸。并且需要回收以节省内存,因为当我不回收 imageView 时,每次图像切换时内存都会增加。
但我有一个大问题。图像之间的时间是固定的,毕加索需要一些时间将图像(甚至从本地缓存)加载到 imageView 中,所以我有一点延迟。
问题是,如何预加载下一张图片?
android - CoordinatorLayout / RelativeLayout issue within a ViewSwitcher
This is a follow up question of this one: Coordinator Layout and Relative Layout issue
I have an issue when you have a CoordinatorLayout with a RelativeLayout within a ViewSwitcher like the following example:
And this in my Activity:
Result: (Screenshot taken from Moto G Android 5.1)
As you can see, the button isn't at bottom of the screen and it's been cropped.
Expected result:
Manifest:
Styles
android - 无法在 ViewSwitcher 中正确切换视图
我的班级中有一个字符串数组,ViewSwitcher我的布局中有一个:
我有两个按钮 -Previous和Next导航。当用户点击 时Next,我将 TextView 和 WebView 的文本设置为字符串数组的下一个元素。
问题
我想实现以下目标:
我该怎么做?ViewSwitcher.showNext没有正确地完成工作。有没有办法可以关联使用 ID 切换到哪个视图?
android - ViewFlipper/ViewSwitcher 第二个视图空
我是 Android 编程的新手,现在我想为 2 个视图创建一个 ViewFlipper 或 ViewSwitcher,它们将在 1 列和 2 列之间切换视图。问题是第一个视图没问题,但是当我使用 showNext() 或 showPrevious() 时,第二个视图显示为空白,我完全没有想到哪里出了问题。我尝试过 ViewFlipper 和 ViewSwitcher 的结果相同。
layout_devicelistmainswitcher.xml
主要活动.java
}
android - ViewSwitcher 不会转到上一个视图
您好,我正在尝试使用 a在 and和 anviewswitcher之间来回切换。我的视图从. 但不会切换回来。这是我的:TextViewEditTextedittexttextviewxml
我的切换代码是:
android - 当 PopUpMenu 和编辑文本出现时,“最近的应用程序”中的应用程序无响应
语境
我正在使用 popupwindows 以允许用户快速重命名活动中的卡片视图。
我通过使用 aViewSwitcher将TextView(原始名称)交换为EditText(新名称)来做到这一点。
问题
当用户按下EditText和确认时,由于某种原因,您无法返回应用程序。IE。当你点击它时,它不会响应。PopUpWindow"RECENT APPS"
诊断
我认为这是Window Focus的问题。我已经尝试过EditText.clearFocus()ET 并解雇了所有 PopUps onPause,但没有运气。
有没有办法使用 onFocusChangeListener 来解决这个问题?
代码(我试图删除尽可能多的多余项目)
TheHubActivity.java
对于视觉人士
android - 如何保存viewSwitcher设置的最后一个视图并在重新启动活动时恢复它?
我有一个使用 ViewSwitcher 在两个视图之间切换的 Activity。该onCreate()方法用于setContentview()将视图设置为两个视图之一。
当离开 Activity 并稍后再返回时,我希望最后显示的视图是在 viewSwitcher 中选择的视图(而不是每次都在 SetContentview 中的视图)。
我将如何做到这一点?
我尝试过这样的事情,但是当我尝试加载 Activity 时应用程序崩溃:




