├── .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 |