Giter Club home page Giter Club logo

Comments (12)

CazimirRoman avatar CazimirRoman commented on August 22, 2024 4

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.

Onwa1kenobi avatar Onwa1kenobi commented on August 22, 2024 2

Will this ever be implemented??

from paper-onboarding-android.

pourya0111 avatar pourya0111 commented on August 22, 2024

bump!! @Juriv

from paper-onboarding-android.

zulkarnain-shah avatar zulkarnain-shah commented on August 22, 2024

Really need this flexibility to change the color of both the title and description labels

from paper-onboarding-android.

krazykira avatar krazykira commented on August 22, 2024

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.

jonbulica99 avatar jonbulica99 commented on August 22, 2024

bump

from paper-onboarding-android.

Vijaykumarj avatar Vijaykumarj commented on August 22, 2024

release version eagerly waiting for this feature

from paper-onboarding-android.

BillBunting avatar BillBunting commented on August 22, 2024

Would also like an easier way to set the font and font color (need white) (like the iOS version)

from paper-onboarding-android.

golovin47 avatar golovin47 commented on August 22, 2024

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.

SinanYilmaz9 avatar SinanYilmaz9 commented on August 22, 2024

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.

Asendo316 avatar Asendo316 commented on August 22, 2024

CustomPaperOnboardingEngine

Can you please show us how you achieved this?

from paper-onboarding-android.

nirajniroula avatar nirajniroula commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.