Comments (12)
I have extended the PaperOnboardingEngine and overiden the method createContentTextView where is got a reference to the textviews: ((TextView) group.getChildAt(0)).setTextColor(Color.WHITE) and ((TextView) group.getChildAt(1)).setTextColor(Color.WHITE);
In the activity of fragment just create an instance of the extended class like this :
CustomPaperOnboardingEngine engine = new CustomPaperOnboardingEngine(...)
Hope it helps!
from paper-onboarding-android.
Will this ever be implemented??
from paper-onboarding-android.
bump!! @Juriv
from paper-onboarding-android.
Really need this flexibility to change the color of both the title and description labels
from paper-onboarding-android.
Once the PR #27 gets merged all you need to do is set a theme to the activity that uses PaperOnboardingFragment
.
manifest.xml
<activity
android:name=".OnBoardingActivity"
android:theme="@style/activityTheme"/>
In styles.xml
<!--You can use any theme here as parent theme -->
<style name="activityTheme" parent="AppTheme">
<item name="android:textViewStyle">@style/myTextViewStyle</item>
</style>
<style name="myTextViewStyle" parent="@android:style/TextAppearance">
<item name="android:textColor">#FFFFFF</item>
</style>
from paper-onboarding-android.
bump
from paper-onboarding-android.
release version eagerly waiting for this feature
from paper-onboarding-android.
Would also like an easier way to set the font and font color (need white) (like the iOS version)
from paper-onboarding-android.
Hello. Right now there is no feature of changing text color inside lib. It uses your Application theme, so you may change text color in your app theme.
from paper-onboarding-android.
class MyPaperOnboardingEngine(
var rootLayout: View,
var contentElements: ArrayList, var appContext: Context
) : PaperOnboardingEngine(rootLayout, contentElements, appContext) {
override fun createContentTextView(paperOnboardingPage: PaperOnboardingPage?): ViewGroup {
val group = super.createContentTextView(paperOnboardingPage)
(group.getChildAt(0) as TextView).setTextColor(Color.WHITE)
(group.getChildAt(1) as TextView).setTextColor(Color.WHITE)
return group
}
}
That's great!
from paper-onboarding-android.
CustomPaperOnboardingEngine
Can you please show us how you achieved this?
from paper-onboarding-android.
For anyone still struggling with this issue, as suggested by @CazimirRoman, I first created a new class named CustomPaperOnBoardEngine
and overrode its createContentTextView
and change the text color of the TextView in there. Something like this:
public class CustomPaperOnBoardEngine extends PaperOnboardingEngine {
public CustomPaperOnBoardEngine(View rootLayout, ArrayList<PaperOnboardingPage> contentElements, Context appContext) {
super(rootLayout, contentElements, appContext);
}
@Override
protected ViewGroup createContentTextView(PaperOnboardingPage PaperOnboardingPage) {
ViewGroup group = super.createContentTextView(PaperOnboardingPage);
((TextView) group.getChildAt(0)).setTextColor(Color.WHITE);
((TextView) group.getChildAt(1)).setTextColor(Color.WHITE);
return group;
}
}
And in my activity where the PaperOnboardingEngine
was used, I used CustomPaperOnBoardEngine
instead. It works!
from paper-onboarding-android.
Related Issues (20)
- help HOT 1
- ERROR: Failed to resolve: com.ramotion.paperonboarding:paper-onboarding:1.1.2 HOT 2
- When i keep MPAndroid PieChart in FrameLayout after swipe half chart going out of screen HOT 3
- How to resolve this error from my project? HOT 1
- Add goToNextPage and goToPrevPage functionality HOT 1
- Incompatible with non-androidX projects HOT 2
- Android textcolor and icon color HOT 2
- NullPointerException error HOT 1
- Google Play Store - Pre launch report problem HOT 3
- Text not showing HOT 1
- Use of specific implementation of List for onBoarding pages HOT 1
- Background colour to Image HOT 1
- It's not pretty clear that screen react on my swipe gesture HOT 1
- Feature request: "Skip" button HOT 1
- Doesn't respond to onTouch Events
- how to change text color in android HOT 1
- Could not resolve com.ramotion.paperonboarding:paper-onboarding:1.1.3 HOT 2
- Ability to load images from url and other needed features
- how to change text color and text font in android
- Paper onboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paper-onboarding-android.