-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
404 additions
and
72 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,40 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.example.nudgerewriten"> | ||
|
||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="Nudge" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity android:name=".activities.SplashScreenActivity" android:theme="@style/AppTheme1"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".activities.LoginActivity" android:theme="@style/AppTheme1"/> | ||
<activity android:name=".activities.MainActivity" android:theme="@style/AppTheme1" /> | ||
android:theme="@style/AppTheme" | ||
tools:replace="android:label"> | ||
<activity android:name=".activities.CropTimeLineActivity"></activity> | ||
<activity android:name=".activities.ScheduleCropActivity" /> | ||
<activity | ||
android:name=".activities.FarmerProfileActivity" | ||
android:theme="@style/FarmerStyle" /> | ||
<activity android:name=".activities.NewVisitActivity" /> | ||
<activity android:name=".activities.OrdersActivity" /> | ||
<activity android:name=".activities.VisitsActivity" /> | ||
<activity | ||
android:name=".activities.SplashScreenActivity" | ||
android:theme="@style/AppTheme1"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".activities.LoginActivity" | ||
android:theme="@style/AppTheme" /> | ||
<activity android:name=".activities.MainActivity" /> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 33 additions & 1 deletion
34
NudgeRewriten/app/src/main/java/com/example/nudgerewriten/fragments/FarmerListFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,50 @@ | ||
package com.example.nudgerewriten.fragments; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import android.support.design.widget.FloatingActionButton; | ||
import android.support.v4.app.Fragment; | ||
import android.support.v7.widget.LinearLayoutManager; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.Toast; | ||
|
||
import com.example.nudgerewriten.R; | ||
import com.example.nudgerewriten.adapters.Adapter_contact_list_1; | ||
|
||
import java.util.Arrays; | ||
|
||
public class FarmerListFragment extends Fragment { | ||
|
||
FloatingActionButton fabAdd; | ||
|
||
@Nullable | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
return inflater.inflate(R.layout.fragement_farmerlist, container, false); | ||
return inflater.inflate(R.layout.fragment_farmerlist, container, false); | ||
} | ||
|
||
@Override | ||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | ||
super.onViewCreated(view, savedInstanceState); | ||
|
||
RecyclerView farmer_contact_recycler =view.findViewById(R.id.farmer_contact_recycler); | ||
fabAdd = view.findViewById(R.id.fab_add); | ||
|
||
fabAdd.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
Toast.makeText(getContext(), "Add the farmer.", Toast.LENGTH_SHORT).show(); | ||
} | ||
}); | ||
|
||
farmer_contact_recycler.setLayoutManager(new LinearLayoutManager(view.getContext())); | ||
String[] data = {"Ankit Singh","Priyanka Patil","Aman Mohanty","Krishna Pati","Adyusha Pradhan","Rahul Gupta","Rohit Singh","Kapoora Todo","Dest 4","Eest 5","Fest 6","Gest 7","Hest 8","Iest 9"}; | ||
Arrays.sort(data); | ||
farmer_contact_recycler.setAdapter(new Adapter_contact_list_1(data)); | ||
|
||
} | ||
} |
60 changes: 59 additions & 1 deletion
60
NudgeRewriten/app/src/main/java/com/example/nudgerewriten/fragments/HomeFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,76 @@ | ||
package com.example.nudgerewriten.fragments; | ||
|
||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import android.support.v4.app.Fragment; | ||
import android.support.v7.widget.GridLayoutManager; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.view.LayoutInflater; | ||
import android.view.Menu; | ||
import android.view.MenuInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.TextView; | ||
|
||
import com.example.nudgerewriten.R; | ||
import com.example.nudgerewriten.activities.OrdersActivity; | ||
import com.example.nudgerewriten.activities.VisitsActivity; | ||
import com.example.nudgerewriten.adapters.ProductAdapter; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class HomeFragment extends Fragment { | ||
|
||
RecyclerView prodRcvId; | ||
TextView visitId,orderId; | ||
List<String> Products = new ArrayList<>(); | ||
|
||
ProductAdapter adapter; | ||
|
||
@Nullable | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
return inflater.inflate(R.layout.fragment_home, container, false); | ||
View v = inflater.inflate(R.layout.fragment_home, container, false); | ||
setHasOptionsMenu(true); | ||
|
||
for(int i =1;i<=6;i++) | ||
Products.add("Product "+i); | ||
return v; | ||
} | ||
|
||
@Override | ||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { | ||
inflater.inflate(R.menu.home_menu, menu); | ||
super.onCreateOptionsMenu(menu, inflater); | ||
} | ||
|
||
@Override | ||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | ||
super.onViewCreated(view, savedInstanceState); | ||
|
||
prodRcvId = getView().findViewById(R.id.prod_rcv_id); | ||
orderId = getView().findViewById(R.id.order_id); | ||
visitId = getView().findViewById(R.id.visit_id); | ||
|
||
prodRcvId.setLayoutManager(new GridLayoutManager(getActivity(),2,GridLayoutManager.HORIZONTAL,false)); | ||
adapter = new ProductAdapter(Products,getActivity()); | ||
prodRcvId.setAdapter(adapter); | ||
|
||
orderId.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
startActivity(new Intent(getActivity(), OrdersActivity.class)); | ||
} | ||
}); | ||
|
||
visitId.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
startActivity(new Intent(getActivity(), VisitsActivity.class)); | ||
} | ||
}); | ||
} | ||
} |
18 changes: 17 additions & 1 deletion
18
NudgeRewriten/app/src/main/java/com/example/nudgerewriten/fragments/ProfileFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
package com.example.nudgerewriten.fragments; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import android.support.design.widget.CollapsingToolbarLayout; | ||
import android.support.v4.app.Fragment; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import com.example.nudgerewriten.R; | ||
import com.rhexgomez.typer.roboto.TyperRoboto; | ||
|
||
public class ProfileFragment extends Fragment { | ||
|
||
private static CollapsingToolbarLayout collapsingToolbarLayout; | ||
|
||
@Nullable | ||
@Override | ||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { | ||
return inflater.inflate(R.layout.fragement_profile, container, false); | ||
return inflater.inflate(R.layout.fragment_profile, container, false); | ||
} | ||
|
||
@Override | ||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | ||
super.onViewCreated(view, savedInstanceState); | ||
|
||
collapsingToolbarLayout = view.findViewById(R.id.collapsing_toolbar); | ||
|
||
collapsingToolbarLayout.setCollapsedTitleTypeface(TyperRoboto.ROBOTO_REGULAR()); | ||
collapsingToolbarLayout.setExpandedTitleTypeface(TyperRoboto.ROBOTO_REGULAR()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
NudgeRewriten/app/src/main/res/layout/fragement_crop_and_market.xml
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
NudgeRewriten/app/src/main/res/layout/fragement_farmerlist.xml
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
NudgeRewriten/app/src/main/res/layout/fragement_profile.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.