问题标签 [swipeview]
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 - cursor loader doesn't update in my swipe tab until I restart the application
I have an application with two activities the launcher activity has two swipe tabs and one of those uses the a simpleCursorAdapter and a cursorloader to populate the views from a database.
The code works fine when I am using a single activity and without the tabs. I mean I get updates data as the the database changes, but in this new design I only get updated data only after I restart the app.
Here is the scenario after the application starts I initiate the the loader and populate the listview in the tab , then I can start the second activity by clicking on one of the item in in the listview, the main activity that I can close by pressing on a button.
after closing the second activity I get back to the main activity and insert a row in my database ( and up to this point every thing is working fine , I can see that in the debugger)
But the problem is that I wont get the newly entered item on my screen unless I restart the app.
Even I swipe several times between my tabs nothing happens.
I have tried to restart my loader in my fragment callbacks but still no changes.
What is going wrong in my design?
java - Android Studio: Creating a Swipe Tab Application that Reads Fragments. Forced Close
I'm essentially a new Android Studio developer and currently I am attempting to switch between 3 tabs for my program. Unfortunately, the program forces a close when I try to open things up. I'm not entirely sure where the problem lies since I declared an instance of the classes in regards to the tab.
MainActivity.java
Tab1 (The Other 2 Tabs are the same)
I've looked on other websites for help on this, mostly they cover programs that are obsolete or don't cover the question completely, I have nothing else to turn to so any help on this problem I'd appreciate it.
Edit: I've learned it has to do with creating a .newinstance of the class but how this gets accomplished I haven't quite grasped yet.
Logcat output. Only included error portion
10-29 21:04:04.599 9452-9452/com.example.main E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.authpayx.authportbeta04, PID: 9452 java.lang.ClassCastException: com.example.main.main@42d45398 must implement OnFragmentInteractionListener at com.example.main.Tab1.onAttach(Tab1.java:84) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:849) at android.app.FragmentManagerImpl.performPendingDeferredStart(FragmentManager.java:785) at android.app.Fragment.setUserVisibleHint(Fragment.java:997) at android.support.v13.app.FragmentCompatICSMR1.setUserVisibleHint(FragmentCompatICSMR1.java:23) at android.support.v13.app.FragmentCompat$ICSMR1FragmentCompatImpl.setUserVisibleHint(FragmentCompat.java:48) at android.support.v13.app.FragmentCompat.setUserVisibleHint(FragmentCompat.java:76) at android.support.v13.app.FragmentPagerAdapter.setPrimaryItem(FragmentPagerAdapter.java:134) at android.support.v4.view.ViewPager.populate(ViewPager.java:1071) at android.support.v4.view.ViewPager.populate(ViewPager.java:919) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1441) at android.view.View.measure(View.java:17478) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5364) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:17478) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5364) at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:412) at android.view.View.measure(View.java:17478) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5364) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2548) at android.view.View.measure(View.java:17478) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2262) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1391) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1590) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6585) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803) at android.view.Choreographer.doCallbacks(Choreographer.java:603) at android.view.Choreographer.doFrame(Choreographer.java:573) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5579) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) at dalvik.system.NativeStart.main(Native Method)
android - 将 SD 卡中的音频文件显示到滑动视图选项卡 - Android
我在 android 上找到了这个示例ListView of audio files how to find audio files in SD Card。我没有机会检查它是否有效,因为它不是我需要的一切。我需要在滑动视图选项卡中显示此音频文件。有如下标签:专辑、作者、歌曲、流派和文件。我想让这些歌曲在标签中分离,并有可能播放它们。我刚开始学习Android,所以我要求准确的解释。
我希望我足够清楚地解释了我的问题。对不起我的英语不好 ;)
问候,阿加塔
android - Why tabs are not visible inside fragment?
In my app I want to use swipe views of four tabs inside a fragment. The four tabs are contains different fragments each and all the four fragments are sliding by swipe from right to left or vice versa. The fragments are working fine but the tabs are not visible within the fragment. Anyone have any solution for this. Thanks in advance :)
this is the main fragment which contains the tabs:-
This is the adapter for fragments:-
android-actionbar - 无法运行 Swip 选项卡应用程序,因为 getActionBar 在 Android 5 中返回 null
我想在 Android 应用程序(Android L)中创建滑动标签,许多类都被贬低了,getActionBar() 返回 null。我试图在谷歌上运行几个可用的例子,但到处都是同样的问题
android - 滑动标签条的外观 Android
我在 Android App(使用 API 21 编译)中实现滑动标签时遇到问题。
我的应用程序的早期版本有 ActionBar 选项卡,在使用 API 21 编译后,它看起来像这样:
我想实现滑动选项卡(例如在“我的日程安排”部分的 Google I/O 应用程序中:)
但具有 ActionBar 选项卡的外观(深色)。对此负责的是 Class SlidingTabStrip(从 Google I/O App 复制)。有谁知道如何在滑动选项卡中查看 ActionBar 选项卡?
滑动标签条:
android - 更新或刷新 ListView 后,按钮单击不起作用
我正在使用 47deg/android-swipelistview 库,我遇到了一些问题。我在每个列表项中有包含按钮的列表视图。但是当我滑动其中一个列表项以将其关闭时。它成功关闭,但之后我在其他列表项中的所有按钮都停止工作,请帮助我。我正在使用自定义列表适配器和视图持有者模式。
谢谢你。
这是我的代码
ruby - 在calabash iOS中滑动命令
嗨,我必须刷一堆屏幕,我尝试了一些语法,比如
但它会滑动并将屏幕返回到同一屏幕。
android - 具有重叠/重叠图像的 Android 选项卡
我有一个概念性的 android 问题。我使用 appcompat 库(API min:15,target:21)。
并希望将图像放置在顶部选项卡(甚至内部)和下面的内容上。(内容可以是 swipeView)
像这样:
重要的是图像应固定在最后一个选项卡中并覆盖下面的内容。(应该是片段独立的)
你会怎么做?
Api 21 中有什么新东西可以轻松处理这个问题吗?
谢谢!!