After contributing to my first open source project FilerJS, it was time to start contributing to more open source projects. This week, I worked on Sloth android application which is managed by Kolten Sturgill.
Sloth is an Android note-taking app developed by Mobi Social Coding Team. I had to redirect the user to a new settings page when clicked. At first, the issue seemed pretty easy but, setting up the environment took me more than three hours. And then understanding the code was also a bit difficult. I asked for permission to work on it.
Setting up the Environment
- I forked the repository.
- I cloned the repo and opened it in Android Studio.
- I faced version problems, so had to tweak the build.gradle file.
- Then I built the project on my physical device, to check there were no errors.
Now, it was time to make code changes. I modified the MainActivity.java file to redirect the user to the new settings page. I had to add two lines in the if statement.
After modifying MainActivity.java, I had to add a new SettingsActivity.java and activity_settings.xml to the project.
After making all the changes, I then re-tested the application to make sure it wasn’t breaking. And then, I pushed my change to a new branch referencing the issue. My changes got merged with the master branch luckily.