-
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
1 parent
7799a96
commit 4b4ffe4
Showing
102 changed files
with
146 additions
and
899 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
NudgeApp/app/src/main/java/com/example/nudgeapp/MainActivity.java
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
NudgeApp/app/src/main/java/com/example/nudgeapp/login.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.example.nudgerewriten"> | ||
|
||
<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=".SplashScreenActivity" android:theme="@style/AppTheme1"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".LoginActivity" android:theme="@style/AppTheme"/> | ||
<activity android:name=".MainActivity"> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
2 changes: 1 addition & 1 deletion
2
...ample/bottom_navigation/Fragment_c_m.java → ...m/example/nudgerewriten/Fragment_c_m.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
2 changes: 1 addition & 1 deletion
2
...ottom_navigation/Fragment_farmerlist.java → ...le/nudgerewriten/Fragment_farmerlist.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
2 changes: 1 addition & 1 deletion
2
...mple/bottom_navigation/Fragment_home.java → .../example/nudgerewriten/Fragment_home.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
2 changes: 1 addition & 1 deletion
2
...e/bottom_navigation/Fragment_profile.java → ...ample/nudgerewriten/Fragment_profile.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
2 changes: 1 addition & 1 deletion
2
...e/bottom_navigation/Fragment_service.java → ...ample/nudgerewriten/Fragment_service.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
52 changes: 52 additions & 0 deletions
52
NudgeRewriten/app/src/main/java/com/example/nudgerewriten/LoginActivity.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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.example.nudgerewriten; | ||
|
||
import android.content.Intent; | ||
import android.content.SharedPreferences; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.EditText; | ||
|
||
public class LoginActivity extends AppCompatActivity { | ||
|
||
public static final String SHARED_PREFS = "sharedPrefs"; | ||
public static final String TEXT = "text"; | ||
private EditText licencecode; | ||
private Button savebtn; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
final SharedPreferences msharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE); | ||
|
||
if (msharedPreferences.contains(SHARED_PREFS)) | ||
{ | ||
Intent intent = new Intent(LoginActivity.this, MainActivity.class); | ||
startActivity(intent); | ||
} | ||
else | ||
{ | ||
setContentView(R.layout.activity_login); | ||
licencecode = (EditText) findViewById(R.id.licenceCode); | ||
savebtn = (Button) findViewById(R.id.submitButton); | ||
savebtn.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
|
||
savedata(); | ||
} | ||
public void savedata() //To save Data in SharePreferences | ||
{ | ||
SharedPreferences.Editor editor = msharedPreferences.edit(); | ||
editor.putString(TEXT, licencecode.getText().toString()); | ||
editor.apply(); | ||
Intent intent = new Intent(LoginActivity.this, MainActivity.class); | ||
startActivity(intent); | ||
} | ||
}); | ||
|
||
|
||
} | ||
} | ||
} |
12 changes: 2 additions & 10 deletions
12
...ample/bottom_navigation/MainActivity.java → ...m/example/nudgerewriten/MainActivity.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
8 changes: 4 additions & 4 deletions
8
...va/com/example/nudgeapp/HomeActivity.java → ...e/nudgerewriten/SplashScreenActivity.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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.