Code Monkey home page Code Monkey logo

random-name-picker's Introduction

Download

Get it on Google Play

The Code Doesn't Compile?

If you run this code, you will get a compilation error telling you that the PremiumBackDoor class doesn't exist. The purpose of this class is to create a password that developers (and friends of the developers) can enter in to get Random Name Picker Premium for free. Simply create your own PremiumBackDoor.java with a public constant variable named "PASSWORD". You can set it to whatever you wish. When you type that string into the name list creator, you will get Random Name Picker Premium.

License

Copyright 2015-present Alexander Chiou

Licensed under the Apache License, Version 2.0 (the "License"); 
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

random-name-picker's People

Contributors

alaaalzibda avatar gear61 avatar jchio001 avatar mohammedhemaid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

random-name-picker's Issues

[Refactor][Homepage] Convert the homepage list to a RecyclerView

NOTE: This is a VERY hard task. So keep in mind that it will take us a while to complete it. :)

The homepage is where the user sees all their lists of names. This is a non-trivial refactor, so here's steps on how to do this:

  1. Stop using lists_with_add_content in activity_main.xml. I wrote this code a long time ago, so I made the mistake of creating a common layout to be reused (remember how I talked about the dangers of reusing entire pages in class?). We can't change lists_with_add_content directly, because we will then need to refactor another page as well to get this all working. We also need to move away from this layout since it's currently leading to unnecessary nesting, which hurts app performance.

  2. To add onto step #1, we will need to inline the views of lists_with_add_content into activity_main.xml. Feel free to copy-paste. We can refactor the copy-paste into a more "component"-like style later using styles. When we're inlining the views, we will need to use a RecyclerView instead of a ListView. For a code sample of RecyclerView in this codebase, check out settings.xml.

  3. Bind the view as a RecyclerView in MainActivity.java. While making changes to MainActivity.java, make note of the onItemClick() method. This is an API exposed by ListView which isn't exposed by RecyclerView unfortunately. We will need to mimic this pattern somehow...

  4. Refactor NameListsAdapter to implement the RecyclerView adapter pattern instead of BaseAdapter. Make sure the APIs exposed by both adapters are identical. Remember what I mentioned in step #3? We will need to define an interface in NameListsAdapter with a method to implement named "onItemClick()". We will then pass in an instance of this listener into the constructor of NameListsAdapter (this instance will be the MainActivity itself, have it implement this interface). This is how the adapter and the activity will talk to each other.

Fetching complete history and spinning feature in Random Name Picker

COMPONENT

Random name picker is an open source android application that fundamentally help you choose from a list of names at random. This app display names that are literally listed and are chosen at random for all intent and purpose depending on the chosen number of names to be displayed. In the chosen name history, only the chosen name is shown, time and date isn't displayed. Also the random pick is only one way, there isn't any way to spin other than clicking on CHOSE to show the name picked at random which made the app to be limited. Going further, i will give list of some features to enhance the project and i hope it would be put into consideration.

PROPOSAL

This app was built to randomly pick names listed under list name and it has been a very good measure taken to make the app a good one, However, i will like to add my points to further enhance it in other to make users have more fun using Random Name Picker.

DATE AND TIME
When name is picked at random from the app, the picked name is stored somewhere in the chosen name history which can later be accessed when such information is needed but no information is complete without date and time of occurrence which is missing in the history. The date and time each name is randomly picked should be included in the history for reference purpose .since the names are already recorded, the date and time can as well be placed at the front of each name in the "chosen name history. This will make the date and time traceable when needed.

SPIN THE ROULETTE

Since the app can only pick numbers at random by clicking on the "CHOSE" button below the listed names. It will be fun to have an alternative way of choosing names at random as the current design doesn't welcome some approaches .
To implement the spinning feature, the page on the app where names are picked at random will have a part as shown in the mock up that will be clicked to display a roulette in form of a pie chat. After names to be picked to random has been listed,the spin button will be clicked which will result in the display of a page showing the names in a circle (Roulette) . user can then click on spin below to select which ever name is pointed at by the pointer the moment the spinning circle stops.
This spinning feature can go a long way in making users catch fun with the app. The benefit below will shed more light and create some interesting effect.

MOCKS/UP

The images below shows the look of Random Name Picker with listed names
5678.png 1234.png
comparison between the present history page and the proposed one
name history.png name history 1234.png

The date and time will make the event track able any day any time.
From the image below, clicking the SPIN will open another page where a ROULETTE can be accessed to spin
hjhjhjhjhjhj.png
party games.png who to answer question.png
from the above images, the spinning feature can be used for fun by picking someone randomly and spinning the roulette to chose a task for the chosen person to perform...

BENEFIT
Having stated the features that might enhance the app, I believe it will go a long way in making it more unique.
The date and time will allow the user to get the accurate history of activities done on the app. For instance, if a raffle draw is organized and the app is used as the tool to pick names at random, it would be easier and stress free to get the information of the event as touching name of winners, Time and the date the raffle took place after the event is long gone. Sometimes, draws are drawn at interval or even days in between, so if date and time are not present, it would be difficult to get the accurate history of the activities. Though there might be a way to go about it, it would be inappropriate to get the date and time elsewhere which in some cases might not even be correct if proper arrangement was not made in the first place.
Really this might look simple but it will surely be of benefit.

The spinning feature will allow users to do more things with the app. apart from picking names by spinning, it can be used in birthday parties, home, schools and even get together events. Series of things can be done with the spinning feature.
As Random Picker normally randomly picks item from pre-defined lists setup on device. The spinning feature will integrate the process by making it more fun and exciting.
It can be used to groove a party!
People can watch in suspense as their name stays in the running – or is eliminated – until the final random name is left! Watching as the roulette spins will create a kind of excitement as people watch and wait to see who gets the pointer.
Choosing the random name and activities is part of the fun – a great attention from viewers

In conclusion
The Bar chart and pie chart are different but they work with the same list in arithmetic. So also the spinning roulette and current design of random name picker, they can virtually work on predefined list set up by user but the fun, excitement, and the presentation of the end product is incomparable.

Automatically tab to "Edit" when a list is created

When the user creates a new name list, we currently open the new list page to the "Choose" tab. This is a bad experience since the user can't do anything there. For this case, we should automatically switch to the "Edit" tab, so the user can start adding names immediately. This saves a click and improves the user experience.

Add a "repick" button

So if you choose A from the list, repick would choose something from the remaining list and then put A back in.

EditText touchups

  1. Add X to clear to each EditText
  2. Normalize it, setting the background to null and just using a view to emulate the background

Compress names with frequency

If there's 5 people named "Billy" it should show Billy (5).

We should also ship this alongside multi-delete so you don't need to delete one by one.

[Feature] Group maker v1

Our current UI effectively only allows you to make 1 group at once. The inspiring use case here is teachers who are splitting up their class into teams for a group project.

Collaboration Model:

  • We shouldn't merge these changes onto master, since master should represent what's in production and we want to break up the implementation of this (reviewing a 1,000 line pull request is not fun)
  • On your fork, creating a group-maker branch. You will submit pull requests from that branch into the group-maker branch on the core repository
  • Let's not do this feature all at once; it will make reviewing the pull requests and cleaning up the code very difficult. Let's break it up into small requests. I'm thinking an order like this:
  1. Add the new tab
  2. Add the empty state message and button
  3. Add the settings dialog
  4. Add the choosing logic. It will be a utility method that takes in a list of names (flat) and returns a list of lists of names (nested since it's a list of groups). We will not show the result in a list yet; just print it within a Toast and you can record that.
  5. Set up the adapter with the cards and show the chosen list of groups

For v1:

  • Choosing a single thing is still the most common use case. Choose should still be the first tab. Choose -> Groups -> Edit
  • Similar to choose, there will be settings icon at the top that opens a settings dialog. In the beginning, it will only have 2 parameters. The number of people in each group and how many groups are desired. By default, the page should create 1 group of 2. If the user enters in 0 for some reason (this will make the feature do nothing), change it to 1 similar to the "Choose" page to protect themselves from their stupidity.
  • Similar to the "Choose" page, we will anchor a "Make Groups" button to the bottom
  • The empty state of the group page will be an instructional message saying "Use the {ion-android-settings} icon to customize your groups and then tap "Make Groups" at the bottom"
  • When the groups are generated, we replace the empty state with a list of cards. Each card will say "Group #X and then have a new-line separated list of names in the group".

For v2 and beyond:

  • Show a warning on the settings dialog dynamically if the current settings are too much (e.g. asking for 5 groups of 2 with a name list of 9 people)
  • Show a warning on the settings dialog dynamically if the current settings will lead to uneven groups (same example as above, we will need to create a dangling group of 1)
  • Add a text to speech feature to read all the selected groups out loud
  • Allow certain names not to be paired with each other (maybe 2 students hate each other)

Backport Material Design

  1. Change add button to a cardview with a FontAwesome Icon for the raised button effect
  2. Backport dialogs
  3. Swap out Toasts with Snackbars

Figure out how number of names can go negative

  1. Have many instances of 1 name. Let's say 20.
  2. "Choose" some of them away (without replacement). Let's say we choose 10 and leave 10.
  3. Delete all instances of the name on the editing page (-20).
  4. Observe that there's -10 names now.

if Winner window loses focus, next CHOOSE fails

If you tap outside of the "And the lucky winner is ...." popup window and then hit CHOOSE nothing happens - you get no new choice.

If you select any of the 3 say name, copy text or ok options from this popup your next choice works, but not if you tap outside the white area of this popup.

You need to go out of the list to the main main, back to the list to get the CHOOSE function to work again, so there is a workaround, but seems like an unfortunate bug.

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.