Every single one of my apps need something like this. It's boring to explain in more details what's traditionally needed to make sure an AlertDialog is only shown once. Now, with this OneTimeAlertDialog.java, it's much easier to create new AlertDialogs that are only shown once.
/** Prompt that is only shown once to user. */
OneTimeAlertDialog.Builder(this, "my_dialog_key")
.setTitle("My Title")
.setMessage("My Message")
.show();
For something I use so often, I was surprised to not find a similar project on GitHub. So, I've added it: Android OneTimeAlertDialog
~ Danial Goodwin ~
Showing posts with label time. Show all posts
Showing posts with label time. Show all posts
2015-02-13
2014-08-30
Level Up - Android: Speed up your Gradle build times with one-line!
Whether or not you are using Android Studio, Gradle build times are slow (especially when you don't have continuous automated builds (another discussion)).
Here's one way to improve the speed Gradle commands like `assembleRelease` is to enable the Gradle daemon. I've sped up my release builds by about 20%!
Here's one way to improve the speed Gradle commands like `assembleRelease` is to enable the Gradle daemon. I've sped up my release builds by about 20%!
2014-02-17
Level Up - Programmer: How To Quickly Setup And Use Git And GitHub
A long time ago, the first time I started trying to learn Git and GitHub, I thought it was an unnecessarily complex process. All I wanted was simple version control and easy collaboration. So, instead of learning Git, I just made everything really modular. For one of my teams, we even just worked in completely different files, and it worked out okay.
But, now, I want to explain the absolute basics on how to start, in order to drastically reduce the learning curve. You can always find more detailed information later. And, you can get started right now!
Assumptions:
- You already know what Git is.
- You are running Windows OS.
- You already have folder/file(s) in mind for added a version control system to or want to do easy collaboration on code projects.
- You want to get started with GitHub.
- You are okay with basic instructions meant for the easiest use of Git/GitHub.
Git
Step 1: Download Git.
- Make sure you have "Git Bash" to be installed also, and you can add it to your [right-click] contextual menu also during the install process. (And/or you can add Git to your Path.)
Step 2: Configure Git.
- Open Git Bash (either right-click in file explorer or find it through search)
- Type the following two lines into the console, and change the red parts to your own information:
Step 3: Setup project to work with Git.
- Navigate (using cd) the console to the directory where you want to enable Git.
- Run the following lines to setup the folder to work with Git and "save" all the files in the directory.
And, now you have version control. Just do those last two lines again whenever you want to save a new version. Change the red part to something descriptive of the change.
GitHub
Step 4: Create a GitHub account.
- If this is your first time using GitHub, you will need to create an SSH key. After entering the following, hit enter again to save to default location (your user folder/.ssh).
- Check for success by running:
Step 5: Create a new repository (sometimes called a "repo")
- Click the big green button somewhere on GitHub that says "New repository"
- Name the repo and create it.
- On the page you are navigated to, find/copy the "SSH clone URL". This will be used in the next step and looks something like, "git@github.com:danialgoodwin/MyFirstRepoNameHere.git"
Step 6: Pull From GitHub, then Push To GitHub.
- Setup the location that you will push to and pull from. The part in red should be substituted with your info from step 5. (The following should all be on one line.)
For more great information and details, please visit:
- Easy Version Control with Git
- Official GitHub site, there should be large buttons wanting to help you further.
~ Danial Goodwin ~
But, now, I want to explain the absolute basics on how to start, in order to drastically reduce the learning curve. You can always find more detailed information later. And, you can get started right now!
Assumptions:
- You already know what Git is.
- You are running Windows OS.
- You already have folder/file(s) in mind for added a version control system to or want to do easy collaboration on code projects.
- You want to get started with GitHub.
- You are okay with basic instructions meant for the easiest use of Git/GitHub.
Git
Step 1: Download Git.
- Make sure you have "Git Bash" to be installed also, and you can add it to your [right-click] contextual menu also during the install process. (And/or you can add Git to your Path.)
Step 2: Configure Git.
- Open Git Bash (either right-click in file explorer or find it through search)
- Type the following two lines into the console, and change the red parts to your own information:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
Step 3: Setup project to work with Git.
- Navigate (using cd) the console to the directory where you want to enable Git.
- Run the following lines to setup the folder to work with Git and "save" all the files in the directory.
git initgit add .
git commit -m "Initial commit"
And, now you have version control. Just do those last two lines again whenever you want to save a new version. Change the red part to something descriptive of the change.
GitHub
Step 4: Create a GitHub account.
- If this is your first time using GitHub, you will need to create an SSH key. After entering the following, hit enter again to save to default location (your user folder/.ssh).
ssh-keygen -t rsa -C "your@email.com"- The console tells you where the public key has been saved. Open that file in Notepad++ and save the contents to GitHub.com->Profile->Edit Profile->SSH Keys->Add SSH Key. (Each arrow -> is basically another click.)
- Check for success by running:
ssh git@github.com
Step 5: Create a new repository (sometimes called a "repo")
- Click the big green button somewhere on GitHub that says "New repository"
- Name the repo and create it.
- On the page you are navigated to, find/copy the "SSH clone URL". This will be used in the next step and looks something like, "git@github.com:danialgoodwin/MyFirstRepoNameHere.git"
Step 6: Pull From GitHub, then Push To GitHub.
- Setup the location that you will push to and pull from. The part in red should be substituted with your info from step 5. (The following should all be on one line.)
git remote add origin git@github.com:andrew8088/Shazam.git- You always want to "pull" from GitHub before you begin your work because others may have updated the code:
git pull origin master- Now, you can finally update your code to GitHub!
git push origin master
For more great information and details, please visit:
- Easy Version Control with Git
- Official GitHub site, there should be large buttons wanting to help you further.
~ Danial Goodwin ~
2014-01-31
Structure Allows Spontaneity and Creativity
Having structure in your life allows you to worry less about the menial aspects of daily tasks. For example, you don't have to spend time thinking when you are going to do something if you already have a specific time for it. By not wasting any precious brain power on the menial tasks, it opens up space and time to use the brain for higher functionality.
My Two Cents.
~ Danial Goodwin ~
ps - Originally not planned for this post, a great example of this concept being put into practice will come from Google. They do all the menial tasks for their employees, including food, laundry, baby sitting, gym, transportation, and more. This may seem like it costs a lot to have, but if you consider the well-being of the employees (less sick days) and while at work employees can put their full minds onto the work, rather than having any nagging sensation, like what/where to eat, how the kids are doing, or even transportation worries (Google shuttles/buses).
My Two Cents.
~ Danial Goodwin ~
ps - Originally not planned for this post, a great example of this concept being put into practice will come from Google. They do all the menial tasks for their employees, including food, laundry, baby sitting, gym, transportation, and more. This may seem like it costs a lot to have, but if you consider the well-being of the employees (less sick days) and while at work employees can put their full minds onto the work, rather than having any nagging sensation, like what/where to eat, how the kids are doing, or even transportation worries (Google shuttles/buses).
2013-12-25
My Notes on Albert Einstein Ideas (As Presented by This Documentary)
(In this post, I talk about different ideas I have about Albert Einstein's thoughts. These ideas either expand Einstein's thoughts or tries to poke holes in them. This comes from my not unlimited knowledge, in that, I am unsure if others have had the same ideas as myself. Some places I don't add my ideas, but just reiterate what the documentary said.)
Albert Einstein Documentary on Youtube
Notes: This is in the early rough draft stages and is not really about the film. I could write at least 5-10 times at much for all the information I know and can think of for this particular topic of space-time. The main purpose for mentioning the film is because it is a great source of mostly unbiased knowledge and it doesn't try to push misinformation. I watched a NOVA video after this and it was full of misinformation, seemed like it was published just for naive public and to generate hype/views.
Albert Einstein Documentary on Youtube
Notes: This is in the early rough draft stages and is not really about the film. I could write at least 5-10 times at much for all the information I know and can think of for this particular topic of space-time. The main purpose for mentioning the film is because it is a great source of mostly unbiased knowledge and it doesn't try to push misinformation. I watched a NOVA video after this and it was full of misinformation, seemed like it was published just for naive public and to generate hype/views.
2013-11-03
Quote: You Have Time For Anything, But Not Everything
Today, while I was thinking about being able to make time for blog posts or not, I thought of "You have time for anything, but not everything."
But, that doesn't mean that I won't try!
~ Simply Advanced ~
But, that doesn't mean that I won't try!
~ Simply Advanced ~
2013-08-17
Idea: Door Locks
Locks with timers for doors. They can only stay open for a car for a certain amount of time. Maybe have a permanent mode also.
~ Simply Advanced ~
~ Simply Advanced ~
2013-02-22
Procrastination Hack - Limit the Time Between Thinking and Doing
"Limit the time between thinking and doing." - Procrastination hack.
I'm sure I've read about this somewhere else, but I didn't find it with a quick "exact-phrase" search.
The goal is to stop putting so many items on a todo list and just do them as you think of them. One of the benefits is that you actually get stuff done rather than just thinking about it.
If you are actively participating in an activity or task, then you clear your mind of another task by writing it down. Current evolution of humans allows us to truly excel at just one task at a time. When we try to do more than one thing at a time, results are typically less than doing each of them individually.
Since I feel this needs an example.. Off the top of my head: I can juggle whilst riding a bike (multitask). But, if I were to do either of them individually, then it would be done much better.
~ Simply Advanced ~
I'm sure I've read about this somewhere else, but I didn't find it with a quick "exact-phrase" search.
The goal is to stop putting so many items on a todo list and just do them as you think of them. One of the benefits is that you actually get stuff done rather than just thinking about it.
If you are actively participating in an activity or task, then you clear your mind of another task by writing it down. Current evolution of humans allows us to truly excel at just one task at a time. When we try to do more than one thing at a time, results are typically less than doing each of them individually.
Since I feel this needs an example.. Off the top of my head: I can juggle whilst riding a bike (multitask). But, if I were to do either of them individually, then it would be done much better.
~ Simply Advanced ~
2013-01-28
Lease Renewal
Feels like I'm signing my life away to the apartment I'm staying at. One year is a very long time to have a housing lease, especially since I'm graduating in with my Computer Engineering Bachelors in May. There have been multiple job offers, but I'm still thinking of starting my own mobile app development business Simply Advanced, LLC, which I have already purchased. So, I guess a little structure in my life as I work on the business 120 hours a week might be a little good.
~ Simply Advanced ~
~ Simply Advanced ~
2013-01-19
Procrastination Versus Doing Dishes
tldr: Every time, I clean my dishes right after I finish eating or cooking. I don't care for doing the dishes, but I dislike procrastination even more.
It feels good knowing that I have a clear mind so that I can focus 100% of my brain power on just a single activity. I wouldn't want it any other way.
~ Simply Advanced ~
- Dishes are easier to clean right after eating.
- I'm going to wash my hands after eating. So, by combining hand washing and doing dishes together I save time by only having to dry my hands once.
- This saves me from procrastinating on other works in the future because my areas are already clean.
- I have clean dishes for next time I eat sitting in the dish rack. Grabbing a dish from the dish rack is faster than open and closing a cabinet. Bonus quick seconds add up.
It feels good knowing that I have a clear mind so that I can focus 100% of my brain power on just a single activity. I wouldn't want it any other way.
~ Simply Advanced ~
2012-07-24
Get Things Done - Priority List
Recently, a friend commended me for the ability to concentrate and stay productive throughout the day, day after day.
One thing about me is that I treat my [Internet] bookmarks and emails as a todo list. I also have a physical and virtual notepad on both my physical and virtual desktop where I keep track of things I want/need to do.
But, just having todo lists isn't enough for many people. So, for those who don't have the willpower to take a "just do it" attitude towards daily and/or important tasks, there is a solution.
Or
Get started now. You don't need to waste time reading more productivity guides and how-to's; Any thing besides what's on the priority list will just waste your valuable time.
~ Simply Advanced ~
One thing about me is that I treat my [Internet] bookmarks and emails as a todo list. I also have a physical and virtual notepad on both my physical and virtual desktop where I keep track of things I want/need to do.
But, just having todo lists isn't enough for many people. So, for those who don't have the willpower to take a "just do it" attitude towards daily and/or important tasks, there is a solution.
Or
- Think of your todo lists as priority lists instead. And, there can only be one #1 priority task to do at a time. Then, just do that task without thinking whether or not you should do that one or something else.
Get started now. You don't need to waste time reading more productivity guides and how-to's; Any thing besides what's on the priority list will just waste your valuable time.
~ Simply Advanced ~
Subscribe to:
Posts (Atom)