android-viewpager

ScrollView doesn't work in fragment

醉酒当歌 提交于 2019-12-25 14:33:12
问题 Does anyone know why the scroll does not work ? I trying to make my page scrollable and can swipe to another tab. It allows me to swipe but not scrollable. I'm use most of the answer in Stack Overflow but none of them is worked in my case. <?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#FFFFFF" xmlns:android="http://schemas.android.com/apk/res/android">

Text does not display on ViewPager

十年热恋 提交于 2019-12-25 14:14:33
问题 I am having an issue where my ViewPager text does not display when I start up my application. However, the texts do end up showing when I swipe the tab. I am not sure what the problem is and I would like the text to appear as soon as my application starts. Any help would be appreciated! thanks. Countries Activity( MAIN ACTIVITY ) package myapps.countryapp; import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android

Text does not display on ViewPager

大兔子大兔子 提交于 2019-12-25 14:14:30
问题 I am having an issue where my ViewPager text does not display when I start up my application. However, the texts do end up showing when I swipe the tab. I am not sure what the problem is and I would like the text to appear as soon as my application starts. Any help would be appreciated! thanks. Countries Activity( MAIN ACTIVITY ) package myapps.countryapp; import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android

Updating a textView/s in a fragment from an Activity (using ViewPager)

若如初见. 提交于 2019-12-25 08:57:25
问题 I'm constantly receiving data in MainActivity and I need it to only be written a textView when the fragment that contains the textView is inflated. Obviously the app crashes if I try to write to a textView that is in a fragment currently not in display. I have made a dummy activity to explain my problem and I'm using a countdown timer to represent the data that is continually changing in the MainActivity. The issue resides in MainActivity. Would someone mind explaining how I can only write to

updating Fragments in a ViewPager

左心房为你撑大大i 提交于 2019-12-25 08:34:23
问题 i am having problems trying to update/replace Fragments in a ViewPager. the problem is that the old fragments simply won't get replaced by the new ones. i have read a couple of solutions on stackoverflow, and tried them, but it still doesn't work. anyone have any ideas why? i will explain what i am trying to do below. i have a Pojo class public class Pojo { public String text; public Pojo(String text) { this.text = text; } } i have a group class, PojoGroup public class PojoGroup { public

@Override problems with ViewPagerIndicator

心已入冬 提交于 2019-12-25 08:17:48
问题 I'm trying to reimport my projects which use the ViewPagerIndicator library project, but eclipse tells me that there are a lot of "@Override" notations wrong in the vpi project. On another PC, it works fine with the same code. Any idea why it isn't working? 回答1: Change java Compiler to 1.6 it lower than 1.6.so prblm... Right Click on your project -->proprties -->Java Compiler-->Check Enable project spefic settings-->Compile Compilence level -> 1.6 来源: https://stackoverflow.com/questions

android: ViewPager throwing null pointer

南笙酒味 提交于 2019-12-25 08:04:20
问题 I have an application with multiple fragments. My first fragment is HomeFragment where I am using viewpager and recycler view. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_home, container, false); ButterKnife.bind(this, view); ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(Constant.HOME_TITLE); // view Pager mPager = (ViewPager) view

Custom Listview not refreshed on fragment back

浪子不回头ぞ 提交于 2019-12-25 08:00:02
问题 I have one custom list view adapter loading contact list. When I open app, contacts are loading perfectly , but once I came back after scrolling to Preference Fragment, listview is empty. Though Data is collected by calling Inner class LoadContact but nothing in listview. There are three fragments. pls guide. Code for Fragment (tab1). If u see I added adapter initialization in oncreatview as otherwise on back tab I m getting Null point exception. m I did correct here? public class Requestor

How to add multiple contents in view pager?

∥☆過路亽.° 提交于 2019-12-25 07:49:00
问题 Hi I am working with android apps.I had created a swipeable view using view pager which contains only images at the right end. Now I want to add some textviews and buttons in the same page viewer for each view. How can I add text views and buttons along with page viewer ??? here is my code Swipe_adapter.java public class Swipe_adapter extends PagerAdapter { Context context; private int[] GalImages = new int[] { R.drawable.app1, R.drawable.app2, R.drawable.gosms }; ArrayList<HashMap<String

Why doesn't the softKeyboard open when I tap an editText inside a ViewPager?

心不动则不痛 提交于 2019-12-25 07:44:40
问题 Like the title says, I've got a viewPager with some editText fields inside. I can select the editText fields perfectly fine (emulator and physical device). I see the cursor, and I see the underline color change, indicating it's selected, but I can't type. Tapping on the editText fields doesn't open the softKeyboard. Is this a known issue with a simple fix, or is code needed to identify what's going wrong here? 回答1: Finally bumped in to an answer that's working for me, which can be found here.