ramotion / paper-onboarding-android Goto Github PK
View Code? Open in Web Editor NEW:octocat: PaperOnboarding is a material design slider made by @Ramotion
Home Page: https://www.ramotion.com/paper-onboarding-android/
License: MIT License
:octocat: PaperOnboarding is a material design slider made by @Ramotion
Home Page: https://www.ramotion.com/paper-onboarding-android/
License: MIT License
It should link to version '1.1.0' to get the current version with min API 15...
Error occurs on the .add()
I tried casting onBoardingFragment to a regular Fragment, but it wouldn't take.
PaperOnboardingFragment onBoardingFragment = PaperOnboardingFragment.newInstance(elements);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.add(R.id.fragment_container, onBoardingFragment);
fragmentTransaction.commit();
Any ideas for a fix?
Android 5.0 Lollipop (API lvl 21) or greater should say API lvl 15 or greater (at least that's what the build.gradle file says...)
I have three pages setup just as the readme says. When the fragment shows, the first image and icon show up. When I scroll to the second page, the icon shows, but no background image. Same with the third page. If I scroll back, none of the background images reappear.
In my point of view, it would be better if a user can see that something happening when he/she swiping the screen.
the easier way to do it is to change background-color during swapping
If you think it is a good feature I may create a pull-request
how to change text color and text font in android??
Hey, I really appreciate your iOS library for this feature. Just stumbled on this android repo... I was just curious if this is something you're actively working on and would have an ETA for?
My project has minSDK level set at 19 which means Android 4.4.4 . But the images aren't showing up there. Only text is visible
When i call fragmenttransaction.commit() is gives me fatal exception main error so can anyone help me out with this ,,,,??
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:13:5-174:19 to override.
Is there anyway that there could be an option for changing the android icon color's and also the text color please, I couldn't help notice that the ios version of the library has these features but the android does not.
Text is not showing.
Hi,
at first, thanks for your nice lib.
During my tests , I found an issue in onboarding_text_content_layout.xml. The top LinearLayout uses:
android:layout_width="wrap_content"
All elements are centered but not the text elements (landscape mode). I changed layout_width to "match_parent" and all looks fine (landscape and portrait mode).
Can you please fix this.
Thanks,
Mario
For many cases, it would be useful to skip this onboarding and for such case app usually use Skip button
The two text views are left aligned instead of centered in the screen.
help me .. i want to add click listner on frame layout child , such as for skip .
Hi.
Created a new project from scratch with Android Studio, without checking use androidx
, added the implementation 'com.ramotion.paperonboarding:paper-onboarding:1.1.3'
dependency.
Result: does not compile.
What went wrong:
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Note: adding 'tools:replace="android:appComponentFactory"'
to element at AndroidManifest.xml does not help.
I thought androidx libs were backward compatible with support library versions?
val engine = PaperOnboardingEngine(findViewById(R.id.onboardingRootView), getDataForOnboarding(), applicationContext)
engine.setOnChangeListener { oldElementIndex, newElementIndex -> Toast.makeText(applicationContext, "Swiped from $oldElementIndex to $newElementIndex", Toast.LENGTH_SHORT).show() }
engine.setOnRightOutListener {
// Probably here will be your exit action
Toast.makeText(applicationContext, "Swiped out right", Toast.LENGTH_SHORT).show()
}
I get error on R.id.onboardingRootView part
Errror is : Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference
at com.ramotion.paperonboarding.PaperOnboardingEngine.(PaperOnboardingEngine.java:83)
at io.insyssky.mediassistplus.activity.OnBoardActivity.onCreate(OnBoardActivity.kt:20)
Is it possible to add this functionality to add my own gestures (like a tap to go to the next page), to move to the next page?
Hi ,
I'm using AS 3.2 RC 3 to try.After adding the library gradle that synced. But I got an error;
Attribute application@allowBackup value=(false) from AndroidManifest.xml:10:9-36
is also present at [com.ramotion.paperonboarding:paper-onboarding:1.1.1] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:9:5-40:19 to override.
Testing on API 29
I love the onboarding setup. You've done a nice job. The problem I have is that the UI doesn't respond to touch events, only swipe. This creates an accessibility issue for users who may only have access to a keyboard or who have issues performing swipe actions.
In addition, Google's automated testing when submitting applications will get stuck because touch events are not recognized, so it can't get further into the app. This workaround won't fix the automated instrumented testing, because the instrumenting used with clash with the automated testing.
Here's a workaround cobbled together from some stack overflow pages that will simulate the swipe event so that the screen can be passed. Basically in your MainActivity, you would put the following:
override fun onTouchEvent(event: MotionEvent?): Boolean {
suspend fun fling(
fromX: Float, toX: Float, fromY: Float,
toY: Float, stepCount: Int) {
withContext(Dispatchers.Default) {
val inst = Instrumentation()
val downTime = SystemClock.uptimeMillis()
var eventTime = SystemClock.uptimeMillis()
var y = fromY
var x = fromX
val yStep = (toY - fromY) / stepCount
val xStep = (toX - fromX) / stepCount
var event = MotionEvent.obtain(
downTime, eventTime,
MotionEvent.ACTION_DOWN, fromX, fromY, 0
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
event.source = InputDevice.SOURCE_TOUCHSCREEN
}
inst.sendPointerSync(event)
for (i in 0 until stepCount) {
y += yStep
x += xStep
eventTime = SystemClock.uptimeMillis()
event = MotionEvent.obtain(
downTime, eventTime + stepCount,
MotionEvent.ACTION_MOVE, x, y, 0
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
event.source = InputDevice.SOURCE_TOUCHSCREEN
}
inst.sendPointerSync(event)
}
eventTime = SystemClock.uptimeMillis() + stepCount.toLong() + 2
event = MotionEvent.obtain(
downTime, eventTime,
MotionEvent.ACTION_UP, toX, toY, 0
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR1) {
event.source = InputDevice.SOURCE_TOUCHSCREEN
}
inst.sendPointerSync(event)
}
}
if (event?.action == MotionEvent.ACTION_UP) {
val dm = DisplayMetrics()
windowManager.defaultDisplay.getMetrics(dm)
val halfheight = (dm.heightPixels/2).toFloat()
val width = dm.widthPixels.toFloat()
val h = Handler()
lifecycleScope.launch {
fling(
width-1, width/2, halfheight-1, halfheight-1, 5
)
}
}
}
I need to set contentIconRes
and bottomBarIconRes
images dynamically (from image loaded from url using say Picasso). Is subclassing PaperOnboardingEngine
the recommended way of doing that or is there another approach recommended?
thanks
Hey, I can't resolve com.ramotion.paperonboarding:paper-onboarding:1.1.3 is there an issue with maven?
Also I can't download the package with you're link you've posted on youre documentation:
(http://central.maven.org/maven2/com/ramotion/paperonboarding/paper-onboarding/1.1.3/paper-onboarding-1.1.3.aar)
Can we make the foreground text and image hide and replace the background color with a background image (whole screen)?
i used sample app on kitkat and its not working currectly (missing images and ugly animations)
Hi, thanks for this library. please develop this for android 14 + .
thanks ❤️
When finishing the activity with the tutorial screen the previous activity is shown with a gray overlay and you cannot click on anything
Hello, i used your library for my new app. However, the pre-launch report on Play Store can't proceed beyond the intro slides, so it stucks on the first slide and never makes it to the actual app. I am guessing this is because the devices won't swipe to the next slide. Any solutions?
When creating the onboarding engine, we are forced to use an ArrayList to hold ou onboarding pages. This might be a design issue as using a List as constructor parameter would be better than an ArrayList.
For my case, i wanted to take advantage of LinkedList to keep the order of screen. This order in mind would help to better manipulated the screens in bounds to implement further logic
In PaperOnboardingEngine.java implemented PieChart to show in each screen swipe. Once i press right swipe PieChart going bottom of screen and only half chart is showing. Please help to fix this issue.
protected ViewGroup createContentTextView(PaperOnboardingPage PaperOnboardingPage) {
LayoutInflater vi = LayoutInflater.from(mAppContext);
ViewGroup contentTextView = (ViewGroup) vi.inflate(R.layout.onboarding_text_content_layout, mContentTextContainer, false);
...
pieChart = (PieChart) contentTextView.getChildAt(1);
pieChart.setRotationEnabled(false);
pieChart.setUsePercentValues(true);
..
..
}
Hi there and thanks for lib,
Is it possible to add this functionality to library?
how to change text color?
I really like this effect It supports the android version 4.0,?
how can i display onboarding app only first time?
Hi!
Must say I really like your onboarding!
But in the swift onboarding it is possible to change color on the text,
is it possible to do this in the android version?
hi, could you please tell me the tool that you make the gif :)
How can a skip button be added?
I am trying to add the dependency with implementation 'com.ramotion.paperonboarding:paper-onboarding:1.1.2'
but showing error : ERROR: Failed to resolve: com.ramotion.paperonboarding:paper-onboarding:1.1.2
But adding paper-onboarding:1.1.1
was successful.
compileSdkVersion 28
minSdkVersion 23
targetSdkVersion 28
repositories {
google()
jcenter()
}
it would be great if i can load images from remote URL, not just local resources.
change text color, weight, typeface, and also control the size of the image.
i have also found an issue when the fragment is left to right (Arabic locale).
i hope if it has these features.
How can on customize these in each / all pages?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.