├── .gitattributes
├── Resources
├── cat.jpg
├── cat2.jpg
├── egg.png
├── airhorn.mp3
├── snitch.gif
├── snitch.png
├── snitch2.png
├── currency.jpg
├── instapic.jpeg
├── TwitterKey.ppk
└── twitterkeypair.pem
├── GridLayout
└── src
│ ├── main
│ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ ├── java
│ │ └── com
│ │ │ └── lenovo
│ │ │ └── gridlayout
│ │ │ └── MainActivity.java
│ └── AndroidManifest.xml
│ ├── test
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── gridlayout
│ │ └── ExampleUnitTest.java
│ └── androidTest
│ └── java
│ └── com
│ └── lenovo
│ └── gridlayout
│ └── ExampleInstrumentedTest.java
├── HIkers-Watch
└── src
│ ├── main
│ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ ├── drawable
│ │ │ └── background.jpeg
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── hikerswatch
│ │ └── MainActivity.java
│ ├── test
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── hikerswatch
│ │ └── ExampleUnitTest.java
│ └── androidTest
│ └── java
│ └── com
│ └── lenovo
│ └── hikerswatch
│ └── ExampleInstrumentedTest.java
├── HideAndShow
└── src
│ ├── main
│ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── dimens.xml
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── hideandshow
│ │ └── MainActivity.java
│ ├── test
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── hideandshow
│ │ └── ExampleUnitTest.java
│ └── androidTest
│ └── java
│ └── com
│ └── lenovo
│ └── hideandshow
│ └── ExampleInstrumentedTest.java
├── Higher-OR-Lower
└── src
│ ├── main
│ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── higherorlower
│ │ └── MainActivity.java
│ ├── test
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── higherorlower
│ │ └── ExampleUnitTest.java
│ └── androidTest
│ └── java
│ └── com
│ └── lenovo
│ └── higherorlower
│ └── ExampleInstrumentedTest.java
├── GuessTheCelebrity
└── src
│ ├── main
│ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ ├── AndroidManifest.xml
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── guessthecelebrity
│ │ └── MainActivity.java
│ ├── test
│ └── java
│ │ └── com
│ │ └── lenovo
│ │ └── guessthecelebrity
│ │ └── ExampleUnitTest.java
│ └── androidTest
│ └── java
│ └── com
│ └── lenovo
│ └── guessthecelebrity
│ └── ExampleInstrumentedTest.java
├── layouts
└── MainActivity.java
├── mygdx
└── game
│ └── AndroidLauncher.java
├── android-wear-demo
└── MainActivity.java
├── connect3
└── MainActivity.java
├── adding-New-Activity
├── secondActivity.java
└── MainActivity.java
├── webviews
└── MainActivity.java
├── newsreader
└── ArticleActivity.java
├── toastdemo
└── MainActivity.java
├── basicphrases
└── MainActivity.java
├── animations
└── MainActivity.java
├── LICENSE
├── demoapp
└── MainActivity.java
├── alert-demo
└── MainActivity.java
├── currencyconverter
└── MainActivity.java
├── timer
└── MainActivity.java
├── menudemo
└── MainActivity.java
├── notification
└── MainActivity.java
├── databasedemo
└── MainActivity.java
├── listview
└── MainActivity.java
├── radiobutton
└── radiobutton.java
├── memorableplaces
└── MainActivity.java
├── README.md
├── whatsapp
├── StarterApplication.java
├── UserListActivity.java
├── ChatActivity.java
└── MainActivity.java
├── sharedperferences
├── MainActivity.java
└── ObjectSerializer.java
├── uber
├── StarterApplication.java
├── MainActivity.java
└── DriverLocationActivity.java
├── Instagram-Clone
├── StarterApplication.java
├── UserFeedActivity.java
├── MainActivity.java
└── UserListActivity.java
├── parseserverstarterproject
├── StarterApplication.java
└── MainActivity.java
├── twitter
├── StarterApplication.java
├── Feed.java
└── MainActivity.java
├── notetakingapp
├── NoteEditorActivity.java
└── MainActivity.java
├── downloadingwebcontent
└── MainActivity.java
├── googlemaps
└── MapsActivity.java
├── timetables
└── MainActivity.java
├── photoimport
└── MainActivity.java
├── bluetooth
└── MainActivity.java
├── downloadingimages
└── MainActivity.java
├── numbershape
└── MainActivity.java
├── locationdemo
└── MainActivity.java
├── jsondemo
└── MainActivity.java
├── video
└── MainActivity.java
├── languagepreferences
└── MainActivity.java
├── firebasedemoapp
└── MainActivity.java
├── eggtimer
└── MainActivity.java
├── weatherapp
└── MainActivity.java
├── new
└── connect3
│ └── MainActivity.java
├── sound
└── MainActivity.java
└── userlocationdemo
└── MapsActivity.java
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/Resources/cat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/cat.jpg
--------------------------------------------------------------------------------
/Resources/cat2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/cat2.jpg
--------------------------------------------------------------------------------
/Resources/egg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/egg.png
--------------------------------------------------------------------------------
/Resources/airhorn.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/airhorn.mp3
--------------------------------------------------------------------------------
/Resources/snitch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/snitch.gif
--------------------------------------------------------------------------------
/Resources/snitch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/snitch.png
--------------------------------------------------------------------------------
/Resources/snitch2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/snitch2.png
--------------------------------------------------------------------------------
/Resources/currency.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/currency.jpg
--------------------------------------------------------------------------------
/Resources/instapic.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Resources/instapic.jpeg
--------------------------------------------------------------------------------
/GridLayout/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | GridLayout
3 |
4 |
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hikers Watch
3 |
4 |
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hide And Show
3 |
4 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Higher or Lower
3 |
4 |
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Guess The Celebrity
3 |
4 |
--------------------------------------------------------------------------------
/GridLayout/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GridLayout/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GridLayout/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GridLayout/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/drawable/background.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HIkers-Watch/src/main/res/drawable/background.jpeg
--------------------------------------------------------------------------------
/GridLayout/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GridLayout/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GridLayout/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GridLayout/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HIkers-Watch/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HIkers-Watch/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HideAndShow/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HideAndShow/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HideAndShow/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GridLayout/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GridLayout/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HIkers-Watch/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HIkers-Watch/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HIkers-Watch/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HideAndShow/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/HideAndShow/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Higher-OR-Lower/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Higher-OR-Lower/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GuessTheCelebrity/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GuessTheCelebrity/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Higher-OR-Lower/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Higher-OR-Lower/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GuessTheCelebrity/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GuessTheCelebrity/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/GuessTheCelebrity/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ashleshk/Android-N-developer-Course/HEAD/Higher-OR-Lower/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GridLayout/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/GridLayout/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/layouts/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.layouts;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GridLayout/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/GridLayout/src/main/java/com/lenovo/gridlayout/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.gridlayout;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends AppCompatActivity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GridLayout/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/HideAndShow/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/GridLayout/src/test/java/com/lenovo/gridlayout/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.gridlayout;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/HIkers-Watch/src/test/java/com/lenovo/hikerswatch/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.hikerswatch;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/HideAndShow/src/test/java/com/lenovo/hideandshow/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.hideandshow;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/test/java/com/lenovo/higherorlower/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.higherorlower;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/test/java/com/lenovo/guessthecelebrity/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.guessthecelebrity;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/mygdx/game/AndroidLauncher.java:
--------------------------------------------------------------------------------
1 | package com.mygdx.game;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.badlogic.gdx.backends.android.AndroidApplication;
6 | import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
7 | import com.mygdx.game.FlappyBird;
8 |
9 | public class AndroidLauncher extends AndroidApplication {
10 | @Override
11 | protected void onCreate (Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
14 | initialize(new FlappyBird(), config);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/android-wear-demo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.androidweardemo;
2 |
3 | import android.os.Bundle;
4 | import android.support.wearable.activity.WearableActivity;
5 | import android.widget.TextView;
6 |
7 | public class MainActivity extends WearableActivity {
8 |
9 | private TextView mTextView;
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main);
15 |
16 | mTextView = (TextView) findViewById(R.id.text);
17 |
18 | // Enables Always-on
19 | setAmbientEnabled();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/connect3/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.connect3;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.ImageView;
7 |
8 | public class MainActivity extends AppCompatActivity {
9 |
10 | public void dropIn(View view)
11 | {
12 | ImageView Counter = (ImageView) view;
13 | Counter.setTranslationY(-1000f);
14 | Counter.setImageResource();
15 | Counter.animate().translationYBy(1000f).rotation(3600f).setDuration(300);
16 | }
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_main);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GridLayout/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/HideAndShow/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/adding-New-Activity/secondActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.addingnewactivity;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Toast;
8 |
9 | public class secondActivity extends AppCompatActivity {
10 |
11 | public void backtomain(View view)
12 | {
13 | Intent intent = new Intent(getApplicationContext(),MainActivity.class);
14 |
15 | startActivity(intent);
16 | }
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_second);
21 | Intent intent = getIntent();
22 | Toast.makeText(this,intent.getStringExtra("name"),Toast.LENGTH_SHORT).show();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/webviews/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.webviews;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.webkit.WebView;
6 | import android.webkit.WebViewClient;
7 |
8 | public class MainActivity extends AppCompatActivity {
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_main);
14 | WebView webView =(WebView)findViewById(R.id.webView);
15 |
16 | webView.getSettings().setJavaScriptEnabled(true);
17 | webView.setWebViewClient(new WebViewClient());
18 |
19 | //webView.loadUrl("https://www.google.com");
20 | webView.loadData("
hi hello!!
this is my page
","text/html","UTF-8");
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/HIkers-Watch/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/HideAndShow/src/main/java/com/lenovo/hideandshow/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.hideandshow;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.TextView;
7 |
8 | import org.w3c.dom.Text;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | TextView textView;
13 | public void show(View view)
14 | {
15 | textView.setVisibility(View.VISIBLE);
16 |
17 | }
18 | public void hide(View view)
19 |
20 | {
21 | textView.setVisibility(View.INVISIBLE);
22 | }
23 | @Override
24 |
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_main);
28 | textView = (TextView)findViewById(R.id.textView);
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/newsreader/ArticleActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.newsreader;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.webkit.WebView;
7 | import android.webkit.WebViewClient;
8 |
9 | public class ArticleActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_article);
15 |
16 | WebView webView = (WebView) findViewById(R.id.webview);
17 |
18 | webView.getSettings().setJavaScriptEnabled(true);
19 |
20 | webView.setWebViewClient(new WebViewClient());
21 |
22 | Intent intent = getIntent();
23 |
24 | webView.loadData(intent.getStringExtra("content"), "text/html", "UTF-8");
25 |
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/GridLayout/src/androidTest/java/com/lenovo/gridlayout/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.gridlayout;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.lenovo.gridlayout", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/HideAndShow/src/androidTest/java/com/lenovo/hideandshow/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.hideandshow;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.lenovo.hideandshow", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/HIkers-Watch/src/androidTest/java/com/lenovo/hikerswatch/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.hikerswatch;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.lenovo.hikerswatch", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/androidTest/java/com/lenovo/higherorlower/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.higherorlower;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.lenovo.higherorlower", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GuessTheCelebrity/src/androidTest/java/com/lenovo/guessthecelebrity/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.guessthecelebrity;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.lenovo.guessthecelebrity", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/toastdemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.toastdemo;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.view.View;
7 | import android.widget.EditText;
8 | import android.widget.ImageView;
9 | import android.widget.Toast;
10 |
11 | public class MainActivity extends AppCompatActivity {
12 |
13 | public void sayHi(View view )
14 | {
15 | EditText name= (EditText) findViewById(R.id.NameId);
16 | ImageView image = (ImageView) findViewById(R.id.image);
17 |
18 | Log.i("test","clicked");
19 | Toast.makeText(MainActivity.this,"Hit there, "+name.getText().toString(),Toast.LENGTH_SHORT).show();
20 | image.setImageResource(R.drawable.cat2);
21 | }
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_main);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/basicphrases/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.basicphrases;
2 |
3 | import android.media.MediaPlayer;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 | import android.view.View;
8 | import android.view.animation.Interpolator;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_main);
16 | }
17 |
18 | public void buttonTapped(View view)
19 | {
20 | int id = view.getId();
21 | String ourid="";
22 |
23 | ourid= view.getResources().getResourceEntryName(id);
24 |
25 | int resourceId = getResources().getIdentifier(ourid,"raw","com.lenovo.basicphrases");
26 |
27 | MediaPlayer mplayer = MediaPlayer.create(this,resourceId);
28 | mplayer.start();
29 | Log.i("button tapped", ourid);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/animations/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.animations;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.ImageView;
7 |
8 | public class MainActivity extends AppCompatActivity {
9 |
10 | public void fade(View view)
11 | {
12 | ImageView cat = (ImageView) findViewById(R.id.cat);
13 | //ImageView cat2 = (ImageView)findViewById(R.id.cat2);
14 | //cat.animate().alpha(0f).setDuration(2000);
15 | //cat2.animate().alpha(1f).setDuration(2000);
16 | //cat.animate().translationXBy(1000f).setDuration(2000);
17 | cat.animate().rotation(180f).setDuration(2000);
18 | cat.animate().scaleX(0.5f).scaleY(0.5f).setDuration(2000);
19 |
20 | }
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | setContentView(R.layout.activity_main);
25 | /*
26 | ImageView cat = (ImageView) findViewById(R.id.cat);
27 |
28 | cat.setTranslationX(-1000f);*/
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Ashlesh Khajbage
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/demoapp/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.demoapp;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.view.View;
7 | import android.widget.EditText;
8 | import android.widget.Toast;
9 |
10 |
11 | public class MainActivity extends AppCompatActivity {
12 |
13 | public void clickFunction(View view)
14 | {
15 | Toast.makeText(MainActivity.this,"hi there !",Toast.LENGTH_SHORT).show();
16 |
17 | EditText myTextField = (EditText) findViewById(R.id.UserName);
18 | EditText myPassword = (EditText) findViewById(R.id.Password);
19 |
20 |
21 | Toast.makeText(MainActivity.this,"Username : "+myTextField.getText().toString()+ " Password: "+myPassword.getText().toString() ,Toast.LENGTH_SHORT).show();
22 | //Log.i("Info","Button Pressed!");
23 | Log.i("Info","Username : "+myTextField.getText().toString()+ " Password: "+myPassword.getText().toString());
24 | }
25 | @Override
26 | protected void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 | setContentView(R.layout.activity_main);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/alert-demo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.alertdemo;
2 |
3 | import android.content.DialogInterface;
4 | import android.support.v7.app.AlertDialog;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.os.Bundle;
7 | import android.widget.Toast;
8 |
9 | public class MainActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main);
15 |
16 | new AlertDialog.Builder(this)
17 | .setIcon(android.R.drawable.ic_dialog_alert)
18 | .setTitle("Are you Sure")
19 | .setMessage("Do you definelty want to do this!!")
20 | .setPositiveButton("Yes",new DialogInterface.OnClickListener(){
21 |
22 | @Override
23 | public void onClick(DialogInterface dialog, int which) {
24 | Toast.makeText(MainActivity.this,"It's Done",Toast.LENGTH_SHORT).show();
25 |
26 | }
27 | })
28 | .setNegativeButton("No",null)
29 | .show();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/currencyconverter/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.currencyconverter;
2 |
3 | import android.content.SharedPreferences;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 | import android.view.View;
8 | import android.widget.EditText;
9 | import android.widget.Toast;
10 |
11 | public class MainActivity extends AppCompatActivity {
12 |
13 | public void Convert(View view)
14 | {
15 |
16 | EditText dollarAmount = (EditText)findViewById(R.id.dollarAmountEditText);
17 | Log.i("Info:","dollar amount is : "+dollarAmount.getText().toString());
18 | Double dollar = Double.parseDouble(dollarAmount.getText().toString());
19 | Double poundAmount = dollar*0.75;
20 | Double rupeeAmount = dollar*69.54;
21 | Toast.makeText(MainActivity.this, "£ "+String.format("%.2f",poundAmount), Toast.LENGTH_SHORT).show();
22 | Toast.makeText(MainActivity.this, "₹ "+String.format("%.2f",rupeeAmount), Toast.LENGTH_SHORT).show();
23 | }
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_main);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/timer/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.timer;
2 |
3 | import android.os.CountDownTimer;
4 | import android.os.Handler;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.os.Bundle;
7 | import android.util.Log;
8 |
9 | public class MainActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main);
15 |
16 | new CountDownTimer(10000,1000){
17 | @Override
18 | public void onTick(long millisUntilFinished) {
19 | Log.i("Seconds left",String.valueOf(millisUntilFinished/1000));
20 | }
21 |
22 | @Override
23 | public void onFinish() {
24 | Log.i("done","Countdowntimer finished");
25 | }
26 |
27 |
28 | }.start();
29 | /*final Handler handler = new Handler();
30 | Runnable run = new Runnable() {
31 | @Override
32 | public void run() {
33 | Log.i("Runnable has run!!","A sec passed");
34 | handler.postDelayed(this,1000);
35 | }
36 | };
37 |
38 | handler.post(run);*/
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/menudemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.menudemo;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.view.Menu;
7 | import android.view.MenuInflater;
8 | import android.view.MenuItem;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | @Override
13 | public boolean onCreateOptionsMenu(Menu menu) {
14 | MenuInflater menuInflater = getMenuInflater();
15 | menuInflater.inflate(R.menu.main_menu,menu);
16 | return super.onCreateOptionsMenu(menu);
17 | }
18 |
19 | @Override
20 | public boolean onOptionsItemSelected(MenuItem item) {
21 | super.onOptionsItemSelected(item);
22 |
23 | switch(item.getItemId())
24 | {
25 | case R.id.settings :
26 | Log.i("Menu item Selected","Settings");
27 | return true;
28 | case R.id.help:
29 | Log.i("Menu item Selected","Help");
30 | return true;
31 | default:
32 | return false;
33 | }
34 |
35 | }
36 |
37 |
38 | @Override
39 | protected void onCreate(Bundle savedInstanceState) {
40 | super.onCreate(savedInstanceState);
41 | setContentView(R.layout.activity_main);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/notification/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.notification;
2 |
3 | import android.app.Notification;
4 | import android.app.NotificationManager;
5 | import android.app.PendingIntent;
6 | import android.content.Intent;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.os.Bundle;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_main);
16 | Intent intent = new Intent(getApplicationContext(),MainActivity.class);
17 |
18 |
19 | PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(),1,intent,0);
20 | Notification notification = new Notification.Builder(getApplicationContext())
21 | .setContentTitle("Lunch is ready!!")
22 | .setContentText("it'sgetting late....")
23 | .setContentIntent(pendingIntent)
24 | .addAction(android.R.drawable.sym_action_chat,"Chat",pendingIntent)
25 | .setSmallIcon(android.R.drawable.sym_def_app_icon)
26 | .build();
27 | NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
28 | notificationManager.notify(1,notification);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/databasedemo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.databasedemo;
2 |
3 | import android.database.Cursor;
4 | import android.database.sqlite.SQLiteDatabase;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.os.Bundle;
7 | import android.util.Log;
8 |
9 | public class MainActivity extends AppCompatActivity {
10 |
11 | @Override
12 | protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_main);
15 |
16 | try {
17 | SQLiteDatabase mydatabase= this.openOrCreateDatabase("Users",MODE_PRIVATE,null);
18 |
19 | mydatabase.execSQL("CREATE TABLE IF NOT EXISTS users(name VARCHAR,age INT(3))");
20 | mydatabase.execSQL("INSERT INTO users(name, age) VALUES ('Akshay',87)");
21 | mydatabase.execSQL("INSERT INTO users(name, age) VALUES ('saksham',2)");
22 |
23 | Cursor c = mydatabase.rawQuery("SELECT * FROM users",null);
24 |
25 | int nameIndex= c.getColumnIndex("name");
26 | int ageIndex = c.getColumnIndex("age");
27 |
28 | c.moveToFirst();
29 | while(c!=null){
30 | Log.i("name",c.getString(nameIndex));
31 | Log.i("age",Integer.toString(c.getInt(ageIndex)));
32 | c.moveToNext();
33 | }
34 |
35 |
36 | }catch (Exception e)
37 | {
38 |
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Resources/TwitterKey.ppk:
--------------------------------------------------------------------------------
1 | PuTTY-User-Key-File-2: ssh-rsa
2 | Encryption: none
3 | Comment: imported-openssh-key
4 | Public-Lines: 6
5 | AAAAB3NzaC1yc2EAAAADAQABAAABAQCTlY6G+Mpj1A8MY0qIPhdvouuFRz3uwaTR
6 | wlOpPGxW6D2B7qxFCb8p5Seqqy43qjtcV1CVmXysj2ZEh4haEvkFW7DTB2mBtyu5
7 | u9HV1jxnAiuxC4xYPCSfEe/V5nCOODlMBWDCMF1Pb72s4tYvacQuPJTFohnf2GlJ
8 | BF459YpvhtijYoM6kaqw58MFZpOus8AEh4ho1Zs6++Oa2bCqApQ8agpejRsm+taZ
9 | Jv306O5wA3SbSDiFffdeJsXGYeGsH0Ek3bU31u4TR9aeLP/IlywrCvNBNKU90T+O
10 | hY8Y0C+H9iQfQNlbmfxMHVhYVj8rw8iAGmfSWdQaJC+fi5W0RSv/
11 | Private-Lines: 14
12 | AAABACXdto784HjSnPXRt/rS65JyG7m7eLF8r7w9/tcqMKXvunBO+5ZPFOQ77nyE
13 | pTwVClv77yojEnD37gZhO+PYgFoWl3zdpv1oMOjbvs/9wsuvK+SmEOFGtSK3KHEa
14 | SgDDfjf6HURVwmsyQVlNbiUGHxa55nX6zGa5kPHyE/cM//LzIpnD7q68lPHjOjHU
15 | pVXztK4tEza0J8EFAQWHsztbqmG01uexZZ/DK/OvfnxSZkBVngqV/m5sJaHaeycm
16 | HQpZTAxEEwZH7cJKXMavwM07tvwp+5+Ys+D5f6suT/tr3bdGiTgKUOBUmRqUAuSS
17 | zfULYV0+MghGpQiIf79y1D6W3wEAAACBAN4oMGMDwUpBezUa/XEz1pZZlQD37A2I
18 | cM5zFPUdA5a+YGSUUX/xOGKABva671vA9SSpRsRqWRCuN5UR2Yu+uOl5OISqNRh1
19 | jRz+HVm15OTD5C1LRpKOJS5Wwae/vUeCHg9XAqcnIRNHflbBelYBmqCGQMVSmXhe
20 | XPputnTFp6N/AAAAgQCqESJBTU/PhXOGozFhSYFlIu92h667+i2iTw1L1R23mzBy
21 | EHGSg66DhdI+X1ZrInWqa+R7Jg0ihP/gT2wuw0yEAsnYiPV+Emh7OCFwUMYoprq+
22 | Uwm+cFE2fgbQGqvCHJXsVk9TL8aj0ev5X9ef6Bya3aVVm62U8cldiVbJARS3gQAA
23 | AIAvayRca2DP1UIm6Q+bm91N5XOt5xb1sff9o0m3kBoxDRsJmStC3PgeQ7B+iSUw
24 | gj7xxadYSckghGIl1QjvYbhgLpzV6iG2aOw7kS1AY4KqzV7c6Yobp5EZluzHZfjL
25 | X8HCLJSNBS3+qRTsZ9kFeHUZIZY0kYuX7ul0yCYMMMBGTw==
26 | Private-MAC: 26885589837043a39eca8ee6fb2def86f77d4469
27 |
--------------------------------------------------------------------------------
/listview/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.listview;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.util.Log;
6 | import android.view.View;
7 | import android.widget.AdapterView;
8 | import android.widget.ArrayAdapter;
9 | import android.widget.ListView;
10 | import android.widget.Toast;
11 |
12 | import java.util.ArrayList;
13 |
14 | public class MainActivity extends AppCompatActivity {
15 |
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_main);
21 |
22 | ListView mylistview = (ListView)findViewById(R.id.myListview);
23 | final ArrayList myfamily = new ArrayList();
24 | myfamily.add("Ashlesh");
25 | myfamily.add("sammar");
26 | myfamily.add("prathamesh");
27 | myfamily.add("saurabh");
28 |
29 | ArrayAdapter arrayAdapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1,myfamily);
30 | mylistview.setAdapter(arrayAdapter);
31 |
32 | mylistview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
33 | @Override
34 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
35 | Log.i("person tapped:", myfamily.get(position));
36 | Toast.makeText(MainActivity.this,"firend name is "+myfamily.get(position),Toast.LENGTH_SHORT).show();
37 | }
38 | });
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/java/com/lenovo/higherorlower/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.higherorlower;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.EditText;
7 | import android.widget.Toast;
8 |
9 | import java.util.Random;
10 |
11 | public class MainActivity extends AppCompatActivity {
12 |
13 | int no;
14 | public void maketoast(String string)
15 | {
16 | Toast.makeText(MainActivity.this,string,Toast.LENGTH_SHORT).show();
17 | }
18 |
19 | public void Guess(View view)
20 | {
21 | EditText guessEditTet = (EditText)findViewById(R.id.GuesseditText);
22 | int guess=Integer.parseInt(guessEditTet.getText().toString());
23 | if(guess>no)
24 | {
25 | maketoast("Lower");
26 | }
27 | else if(guess
2 |
12 |
13 |
18 |
19 |
27 |
28 |
37 |
38 |
--------------------------------------------------------------------------------
/radiobutton/radiobutton.java:
--------------------------------------------------------------------------------
1 | package com.example.lenovo.radiobutton;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 | import android.app.Activity;
6 | import android.view.View;
7 | import android.view.View.OnClickListener;
8 | import android.widget.Button;
9 | import android.widget.RadioButton;
10 | import android.widget.RadioGroup;
11 | import android.widget.Toast;
12 |
13 | public class radiobutton extends Activity {
14 |
15 | private RadioGroup radiogroup;
16 | private RadioButton radiobutton;
17 | private Button btnDisplay;
18 |
19 | @Override
20 | public void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_radiobutton);
23 |
24 | addListenerOnButton();
25 |
26 | }
27 |
28 | public void addListenerOnButton() {
29 |
30 | radiogroup = (RadioGroup) findViewById(R.id.radioquestion);
31 | btnDisplay = (Button) findViewById(R.id.btnDisplay);
32 |
33 | btnDisplay.setOnClickListener(new OnClickListener() {
34 |
35 | @Override
36 | public void onClick(View v) {
37 |
38 | // get selected radio button from radioGroup
39 | int selectedId = radiogroup.getCheckedRadioButtonId();
40 |
41 | // find the radiobutton by returned id
42 | radiobutton = (RadioButton) findViewById(selectedId);
43 |
44 | Toast.makeText(radiobutton.this,
45 | radiobutton.getText(), Toast.LENGTH_SHORT).show();
46 |
47 | }
48 |
49 | });
50 |
51 | }
52 | }
--------------------------------------------------------------------------------
/memorableplaces/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.memorableplaces;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.AdapterView;
8 | import android.widget.ArrayAdapter;
9 | import android.widget.ListView;
10 | import android.widget.Toast;
11 |
12 | import com.google.android.gms.maps.model.LatLng;
13 |
14 | import java.util.ArrayList;
15 |
16 | public class MainActivity extends AppCompatActivity {
17 |
18 | static ArrayList places = new ArrayList<>();
19 | static ArrayList locations = new ArrayList<>();
20 | static ArrayAdapter arrayAdapter;
21 |
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_main);
26 |
27 | ListView listView = (ListView) findViewById(R.id.listView);
28 |
29 | places.add("Add a new place...");
30 | locations.add(new LatLng(0, 0));
31 |
32 | arrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, places);
33 |
34 | listView.setAdapter(arrayAdapter);
35 |
36 | listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
37 |
38 | @Override
39 | public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
40 |
41 | Intent intent = new Intent(getApplicationContext(), MapsActivity.class);
42 | intent.putExtra("placeNumber", i);
43 |
44 | startActivity(intent);
45 | }
46 |
47 | });
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Android N developer Course
2 | Udemy Full Stack Android Developer Course, here are the main code files according to each project
3 |
4 | ### Projects (CLONED App)
5 | > 1. Instagram Clone
6 | > 2. WhatsApp Clone
7 | > 3. Weather App Clone
8 | > 4. User Location Clone
9 | > 5. Twitter Clone
10 | > 6. Uber Clone
11 |
12 | ### Projects (Self)
13 | > 1. Braintrainer App
14 | > 2. Egg Timer
15 | > 3. Connect-3 (X-O Game)
16 | > 4. Currency Converter
17 | > 5. Guess the Celebrity
18 | > 6. Higher OR Lower
19 | > 7. Hikers Watch
20 | > 8. News Reader
21 | > 9. Memorable Places
22 | > 10. Note Taking App
23 | > 11. Time Table App
24 |
25 | ### Program-Conceptual
26 | * Adding New Activity
27 | * Alert demo
28 | * Android Wear Demo
29 | * Layout
30 | * GridLayout
31 | * Relative Layout
32 | * Box layout
33 | * Basic Components in App
34 | * ListView demo
35 | * Menu demo
36 | * Notification demo
37 | * Buttons
38 | * Toast demo
39 | * Hide & Show Demo
40 | * Animations
41 | * Video In App
42 | * Sound in App
43 | * Timer App
44 | * Phrase
45 | * basic Phrases
46 | * Number Shape
47 | * Advanced Phrases
48 | * Photo Import
49 | * Bluetooth
50 | * Database Demo
51 | * Internet Interfaced
52 | * WebView Demo
53 | * Downloading Images
54 | * Downloading Web-Content
55 | * FIREBASE demo
56 | * Language preference
57 | * Database Handling
58 | * Position & Geographic Maps
59 | * Location demo
60 | * Google Maps
61 | * Network & Server Based App
62 | * Parse Server Starter
63 | * Shared Preferences
64 | * JSON demo
65 |
66 |
67 |
68 | ### Others
69 | * MyGDX
70 | * App deployment Software Tools
71 | * Resource
72 | * contains Images & Gifs used in Apps
--------------------------------------------------------------------------------
/whatsapp/StarterApplication.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.whatsapp;
2 |
3 | import android.app.Application;
4 | import android.util.Log;
5 |
6 | import com.parse.Parse;
7 | import com.parse.ParseACL;
8 | import com.parse.ParseException;
9 | import com.parse.ParseObject;
10 | import com.parse.ParseUser;
11 | import com.parse.SaveCallback;
12 |
13 |
14 | public class StarterApplication extends Application {
15 |
16 | @Override
17 | public void onCreate() {
18 | super.onCreate();
19 |
20 | // Enable Local Datastore.
21 | Parse.enableLocalDatastore(this);
22 |
23 | // Add your initialization code here
24 | Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
25 | .applicationId("7b0fd2ddb7c3e089718fcbb29c230c2924cb9512")
26 | .clientKey("09cc80b858a85f4e7e99d66e0963d364bf0bbda9")
27 | .server("http://18.222.190.207:80/parse/")
28 | .build()
29 | );
30 |
31 | ParseObject object = new ParseObject("ExampleObject");
32 | object.put("myNumber", "123");
33 | object.put("myString", "rob");
34 |
35 | object.saveInBackground(new SaveCallback () {
36 | @Override
37 | public void done(ParseException ex) {
38 | if (ex == null) {
39 | Log.i("Parse Result", "Successful!");
40 | } else {
41 | Log.i("Parse Result", "Failed" + ex.toString());
42 | }
43 | }
44 | });
45 |
46 | // ParseUser.enableAutomaticUser();
47 |
48 | ParseACL defaultACL = new ParseACL();
49 | defaultACL.setPublicReadAccess(true);
50 | defaultACL.setPublicWriteAccess(true);
51 | ParseACL.setDefaultACL(defaultACL, true);
52 |
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Resources/twitterkeypair.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEowIBAAKCAQEAk5WOhvjKY9QPDGNKiD4Xb6LrhUc97sGk0cJTqTxsVug9ge6sRQm/KeUnqqsu
3 | N6o7XFdQlZl8rI9mRIeIWhL5BVuw0wdpgbcrubvR1dY8ZwIrsQuMWDwknxHv1eZwjjg5TAVgwjBd
4 | T2+9rOLWL2nELjyUxaIZ39hpSQReOfWKb4bYo2KDOpGqsOfDBWaTrrPABIeIaNWbOvvjmtmwqgKU
5 | PGoKXo0bJvrWmSb99OjucAN0m0g4hX33XibFxmHhrB9BJN21N9buE0fWniz/yJcsKwrzQTSlPdE/
6 | joWPGNAvh/YkH0DZW5n8TB1YWFY/K8PIgBpn0lnUGiQvn4uVtEUr/wIDAQABAoIBACXdto784HjS
7 | nPXRt/rS65JyG7m7eLF8r7w9/tcqMKXvunBO+5ZPFOQ77nyEpTwVClv77yojEnD37gZhO+PYgFoW
8 | l3zdpv1oMOjbvs/9wsuvK+SmEOFGtSK3KHEaSgDDfjf6HURVwmsyQVlNbiUGHxa55nX6zGa5kPHy
9 | E/cM//LzIpnD7q68lPHjOjHUpVXztK4tEza0J8EFAQWHsztbqmG01uexZZ/DK/OvfnxSZkBVngqV
10 | /m5sJaHaeycmHQpZTAxEEwZH7cJKXMavwM07tvwp+5+Ys+D5f6suT/tr3bdGiTgKUOBUmRqUAuSS
11 | zfULYV0+MghGpQiIf79y1D6W3wECgYEA3igwYwPBSkF7NRr9cTPWllmVAPfsDYhwznMU9R0Dlr5g
12 | ZJRRf/E4YoAG9rrvW8D1JKlGxGpZEK43lRHZi7646Xk4hKo1GHWNHP4dWbXk5MPkLUtGko4lLlbB
13 | p7+9R4IeD1cCpychE0d+VsF6VgGaoIZAxVKZeF5c+m62dMWno38CgYEAqhEiQU1Pz4VzhqMxYUmB
14 | ZSLvdoeuu/otok8NS9Udt5swchBxkoOug4XSPl9WayJ1qmvkeyYNIoT/4E9sLsNMhALJ2Ij1fhJo
15 | ezghcFDGKKa6vlMJvnBRNn4G0BqrwhyV7FZPUy/Go9Hr+V/Xn+gcmt2lVZutlPHJXYlWyQEUt4EC
16 | gYEA3B+EOkfZOSOC2k7g+076/ETNIIWHbq1X4Sgkhu71xGLkjiRsUNKKJQdoXwdA7nBWNrpH9YzO
17 | rXmCd4GVRiN3g1dqigFA1Ph9F1IvcNmLcKUtLTgeOE8CRlUOU5HoEbe640Y6ybc6zaiUZZAWEKxM
18 | M2xzN1Gt4ZfWlwomXbQPdC8CgYAd1Z2lyRNMO4QVxYE/KO77OBK8P3dG4M+qnqWdfQiWkjIAgKP7
19 | 6P/vcMV+TalSaBwuRnkxpW4+dQiSaDx5Q6ejrP2N8BDpCf+sRh+PnYv1y7IM+3JFJ10H6zn0vgkN
20 | p4ghis6lsEbvrD7yY37nPYfvHx0HFKVx8Ky7rQE9h+QDgQKBgC9rJFxrYM/VQibpD5ub3U3lc63n
21 | FvWx9/2jSbeQGjENGwmZK0Lc+B5DsH6JJTCCPvHFp1hJySCEYiXVCO9huGAunNXqIbZo7DuRLUBj
22 | gqrNXtzpihunkRmW7Mdl+MtfwcIslI0FLf6pFOxn2QV4dRkhljSRi5fu6XTIJgwwwEZP
23 | -----END RSA PRIVATE KEY-----
--------------------------------------------------------------------------------
/adding-New-Activity/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.addingnewactivity;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.AdapterView;
8 | import android.widget.ArrayAdapter;
9 | import android.widget.ListView;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | public class MainActivity extends AppCompatActivity {
15 |
16 | // public void toSecondActivity(View view)
17 | // {
18 | // Intent intent = new Intent(getApplicationContext(),secondActivity.class);
19 | // intent.putExtra("username","Ashlesh");
20 | // startActivity(intent);
21 | // }
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_main);
26 |
27 | ListView listview = (ListView)findViewById(R.id.listview);
28 | final ArrayList friends = new ArrayList();
29 | friends.add("Ashleah");
30 | friends.add("sham ");
31 | friends.add("purva");
32 | friends.add("shayanayah");
33 |
34 | ArrayAdapter arrayAdapter = new ArrayAdapter(this,android.R.layout.simple_list_item_1,friends);
35 | listview.setAdapter(arrayAdapter);
36 | listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
37 | @Override
38 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
39 | Intent intent = new Intent(getApplicationContext(),secondActivity.class);
40 | intent.putExtra("name",friends.get(position));
41 | startActivity(intent);
42 | }
43 | });
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/sharedperferences/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.sharedperferences;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.icu.util.Freezable;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.util.Log;
9 |
10 | import java.io.IOException;
11 | import java.util.ArrayList;
12 |
13 | public class MainActivity extends AppCompatActivity {
14 |
15 | @Override
16 | protected void onCreate(Bundle savedInstanceState) {
17 | super.onCreate(savedInstanceState);
18 | setContentView(R.layout.activity_main);
19 | SharedPreferences sharedPreferences = this.getSharedPreferences("com.lenovo.sharedperferences", Context.MODE_PRIVATE);
20 | //sharedPreferences.edit().putString("username","ashlesh").apply();
21 | //String username= sharedPreferences.getString("username","");
22 |
23 | ArrayList friends= new ArrayList();
24 | friends.add("Monica");
25 | friends.add("Chandler");
26 | friends.add("Rachel");
27 | friends.add("Ross");
28 | friends.add("Joey");
29 | friends.add("Pheobe");
30 | try {
31 | sharedPreferences.edit().putString("friends",ObjectSerializer.serialize(friends)).apply();
32 | } catch (IOException e) {
33 | e.printStackTrace();
34 | }
35 | //Log.i("Username",username);
36 | ArrayList newfriends = new ArrayList<>();
37 | try {
38 | newfriends=(ArrayList) ObjectSerializer.deserialize(sharedPreferences.getString("friends",ObjectSerializer.serialize(new ArrayList())));
39 | } catch (IOException e) {
40 | e.printStackTrace();
41 | }
42 |
43 | Log.i("firends",newfriends.toString());
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/uber/StarterApplication.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.uber;
2 |
3 |
4 | import android.app.Application;
5 | import android.util.Log;
6 |
7 | import com.parse.Parse;
8 | import com.parse.ParseACL;
9 | import com.parse.ParseException;
10 | import com.parse.ParseObject;
11 | import com.parse.ParseUser;
12 | import com.parse.SaveCallback;
13 |
14 |
15 | public class StarterApplication extends Application {
16 |
17 | @Override
18 | public void onCreate() {
19 | super.onCreate();
20 |
21 | // Enable Local Datastore.
22 | Parse.enableLocalDatastore(this);
23 |
24 | // Add your initialization code here
25 | Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
26 | .applicationId("4dedb0f3872a4543e16f8624cf8ac5fb4789f925")
27 | .clientKey("948bbcfceec6438c259633bfdba7411d0746f3ef")
28 | .server("http://52.14.175.235:80/parse/")
29 | .build()
30 | );
31 |
32 | // ParseObject object = new ParseObject("ExampleObject");
33 | // object.put("myNumber", "123");
34 | // object.put("myString", "rob");
35 | //
36 | // object.saveInBackground(new SaveCallback () {
37 | // @Override
38 | // public void done(ParseException ex) {
39 | // if (ex == null) {
40 | // Log.i("Parse Result", "Successful!");
41 | // } else {
42 | // Log.i("Parse Result", "Failed" + ex.toString());
43 | // }
44 | // }
45 | // });
46 |
47 | //ParseUser.enableAutomaticUser();
48 |
49 | ParseACL defaultACL = new ParseACL();
50 | defaultACL.setPublicReadAccess(true);
51 | defaultACL.setPublicWriteAccess(true);
52 | ParseACL.setDefaultACL(defaultACL, true);
53 |
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Instagram-Clone/StarterApplication.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.instagram_clone;
2 |
3 | /**
4 | * Created by lenovo on 17-Jan-19.
5 | */
6 | import android.app.Application;
7 | import android.util.Log;
8 |
9 | import com.parse.Parse;
10 | import com.parse.ParseACL;
11 | import com.parse.ParseException;
12 | import com.parse.ParseObject;
13 | import com.parse.ParseUser;
14 | import com.parse.SaveCallback;
15 |
16 |
17 | public class StarterApplication extends Application {
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 |
23 | // Enable Local Datastore.
24 | Parse.enableLocalDatastore(this);
25 |
26 | // Add your initialization code here
27 | Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
28 | .applicationId("aa84cd91fd1c6e4f42d0e8cb27bd479dc9f13c1d")
29 | .clientKey("0a162ef04c19311d5a900f9ea20b8082b7974274")
30 | .server("http://18.224.23.225:80/parse/")
31 | .build()
32 | );
33 |
34 | ParseObject object = new ParseObject("ExampleObject");
35 | object.put("myNumber", "123");
36 | object.put("myString", "rob");
37 |
38 | object.saveInBackground(new SaveCallback () {
39 | @Override
40 | public void done(ParseException ex) {
41 | if (ex == null) {
42 | Log.i("Parse Result", "Successful!");
43 | } else {
44 | Log.i("Parse Result", "Failed" + ex.toString());
45 | }
46 | }
47 | });
48 |
49 |
50 | //ParseUser.enableAutomaticUser();
51 |
52 | ParseACL defaultACL = new ParseACL();
53 | defaultACL.setPublicReadAccess(true);
54 | defaultACL.setPublicWriteAccess(true);
55 | ParseACL.setDefaultACL(defaultACL, true);
56 |
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/parseserverstarterproject/StarterApplication.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.parseserverstarterproject;
2 |
3 | /**
4 | * Created by lenovo on 17-Jan-19.
5 | */
6 | import android.app.Application;
7 | import android.util.Log;
8 |
9 | import com.parse.Parse;
10 | import com.parse.ParseACL;
11 | import com.parse.ParseException;
12 | import com.parse.ParseObject;
13 | import com.parse.ParseUser;
14 | import com.parse.SaveCallback;
15 |
16 |
17 | public class StarterApplication extends Application {
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 |
23 | // Enable Local Datastore.
24 | Parse.enableLocalDatastore(this);
25 |
26 | // Add your initialization code here
27 | Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
28 | .applicationId("aa84cd91fd1c6e4f42d0e8cb27bd479dc9f13c1d")
29 | .clientKey("0a162ef04c19311d5a900f9ea20b8082b7974274")
30 | .server("http://18.224.23.225:80/parse/")
31 | .build()
32 | );
33 |
34 | ParseObject object = new ParseObject("ExampleObject");
35 | object.put("myNumber", "123");
36 | object.put("myString", "rob");
37 |
38 | object.saveInBackground(new SaveCallback () {
39 | @Override
40 | public void done(ParseException ex) {
41 | if (ex == null) {
42 | Log.i("Parse Result", "Successful!");
43 | } else {
44 | Log.i("Parse Result", "Failed" + ex.toString());
45 | }
46 | }
47 | });
48 |
49 |
50 | //ParseUser.enableAutomaticUser();
51 |
52 | ParseACL defaultACL = new ParseACL();
53 | defaultACL.setPublicReadAccess(true);
54 | defaultACL.setPublicWriteAccess(true);
55 | ParseACL.setDefaultACL(defaultACL, true);
56 |
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/twitter/StarterApplication.java:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * Copyright (c) 2015-present, Parse, LLC.
4 | * All rights reserved.
5 | *
6 | * This source code is licensed under the BSD-style license found in the
7 | * LICENSE file in the root directory of this source tree. An additional grant
8 | * of patent rights can be found in the PATENTS file in the same directory.
9 | */
10 | package com.lenovo.twitter;
11 |
12 | import android.app.Application;
13 | import android.util.Log;
14 |
15 | import com.parse.Parse;
16 | import com.parse.ParseACL;
17 | import com.parse.ParseException;
18 | import com.parse.ParseObject;
19 | import com.parse.ParseUser;
20 | import com.parse.SaveCallback;
21 |
22 |
23 | public class StarterApplication extends Application {
24 |
25 | @Override
26 | public void onCreate() {
27 | super.onCreate();
28 |
29 |
30 |
31 | // Enable Local Datastore.
32 | Parse.enableLocalDatastore(this);
33 |
34 | // Add your initialization code here
35 | Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
36 | .applicationId("b8461437dd04713f90b8787f1519afa74d91abd8")
37 | .clientKey("8b7d52fe2e54674d5e37298ecdbd6e15510c3975")
38 | .server("http://3.17.67.0:80/parse/")
39 | .build()
40 | );
41 |
42 | // ParseObject object = new ParseObject("ExampleObject");
43 | // object.put("myNumber", "123");
44 | // object.put("myString", "rob");
45 | //
46 | // object.saveInBackground(new SaveCallback () {
47 | // @Override
48 | // public void done(ParseException ex) {
49 | // if (ex == null) {
50 | // Log.i("Parse Result", "Successful!");
51 | // } else {
52 | // Log.i("Parse Result", "Failed" + ex.toString());
53 | // }
54 | // }
55 | // });
56 |
57 | //ParseUser.enableAutomaticUser();
58 |
59 | ParseACL defaultACL = new ParseACL();
60 | defaultACL.setPublicReadAccess(true);
61 | defaultACL.setPublicWriteAccess(true);
62 | ParseACL.setDefaultACL(defaultACL, true);
63 |
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/notetakingapp/NoteEditorActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.notetakingapp;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.content.SharedPreferences;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.text.Editable;
9 | import android.text.TextWatcher;
10 | import android.widget.EditText;
11 |
12 | import java.util.HashSet;
13 |
14 | public class NoteEditorActivity extends AppCompatActivity {
15 |
16 | int noteid;
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_note_editor);
21 |
22 | EditText editText =(EditText)findViewById(R.id.editText);
23 | Intent intent = getIntent();
24 | noteid= intent.getIntExtra("noteId",-1);
25 | if(noteid !=-1)
26 | {
27 | editText.setText(MainActivity.notes.get(noteid));
28 | }else
29 | {
30 | MainActivity.notes.add("");
31 | noteid=MainActivity.notes.size()-1;
32 | MainActivity.arrayAdapter.notifyDataSetChanged();
33 | }
34 |
35 | editText.addTextChangedListener(new TextWatcher() {
36 | @Override
37 | public void beforeTextChanged(CharSequence s, int start, int count, int after) {
38 |
39 | }
40 |
41 | @Override
42 | public void onTextChanged(CharSequence s, int start, int before, int count) {
43 | MainActivity.notes.set(noteid,String.valueOf(s));
44 | MainActivity.arrayAdapter.notifyDataSetChanged();
45 |
46 | SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences("com.lenovo.notetakingapp", Context.MODE_PRIVATE);
47 | HashSet set = new HashSet(MainActivity.notes);
48 | sharedPreferences.edit().putStringSet("notes",set).apply();
49 |
50 | }
51 |
52 | @Override
53 | public void afterTextChanged(Editable s) {
54 |
55 | }
56 | });
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Higher-OR-Lower/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
28 |
29 |
40 |
41 |
50 |
51 |
--------------------------------------------------------------------------------
/downloadingwebcontent/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.downloadingwebcontent;
2 |
3 | import android.os.AsyncTask;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 |
8 | import java.io.InputStream;
9 | import java.io.InputStreamReader;
10 | import java.net.HttpURLConnection;
11 | import java.net.URL;
12 | import java.util.concurrent.ExecutionException;
13 |
14 | public class MainActivity extends AppCompatActivity {
15 |
16 | public class Downloadtask extends AsyncTask{
17 |
18 | @Override
19 | protected String doInBackground(String... params) {
20 | String result = "";
21 | URL url;
22 | HttpURLConnection urlConnection = null;
23 |
24 | try
25 | {
26 | url=new URL(params[0]);
27 | urlConnection= (HttpURLConnection) url.openConnection();
28 | InputStream in = urlConnection.getInputStream();
29 | InputStreamReader reader=new InputStreamReader(in);
30 |
31 | int data = reader.read();
32 | while(data != -1)
33 | {
34 | char current = (char )data;
35 | result += current;
36 | data=reader.read();
37 | }
38 | return result;
39 | }catch (Exception e)
40 | {
41 | e.printStackTrace();
42 | return "FAILED";
43 | }
44 |
45 | //Log.i("url:",params[0]);
46 |
47 | }
48 | }
49 | @Override
50 | protected void onCreate(Bundle savedInstanceState) {
51 | super.onCreate(savedInstanceState);
52 | setContentView(R.layout.activity_main);
53 |
54 | Downloadtask task = new Downloadtask();
55 | String result= null;
56 | try {
57 | result = task.execute("https://www.ecohosting.co.uk/").get();
58 | } catch (InterruptedException e) {
59 | e.printStackTrace();
60 | } catch (ExecutionException e) {
61 | e.printStackTrace();
62 | }
63 |
64 | Log.i("CONTENTS OF URL",result);
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/sharedperferences/ObjectSerializer.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.sharedperferences;
2 |
3 | import android.util.Log;
4 |
5 | import java.io.ByteArrayInputStream;
6 | import java.io.ByteArrayOutputStream;
7 | import java.io.IOException;
8 | import java.io.ObjectInputStream;
9 | import java.io.ObjectOutputStream;
10 | import java.io.Serializable;
11 |
12 |
13 | public class ObjectSerializer {
14 |
15 |
16 | public static String serialize(Serializable obj) throws IOException {
17 | if (obj == null) return "";
18 | try {
19 | ByteArrayOutputStream serialObj = new ByteArrayOutputStream();
20 | ObjectOutputStream objStream = new ObjectOutputStream(serialObj);
21 | objStream.writeObject(obj);
22 | objStream.close();
23 | return encodeBytes(serialObj.toByteArray());
24 | } catch (Exception e) {
25 | throw new RuntimeException(e);
26 | }
27 | }
28 |
29 | public static Object deserialize(String str) throws IOException {
30 | if (str == null || str.length() == 0) return null;
31 | try {
32 | ByteArrayInputStream serialObj = new ByteArrayInputStream(decodeBytes(str));
33 | ObjectInputStream objStream = new ObjectInputStream(serialObj);
34 | return objStream.readObject();
35 | } catch (Exception e) {
36 | throw new RuntimeException(e);
37 | }
38 | }
39 |
40 | public static String encodeBytes(byte[] bytes) {
41 | StringBuffer strBuf = new StringBuffer();
42 |
43 | for (int i = 0; i < bytes.length; i++) {
44 | strBuf.append((char) (((bytes[i] >> 4) & 0xF) + ((int) 'a')));
45 | strBuf.append((char) (((bytes[i]) & 0xF) + ((int) 'a')));
46 | }
47 |
48 | return strBuf.toString();
49 | }
50 |
51 | public static byte[] decodeBytes(String str) {
52 | byte[] bytes = new byte[str.length() / 2];
53 | for (int i = 0; i < str.length(); i+=2) {
54 | char c = str.charAt(i);
55 | bytes[i/2] = (byte) ((c - 'a') << 4);
56 | c = str.charAt(i+1);
57 | bytes[i/2] += (c - 'a');
58 | }
59 | return bytes;
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/googlemaps/MapsActivity.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.googlemaps;
2 |
3 | import android.support.v4.app.FragmentActivity;
4 | import android.os.Bundle;
5 |
6 | import com.google.android.gms.maps.CameraUpdateFactory;
7 | import com.google.android.gms.maps.GoogleMap;
8 | import com.google.android.gms.maps.OnMapReadyCallback;
9 | import com.google.android.gms.maps.SupportMapFragment;
10 | import com.google.android.gms.maps.model.BitmapDescriptor;
11 | import com.google.android.gms.maps.model.BitmapDescriptorFactory;
12 | import com.google.android.gms.maps.model.LatLng;
13 | import com.google.android.gms.maps.model.MarkerOptions;
14 |
15 | public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
16 |
17 | private GoogleMap mMap;
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_maps);
23 | // Obtain the SupportMapFragment and get notified when the map is ready to be used.
24 | SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
25 | .findFragmentById(R.id.map);
26 | mapFragment.getMapAsync(this);
27 | }
28 |
29 |
30 | /**
31 | * Manipulates the map once available.
32 | * This callback is triggered when the map is ready to be used.
33 | * This is where we can add markers or lines, add listeners or move the camera. In this case,
34 | * we just add a marker near Sydney, Australia.
35 | * If Google Play services is not installed on the device, the user will be prompted to install
36 | * it inside the SupportMapFragment. This method will only be triggered once the user has
37 | * installed Google Play services and returned to the app.
38 | */
39 | @Override
40 | public void onMapReady(GoogleMap googleMap) {
41 | mMap = googleMap;
42 |
43 | mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
44 |
45 | // Add a marker in Sydney and move the camera
46 | LatLng everest = new LatLng(27.9881199,86.9162203);
47 |
48 | mMap.addMarker(new MarkerOptions().position(everest).title("Marker in Sydney").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));
49 | mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(everest,15));
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/twitter/Feed.java:
--------------------------------------------------------------------------------
1 | package com.lenovo.twitter;
2 |
3 |
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.widget.ListView;
7 | import android.widget.SimpleAdapter;
8 |
9 | import com.parse.FindCallback;
10 | import com.parse.ParseException;
11 | import com.parse.ParseObject;
12 | import com.parse.ParseQuery;
13 | import com.parse.ParseUser;
14 |
15 | import java.util.ArrayList;
16 | import java.util.HashMap;
17 | import java.util.List;
18 | import java.util.Map;
19 |
20 | public class Feed extends AppCompatActivity {
21 |
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_feed);
26 |
27 | setTitle("Your Feed");
28 |
29 | final ListView feedListView = (ListView) findViewById(R.id.feedListView);
30 |
31 | ParseQuery query = ParseQuery.getQuery("Tweet");
32 |
33 | query.whereContainedIn("username", ParseUser.getCurrentUser().getList("isFollowing"));
34 | query.orderByDescending("createdAt");
35 | query.setLimit(20);
36 |
37 | query.findInBackground(new FindCallback() {
38 | @Override
39 | public void done(List objects, ParseException e) {
40 | if (e == null) {
41 |
42 | if (objects.size() > 0) {
43 |
44 | List