Skip to content

Commit

Permalink
App reduced to minimal functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayank Narula committed Nov 28, 2017
1 parent 4927d96 commit 44a4686
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ typings/

# All json files
*.json
!serviceAccountKey.json
!package*

# All rules
Expand Down
2 changes: 1 addition & 1 deletion App/SmartHome/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ static void configSmartHome(View rootView, MainActivity current) {
current.tv.setText("NO INTERNET CONNECTION");
current.statusCard = rootView.findViewById(R.id.statusCard);
current.alertCard = rootView.findViewById(R.id.notifCard);
current.roomCard = rootView.findViewById(R.id.roomCard);
current.peersCard = rootView.findViewById(R.id.groupCard);
current.statusCard.setVisibility(View.INVISIBLE);
current.alertCard.setVisibility(View.INVISIBLE);
current.roomCard.setVisibility(View.INVISIBLE);
current.peersCard.setVisibility(View.INVISIBLE);
rootView.findViewById(R.id.homePage)
.setBackgroundDrawable(current.getResources().getDrawable(R.drawable.app_background));
Helpers.fixBackgroundRepeat(rootView.findViewById(R.id.homePage));
Expand All @@ -94,6 +97,7 @@ public void onDataChange(DataSnapshot dataSnapshot) {
finalCurrent.alertCard.setVisibility(View.VISIBLE);
v.findViewById(R.id.roomCard).setVisibility(View.VISIBLE);
finalCurrent.roomCard.setVisibility(View.VISIBLE);
finalCurrent.peersCard.setVisibility(View.VISIBLE);
finalCurrent.statusCard.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class MainActivity extends AppCompatActivity {
TextView tv,lightValue,humValue,tempValue,msg;
DatabaseReference userDB,sensorDB,alertsDB;
Switch motion;
CardView statusCard,roomCard,alertCard;
CardView statusCard,roomCard,alertCard,peersCard;
ImageView img;
RecyclerView alertsList;
ArrayList<Alert> myAlerts;
Expand Down

0 comments on commit 44a4686

Please sign in to comment.