droidchef / android-lockpattern

Automatically exported from code.google.com/p/android-lockpattern
Apache License 2.0
0 stars 0 forks source link

Enhancement Request in a Way that Library can support Fragments #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. It is Enhancement Request

What is the expected output? What do you see instead?
A new class presents beside PatternLockActivity in Pattern Lock main package. 
This class say PatternLockFragment extends Fragment can be used in user 
projects and send feedback to users Host Fragment Activity.

What version of the product are you using? On what operating system?
3.0.3 on 4.4.2

Please provide any additional information below.
In Tablets and latest android versions it is advised to use Fragments. So Is it 
possible that you make some enhancements to PatternLockActivity and produce its 
new version beside it LIKE a Fragment e.g "PatternLockFragment extends 
Fragment" and user can easily use it with Fragment-adapter. :) 

Original issue reported on code.google.com by mian.mub...@gmail.com on 11 Jan 2014 at 9:46

GoogleCodeExporter commented 9 years ago
Hi again,

Thanks for the issue. In this case we'll wait for votes.

Have a nice weekend  :-)

Sincerely,
Hai

Original comment by haibison...@gmail.com on 11 Jan 2014 at 10:12

GoogleCodeExporter commented 9 years ago

Original comment by haibison...@gmail.com on 17 Jan 2014 at 3:14

GoogleCodeExporter commented 9 years ago
+ 1

Original comment by nom...@gmail.com on 31 Mar 2014 at 9:59

GoogleCodeExporter commented 9 years ago
It will be useful since moderm application adopt more and more fragment 
application based architecture 

Could you please give us a feedback if you take in account this (useful) 
request ?

Regards

N.O.

Original comment by nom...@gmail.com on 31 Mar 2014 at 10:02

GoogleCodeExporter commented 9 years ago
Could you (N.O. and others) please add some scenarios using this library as 
fragments? It would be great...

Original comment by haibison...@gmail.com on 31 Mar 2014 at 10:18

GoogleCodeExporter commented 9 years ago
Hello Haibison,

Of course, imagine the case when you have a ViewPager and you want to grant 
access of one of this page only to authenticated users, as you know ViewPager 
use Fragments, and in this scenario it would be great to integration your 
library but for that it should be extend Fragment and not only Activity ...

I have some others scenario, please let me know if I should to develop other 
use cases

Original comment by nom...@gmail.com on 31 Mar 2014 at 12:53

GoogleCodeExporter commented 9 years ago
Thank you N.O. It's simple like that but I couldn't figure it out before, what 
a shame  :-(

I'll find some time to start working on this issue...

(Sorry for the delay.)

Original comment by haibison...@gmail.com on 1 Apr 2014 at 8:14

GoogleCodeExporter commented 9 years ago
Hello Haibison,

Great, have you an idea about the date when this improvement will be available ?

Regards,

N.O.

Original comment by nom...@gmail.com on 2 Apr 2014 at 9:01

GoogleCodeExporter commented 9 years ago
@N.O.,

I hope it could be within this month. I'll try  :-)

Original comment by haibison...@gmail.com on 2 Apr 2014 at 12:13

GoogleCodeExporter commented 9 years ago
Perfect, please let me know when you look for someone to test this improvement 
;-)

Original comment by nom...@gmail.com on 2 Apr 2014 at 12:40

GoogleCodeExporter commented 9 years ago
Thank you, how nice  :-)

Original comment by haibison...@gmail.com on 2 Apr 2014 at 1:58

GoogleCodeExporter commented 9 years ago
I have a rather crude implementation of a fragment based on this library.

It does not implement the logic for authentication, but it does have the same 
events as `LockPatternView.OnPatternListener`.

Would a patch containing this help?

Original comment by tiesdek...@gmail.com on 2 Apr 2014 at 2:03

GoogleCodeExporter commented 9 years ago
@tiesdek...,

Thanks, it'd be great.

Original comment by haibison...@gmail.com on 2 Apr 2014 at 2:07

GoogleCodeExporter commented 9 years ago
I'm very sorry. Today is the third Sunday I've been working on my freelance 
projects. It looks like I'll need a day-off tomorrow of something, as I guess 
there will be more Sundays like this one  :-(

Unfortunately I can't continue working on this issue and deliver the solution 
within this month as I said.

I'll try in another day...

Original comment by haibison...@gmail.com on 20 Apr 2014 at 5:14

GoogleCodeExporter commented 9 years ago
Thank you Haibison for your feedback, if you cannot achieve it in one month 
that's not a issue, take your time but please just let us know when you have a 
version candidate to test, your library is great I would like use it.

N.O.

Original comment by nom...@gmail.com on 20 Apr 2014 at 5:18

GoogleCodeExporter commented 9 years ago
I just realised that I forgot about this post :-(.

Unfortunately my project has diverged too far from the android-lockpattern code 
to
be a clean change to android-lockpattern. All the functionality in 
LockPatternActivity has been moved around, since we wanted a different workflow.

I spotted the rewrite with the nicer separation of concerns in the commit 
history. This is
cleaner than the solution I wrote.

We measured the touch events during the lock pattern and used this data to try 
and identify unique users performing a similar pattern.

In any case, a refactored/untested version of the fragment we used is posted at 
https://gist.github.com/ties/659af336283ac4c5cf82 . 

tldr;

If you want to use this lib as a fragment:
  * create a fragment, wrapping the LockPatternView.
  * re-write the logic that is in LockPatternActivity so it can be shared between LockPatternActivity and the fragment (I did not do this..)
  * delegate the events from the view to the activity surrounding the fragment if needed.
  * make sure that the enclosing Activity of the fragment is able to receive the events
    emitted by the view ("enclosing activity is an instance of ...Listener). The fragment delegates the calls it receives to the activity.

Original comment by tiesdek...@gmail.com on 16 Nov 2014 at 4:48