Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculator-Store user's previous marks #51

Closed

Conversation

vgoyal1996
Copy link
Contributor

Added functionality to CalculatorActivity.java to store and retrieve user's previous marks. Marks are stored in the form of a text file in phone's memory. Marks are stored in the file when the user hits the "Calculate" button. Option for retrieving previous marks is provided in the overflow menu. If marks for the chosen semester and branch are available, they are retrieved otherwise, a "marks not available" message is given. Sorry for the misleading branch name :)

Swati4star and others added 30 commits August 24, 2016 19:43
Revised README.md
…lar style

Change star to "like" while maintaining circular style
<merge> causes crash in all lollipop devices.
@Swati4star
Copy link
Member

Hi @vipulabhay1996 Can you please work on why the checks are failing?

Also a suggestion, improve the future commit messages, and mention what you are actually changing in that commit.

@vgoyal1996
Copy link
Contributor Author

@Swati4star Thank you for the suggestion. Will keep in mind.
Can you please clarify what checks are you referring to?

@Swati4star
Copy link
Member

Travis Check. You must be able to see the message 'All checks have failed'
Check that.

@vgoyal1996 vgoyal1996 closed this Apr 18, 2017
@vgoyal1996 vgoyal1996 reopened this Apr 18, 2017
Fixed some bugs in CalculatorActivity.java
@vgoyal1996 vgoyal1996 closed this Apr 18, 2017
@vgoyal1996 vgoyal1996 reopened this Apr 18, 2017
@@ -154,6 +154,8 @@
<string name="st11" />
<string name="st12" />
<string name="percentage" />
<string name="action_show_previous_marks">show previous marks</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change it to 'Show previous marks'

S capital

private TextView tc10, tc11, tc12, tc9, tc4, tc5, tc1,tc2,tc3,tc8,tc7,tc6,rs;
private double n1=-1.0, n2=-1.0, n3=-1.0, n4=-1.0, n5=-1.0, n6=-1.0, n7=-1.0, n8=-1.0, n9=-1.0, n10=-1.0, n11=-1.0, n12=-1.0;
private EditText t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the name of all the variables to something appropriate. Something these variables signify.

@vgoyal1996 vgoyal1996 closed this Apr 18, 2017
@vgoyal1996 vgoyal1996 reopened this Apr 18, 2017
@vgoyal1996
Copy link
Contributor Author

@Swati4star changed the variable names.
please check.

@Swati4star
Copy link
Member

Swati4star commented Apr 19, 2017

Don't close and reopen the PR again and again.

I have added one more change.

tc12.setTextColor(getResources().getColor(R.color.calculator_notselected));
} else if (s2.getSelectedItem().toString().equals("Sem 6")) {
PR5textView.setTextColor(ContextCompat.getColor(getContext(),R.color.calculator_notselected));
PR4textView.setTextColor(ContextCompat.getColor(getContext(),R.color.calculator_notselected));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line textView.setTextColor(ContextCompat.getColor(getContext(),R.color.calculator_notselected)); is being repeated a lot. Why don't you create a function that do this.

A function that takes 2 arguments : textview and color, and performs the task.

@Swati4star
Copy link
Member

Also, a suggestion, use Butterknife in the project. We would eventually be doing this later.

@vgoyal1996
Copy link
Contributor Author

@Swati4star please review the changes.

@Swati4star
Copy link
Member

👍 Great @vipulabhay1996 I will once test the app by running the code. Changes seems fine.

@vgoyal1996
Copy link
Contributor Author

@Swati4star any updates?

@Swati4star Swati4star force-pushed the master branch 3 times, most recently from 11265bb to 47306e9 Compare April 25, 2017 08:44
@Swati4star
Copy link
Member

merged 👍 Thanks!

@Swati4star Swati4star closed this Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants