android-viewpager

IllegalArgumentException: radius must be > 0

喜你入骨 提交于 2020-01-22 17:44:08
问题 I'm designing a bar graph and a pie chart in a view pager using AChartEngine library. When I scroll from bar graph to pie chart, application crashes. The crash report is as following. FATAL EXCEPTION: main java.lang.IllegalArgumentException: radius must be > 0 at android.graphics.RadialGradient.<init>(RadialGradient.java:58) at org.achartengine.chart.PieChart.draw(PieChart.java:112) at org.achartengine.GraphicalView.onDraw(GraphicalView.java:168) at android.view.View.draw(View.java:11120) at

FragmentPagerAdapter deprecated

℡╲_俬逩灬. 提交于 2020-01-22 17:12:56
问题 Since API 27 FragmentPagerAdapter is deprecated. What's the best alternative to use for this? In my case, I understand some thing like super(fragmentManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) would need to be used, but I don't know where within my code this needs to go. I got these imports in my class: import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentPagerAdapter but FragmentPagerAdapter in class MyViewPagerAdapter(manager: FragmentManager) :

NullPointerException ViewPager SetAdapter

落爺英雄遲暮 提交于 2020-01-22 02:35:09
问题 I am adding a tab view or (ViewPager) to my Fragment in an App I am working on. I want to put the tab view inside the Contact Fragment I have a Navigation Drawer that opens, and you see list of options... Home Services Contact Everything you click goes to a fragment Then in that fragment loads the .XML file, with a corresponding class to program everything inside the .XML file. I was following an online tutorial [CLICK HERE][3] Obviously it was over 2 years ago. Android Code has changed since

Custom Font in View Pager in android

╄→гoц情女王★ 提交于 2020-01-22 02:33:11
问题 I am developing demo application in which I am using view pager. Now I want to know that can we change the text style of Title displayed in view pager. Please give your suggestions on it. Thanking you in advance. 回答1: Working demo TextView txt = (TextView) v.findViewById(R.id.custom_font); and then change your font Something like this: switch (position) { case 0: v = (LinearLayout) LayoutInflater.from(cxt).inflate(R.layout.lcmeter, null); TextView txt = (TextView) v.findViewById(R.id.custom

how can i update view when fragment change?

馋奶兔 提交于 2020-01-22 02:19:12
问题 i have a activity that have 2 sherlockfragment in this The first two pages display fragments with custom list views which are built from xml from server using AsyncTask. However, when the app runs, only one list view is displayed, the other page is just blank public class VpiAbsTestActivity extends SherlockFragmentActivity { private static final String[] CONTENT = new String[] { "1","2"}; TestFragmentAdapter mAdapter; ViewPager mPager; PageIndicator mIndicator; protected void onCreate(Bundle

How to fetch collection from firebase cloud firestore into a ViewPager?

余生长醉 提交于 2020-01-21 19:18:12
问题 friends I just implement code for the View pager. But now I am stuck with the problem that how to fetch a collection from the firestore into a view pager. Means I have a collection in that collection I have 2 documents. each document has some parameters. I want the "mSliderImage" parameter will be fetched into a ViewPager from each and every document. My Code Some How Looks Like This. I am using some dependencies for my custom viewpager. implementation 'com.github.smarteist:autoimageslider:1

Using ActionBarSherlock & ViewPagerIndicator Synchronously Will Not Compile

本秂侑毒 提交于 2020-01-21 04:59:24
问题 When using ActionBarSherlock and ViewPagerIndicator at the same time I am getting the below error; from what I've read - it's caused due to conflicting/duplicate libraries in the two. One solution was to have ABS rely on VPI (Or the other way around, I tried both) but this still gave me the same error even after a clean and rebuild. Right now I'm just working in two separate projects so I can get my work done - but I'd like to combine them obviously ha. Help would be much appreciated! [2012

Tabs on a single page

前提是你 提交于 2020-01-17 03:37:12
问题 I'm currently using a ViewPager with a PagerTabStrip to display 4 tabs at the top of the device. All I want to do is have 4 tabs fixed in place and centered, but I can't figure out how to do that now that the old way (using Action bar tabs) has been deprecated. Basically I have something like this: But I want it so that all 4 of my tabs are on the same page (all visible). This is my code to set the pager adapter to the ViewPager : @Override protected void onCreate(Bundle savedInstanceState) {

Google Map Implementation in Viewpager, Error Unable to get provider com.google.firebase.provider.FirebaseInitProvider

橙三吉。 提交于 2020-01-17 03:06:41
问题 I face the Exception in android Google map Integration inside the ViewPager, Please Help me to resolve this issue, I used the Following code, Please rectify the bug were i done the mistake,Its My kind request. please add comment if my question is not eligible , i remove my post.Thank-you Activity Name: MapTradeActivity.class package com.tradezap.toolbartest; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support

Using viewer page to switch between two fragments - however it disappears after switching into a fragment

纵饮孤独 提交于 2020-01-16 13:20:10
问题 I have a problem with my viewer page, so in this java file that I have which extends from Fragment has some code to do with view pager. Basically in my screen I want to let the user to swipe cross to the right and swipe across to the left. It works fine as it should be however I have other fragments too within the project I am working on so if I go to a different fragment and come back to this screen which lets me do this swipe feature, all for a sudden everything disappears from the screen.