Skip to content

Conversation

@Avjeet
Copy link
Contributor

@Avjeet Avjeet commented Aug 2, 2018

Fixes #1322 #1316
Fixes #1321

Changes:

  • Stored the lux sensor data in Realm database in LuxData.class model instead of CSV file.
  • Added lux data records in form of card items with delete option in newly created DataLogger Activity.
  • Added Logged Data in navigation panel that opens DataLoggerActivity
  • Prevented the unnecessary repetition of data by removing for loop
  • Created option to open DataLoggerActivity from lux meter menu.(As discussed in previous meeting)

To do: Show the data in Logged Data Activity in form of graph instead of the list.

Screenshot/s for the changes
Below GIF shows the complete workflow[Updated - 11/08/2018]

Checklist: [Please tick following check boxes with [x] if the respective task is completed]

  • I have used resources from strings.xml, dimens.xml and colors.xml without hard-coding them
  • No modifications done at the end of resource files strings.xml, dimens.xml or colors.xml
  • I have reformatted code in every file included in this PR [CTRL+ALT+L]
  • My code does not contain any extra lines or extra spaces
  • I have requested reviews from other members

APK for testing: realm.zip

@CloudyPadmal
Copy link
Collaborator

CloudyPadmal commented Aug 3, 2018

@Avjeet in the recent meeting there was a format suggested. Can you please implement that? Also please fix one issue in one PR. It's one of the best practices we have to follow.

@CloudyPadmal CloudyPadmal added the Status: Review Required Requested reviews from peers and maintainers label Aug 3, 2018
@Avjeet Avjeet added the In Progress Developer is working on the problem label Aug 3, 2018
@Avjeet
Copy link
Contributor Author

Avjeet commented Aug 3, 2018

@CloudyPadmal Actually all these issues are linked in some way so for proper resolution of all of them I had to make one PR,

@Avjeet
Copy link
Contributor Author

Avjeet commented Aug 3, 2018

@CloudyPadmal I have updated the screenshot

@CloudyPadmal
Copy link
Collaborator

Ah now it looks good! 👍

import io.realm.RealmResults;

/**
* Created by Your name on 03-08-2018.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we remove this?

/**
* Created by Your name on 03-08-2018.
*/
class LuxDataAdapter extends RecyclerView.Adapter<LuxDataAdapter.ViewHolder> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to create a generic adapter for every instrument?

@Override
public void onClick(View view) {
RealmResults<LuxData> results = realm.where(LuxData.class).equalTo("foreignKey",temp.getUniqueRef()).findAll();
Log.i("realmResult",String.valueOf(results.size()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Once you have finalized this PR, please remove this..

// })
// .setNegativeButton(R.string.cancel, null)
// .create()
// .show();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess these comments are in WIP right?

@CloudyPadmal CloudyPadmal removed the Status: Review Required Requested reviews from peers and maintainers label Aug 4, 2018
@Avjeet Avjeet removed the In Progress Developer is working on the problem label Aug 4, 2018
@Avjeet
Copy link
Contributor Author

Avjeet commented Aug 4, 2018

@CloudyPadmal I have removed the CSV saving part, for now, I will implement it in Logged Data Activity later.

import io.realm.RealmResults;

/**
* Created by Your name on 03-08-2018.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Either change this to Avjeet or delete this template block


/**
* Created by viveksb007 on 12/8/17.
* deprecated
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this file is no needed, we can delete it right?



/**
* Created by Your name on 31-07-2018.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, template

android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:text="Lux Meter"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess these are dummy texts right?

@CloudyPadmal CloudyPadmal added the Status: Review Required Requested reviews from peers and maintainers label Aug 5, 2018
@CloudyPadmal CloudyPadmal added the Status: Conflicts Merge conflicts blocking reviews and merges label Aug 7, 2018
@Avjeet Avjeet force-pushed the Avi_realm branch 2 times, most recently from ca9af48 to 4b9cf91 Compare August 7, 2018 10:16
@Avjeet
Copy link
Contributor Author

Avjeet commented Aug 7, 2018

@CloudyPadmal @harsh-2711 @abhinavraj23 I have updated this PR as discussed in meeting and uploaded the apk file, plz review it asap.
I will make the changes regarding setting part in next PR.

@Avjeet Avjeet removed the Status: Conflicts Merge conflicts blocking reviews and merges label Aug 7, 2018
@cweitat
Copy link
Contributor

cweitat commented Aug 7, 2018

@Avjeet conflicts pls solve

@Avjeet
Copy link
Contributor Author

Avjeet commented Aug 10, 2018

@CloudyPadmal @harsh-2711 @abhinavraj23 I have rebased the code with new icons pls review this

@Avjeet
Copy link
Contributor Author

Avjeet commented Aug 12, 2018

merged with #1347

@Avjeet Avjeet closed this Aug 12, 2018
@CloudyPadmal CloudyPadmal removed the Status: Review Required Requested reviews from peers and maintainers label Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants