Coder Social home page Coder Social logo

Comments (23)

smstuebe avatar smstuebe commented on August 11, 2024 5

I'll make it completely customizable like NegativeColor. Or better: I may add a styling mechanism, so you don't have to create a custom just class for styling.

from xamarin-fingerprint.

alvynfash avatar alvynfash commented on August 11, 2024 3

@bogadev @georgeharnwell @foehammer88 @ruisilva450 @marualderete

So I finally got the time to upload my implementation that allows me use my custom xml layout, reference widgets from the layout in my extended FingerprintDialogFragment => "ZetagikCustomFingerprintDialogFragment" and even change the dialog type to "BottomSheetDialog".
Also, don't forget to modify your MainApplication.cs to use this customised FingerprintDialogFragment.

Hope this answers the questions related to customisations and @smstuebe accepts my PR since it modifies only the sample project and can serve as a guide for others too hopefully.

c726247

from xamarin-fingerprint.

ChaseFlorell avatar ChaseFlorell commented on August 11, 2024 2

Well I took a stab at tinting your image and it seems to work. For anyone else...

public class CustomFingerprintDialogFragment : FingerprintDialogFragment
{
    public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        var view=base.OnCreateView(inflater, container, savedInstanceState);

        var image = view.FindViewById<ImageView>(Resource.Id.fingerprint_imgFingerprint);
        image.SetColorFilter(Color.ParseColor("#000000")); // black 
            
        return view;
    }
}

from xamarin-fingerprint.

smstuebe avatar smstuebe commented on August 11, 2024 2

I know we can create a custom Fragment, but I'm not sure how that works within your plugin.

See the documentation: https://github.com/smstuebe/xamarin-fingerprint#configuration

public class MyCustomDialogFragment : FingerprintDialogFragment
{
    public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        var view = base.OnCreateView(inflater, container, savedInstanceState);
        var image = view.FindViewById<ImageView>(Resource.Id.fingerprint_imgFingerprint);
        image.SetImageResource(Resource.Drawable.fingerprint_black);
        return view;
    }
}

Unfortunately, the fragment is calling ClearColorFilter() after each animation. That's why you have to add a black copy of the icon to your project.

I'll change the code, so you will be able to set a tint for the icon in the next release.

from xamarin-fingerprint.

smstuebe avatar smstuebe commented on August 11, 2024 2

-> 1.4.6
You can set DefaultColor in a custom dialog now.

from xamarin-fingerprint.

foehammer88 avatar foehammer88 commented on August 11, 2024 1

@smstuebe any update on this?

from xamarin-fingerprint.

smsissuechecker avatar smsissuechecker commented on August 11, 2024

Hi @ChaseFlorell,

I'm the friendly issue checker.
Thanks for using the issue template 🌟
I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

from xamarin-fingerprint.

ChaseFlorell avatar ChaseFlorell commented on August 11, 2024

That would be pretty cool @smstuebe. For now my workaround will do just fine.

from xamarin-fingerprint.

smstuebe avatar smstuebe commented on August 11, 2024

Sure? have you tested a negative try where the icon turns red and then back to white? I'd be suprised, if it turns back to black.

Btw: don't close it. It contains a new feature request ^^

from xamarin-fingerprint.

ChaseFlorell avatar ChaseFlorell commented on August 11, 2024

ah, you are right. If I scan the correct finger, it goes green then disappears (thats what I tested). When I use the incorrect finger, it goes red then goes white.

from xamarin-fingerprint.

ChaseFlorell avatar ChaseFlorell commented on August 11, 2024

Not sure I can submit a PR, but here's my thought.

        private async Task AnimateFailedTryAsync()
        {
            if (_icon == null)
                return;
            var originalColorFilter = _icon.ColorFilter;
            _icon.SetColorFilter(NegativeColor);
            var shake = ObjectAnimator.OfFloat(_icon, "translationX", -10f, 10f);
            shake.SetDuration(500);
            shake.SetInterpolator(new CycleInterpolator(5));
            await shake.StartAsync();
            _icon.SetColorFilter(originalColorFilter);
        }

from xamarin-fingerprint.

NightOwlCoder avatar NightOwlCoder commented on August 11, 2024

Hey guys, was this fixed?
I'm having a hard time on my app with the white on white...

from xamarin-fingerprint.

smstuebe avatar smstuebe commented on August 11, 2024

oupsi, no. I'll move it to Milestone 1.4.6.

from xamarin-fingerprint.

ruisilva450 avatar ruisilva450 commented on August 11, 2024

As of now there is a way that I can apply my own FingerprintCustomDialog.axml?
If I do that in the OnCreateView it will lose the bindings even if I use the same resource ids that you use in your .axml file.

from xamarin-fingerprint.

marualderete avatar marualderete commented on August 11, 2024

@smstuebe is there any way to customize the text color of "Cancel" button? It is taking native color right now.

Kind regards

from xamarin-fingerprint.

alvynfash avatar alvynfash commented on August 11, 2024

@smstuebe any update on this?

You can do this =>

public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
return inflater.Inflate(Resource.Layout.some_xml_file, container, false);
}

from xamarin-fingerprint.

Bogenbai avatar Bogenbai commented on August 11, 2024

-> 1.4.6
You can set DefaultColor in a custom dialog now.

Hello! How can I change tooltip text color in the dialog?

from xamarin-fingerprint.

alvynfash avatar alvynfash commented on August 11, 2024

-> 1.4.6
You can set DefaultColor in a custom dialog now.

Hello! How can I change tooltip text color in the dialog?

@bogadev get reference to the widget in the onCreateView override then customise it as you want

from xamarin-fingerprint.

Bogenbai avatar Bogenbai commented on August 11, 2024

-> 1.4.6
You can set DefaultColor in a custom dialog now.

Hello! How can I change tooltip text color in the dialog?

@bogadev get reference to the widget in the onCreateView override then customise it as you want

Thank you for the answer! Could you please give an example? Because Im really stuck at this point

from xamarin-fingerprint.

georgeharnwell avatar georgeharnwell commented on August 11, 2024

I could do with some examples on this. I can only seem to find the background property to update. Not text color.

from xamarin-fingerprint.

Bogenbai avatar Bogenbai commented on August 11, 2024

I could do with some examples on this. I can only seem to find the background property to update. Not text color.

I found how to change background color, that was pretty simple, but text color changing looks really complicated. If you could help, I would be very grateful

from xamarin-fingerprint.

georgeharnwell avatar georgeharnwell commented on August 11, 2024

That is NICE! Thank you!

from xamarin-fingerprint.

Bogenbai avatar Bogenbai commented on August 11, 2024

@alvynfash you are just... wizard.
Thank you so much

from xamarin-fingerprint.

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.