diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index eba1110..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto \ No newline at end of file diff --git a/.gitignore b/.gitignore index 63cb77a..5edb4ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ *.iml .gradle /local.properties -.idea +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml .DS_Store /build /captures diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000..f73c061 Binary files /dev/null and b/.idea/caches/build_file_checksums.ser differ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..30aa626 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..2512be3 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..66e2f6f --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4683d43 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/0/5/05efc8b1657769a27696d478ded1e95f38737233 b/.idea/sonarlint/issuestore/0/5/05efc8b1657769a27696d478ded1e95f38737233 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/3/7/371303149c064ab6566348e9e3af6982b92265b3 b/.idea/sonarlint/issuestore/3/7/371303149c064ab6566348e9e3af6982b92265b3 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/5/6/5648f9b32f40f53e67a4b56f4b43fa837b708f5a b/.idea/sonarlint/issuestore/5/6/5648f9b32f40f53e67a4b56f4b43fa837b708f5a new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/5/d/5d356e3135d602d8198bb4b043fdfb97df7563c9 b/.idea/sonarlint/issuestore/5/d/5d356e3135d602d8198bb4b043fdfb97df7563c9 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/6/f/6f02b4fbc88b4d9f777c9703f79e1a9daea9e30e b/.idea/sonarlint/issuestore/6/f/6f02b4fbc88b4d9f777c9703f79e1a9daea9e30e new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/7/6/76b07e40f24cce093536731477540f12e7da3cb6 b/.idea/sonarlint/issuestore/7/6/76b07e40f24cce093536731477540f12e7da3cb6 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/8/a/8a448192745d14c6172c528962fd417b29a5af2e b/.idea/sonarlint/issuestore/8/a/8a448192745d14c6172c528962fd417b29a5af2e new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/8/c/8c55c3ccc257e5907959013f99656e4c8ec3903e b/.idea/sonarlint/issuestore/8/c/8c55c3ccc257e5907959013f99656e4c8ec3903e new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/9/e/9e08934d811afe28fbc77aaa3c0d747b94348db9 b/.idea/sonarlint/issuestore/9/e/9e08934d811afe28fbc77aaa3c0d747b94348db9 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/a/b/abd323d78c21b0bdc70f1bd2d4dff5edb3a8cb53 b/.idea/sonarlint/issuestore/a/b/abd323d78c21b0bdc70f1bd2d4dff5edb3a8cb53 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/a/c/ace45f7a1227622e2e8220b143a9bf2f6ff4aefa b/.idea/sonarlint/issuestore/a/c/ace45f7a1227622e2e8220b143a9bf2f6ff4aefa new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/b/c/bc1e6337a6cee4d549ebc79c089f4196728c3aeb b/.idea/sonarlint/issuestore/b/c/bc1e6337a6cee4d549ebc79c089f4196728c3aeb new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/c/3/c3c1811dec2dbad2deeafb9aad505ca9631da740 b/.idea/sonarlint/issuestore/c/3/c3c1811dec2dbad2deeafb9aad505ca9631da740 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/d/2/d20c0c3ec31cee6c95d4141518d7f9e7d4173ee2 b/.idea/sonarlint/issuestore/d/2/d20c0c3ec31cee6c95d4141518d7f9e7d4173ee2 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/d/2/d2281fbb3027de2722081a53408dd77628bf080e b/.idea/sonarlint/issuestore/d/2/d2281fbb3027de2722081a53408dd77628bf080e new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/e/d/ed62c3d858b34bf40cb0e1b5915e71b900bb0cd0 b/.idea/sonarlint/issuestore/e/d/ed62c3d858b34bf40cb0e1b5915e71b900bb0cd0 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35 b/.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/f/4/f4a01d6a4fcb971362ec00a83903fd3902f52164 b/.idea/sonarlint/issuestore/f/4/f4a01d6a4fcb971362ec00a83903fd3902f52164 new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/f/f/fff66739c7e1bf4c1093c222c79ca080b1a8671f b/.idea/sonarlint/issuestore/f/f/fff66739c7e1bf4c1093c222c79ca080b1a8671f new file mode 100644 index 0000000..e69de29 diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 0000000..148b0c6 --- /dev/null +++ b/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,39 @@ + +k +;app/src/main/java/com/santalu/myapplication/MainActivity.kt,5\6\5648f9b32f40f53e67a4b56f4b43fa837b708f5a +x +Hlibrary/src/main/java/com/santalu/diagonalimageview/DiagonalImageView.kt,a\b\abd323d78c21b0bdc70f1bd2d4dff5edb3a8cb53 +P + app/src/main/AndroidManifest.xml,8\c\8c55c3ccc257e5907959013f99656e4c8ec3903e +@ +app/build.gradle,f\4\f4a01d6a4fcb971362ec00a83903fd3902f52164 +D +library/build.gradle,b\c\bc1e6337a6cee4d549ebc79c089f4196728c3aeb +F +app/proguard-rules.pro,9\e\9e08934d811afe28fbc77aaa3c0d747b94348db9 +J +library/proguard-rules.pro,5\d\5d356e3135d602d8198bb4b043fdfb97df7563c9 +? +settings.gradle,0\5\05efc8b1657769a27696d478ded1e95f38737233 +_ +/app/src/main/res/layout/activity_gridlayout.xml,d\2\d20c0c3ec31cee6c95d4141518d7f9e7d4173ee2 +Y +)app/src/main/res/layout/activity_main.xml,7\6\76b07e40f24cce093536731477540f12e7da3cb6 +< + build.gradle,f\0\f07866736216be0ee2aba49e392191aeae700a35 +a +1app/src/main/res/layout/activity_recyclerview.xml,a\c\ace45f7a1227622e2e8220b143a9bf2f6ff4aefa +S +#app/src/main/res/values/strings.xml,d\2\d2281fbb3027de2722081a53408dd77628bf080e +i +9app/src/main/java/com/santalu/myapplication/Extensions.kt,8\a\8a448192745d14c6172c528962fd417b29a5af2e +q +Aapp/src/main/java/com/santalu/myapplication/GridLayoutActivity.kt,3\7\371303149c064ab6566348e9e3af6982b92265b3 +Y +)app/src/main/res/layout/item_cardview.xml,6\f\6f02b4fbc88b4d9f777c9703f79e1a9daea9e30e +R +"app/src/main/res/values/dimens.xml,c\3\c3c1811dec2dbad2deeafb9aad505ca9631da740 +] +-app/src/main/res/layout/item_recyclerview.xml,e\d\ed62c3d858b34bf40cb0e1b5915e71b900bb0cd0 +s +Capp/src/main/java/com/santalu/myapplication/RecyclerViewActivity.kt,f\f\fff66739c7e1bf4c1093c222c79ca080b1a8671f \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ad410e1..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index ac31b17..415427f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,8 +1,9 @@ apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 27 - buildToolsVersion "27.0.3" defaultConfig { applicationId "com.santalu.myapplication" @@ -12,36 +13,27 @@ android { versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } -ext { - supportLibraryVersion = '27.1.1' - picassoVersion = '2.5.2' - pageIndicatorVersion = '1.0.1' -} - dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) - implementation "com.android.support:appcompat-v7:$supportLibraryVersion" - implementation "com.android.support:design:$supportLibraryVersion" - implementation "com.android.support:recyclerview-v7:$supportLibraryVersion" - implementation "com.android.support:cardview-v7:$supportLibraryVersion" - implementation "com.android.support:gridlayout-v7:$supportLibraryVersion" - implementation "com.squareup.picasso:picasso:$picassoVersion" - implementation "com.romandanylyk:pageindicatorview:$pageIndicatorVersion" - testImplementation 'junit:junit:4.12' - implementation project(path: ':library') + implementation project(':library') + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "com.android.support:appcompat-v7:$supportlibrary_version" + implementation "com.android.support:recyclerview-v7:$supportlibrary_version" + implementation "com.android.support:cardview-v7:$supportlibrary_version" + implementation "com.android.support:gridlayout-v7:$supportlibrary_version" } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 038bf99..f1b4245 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,14 +1,10 @@ # Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/santalu/Library/Android/sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html -# Add any project specific keep options here: - # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: diff --git a/app/src/androidTest/java/com/santalu/myapplication/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/santalu/myapplication/ExampleInstrumentedTest.java deleted file mode 100644 index 17a731f..0000000 --- a/app/src/androidTest/java/com/santalu/myapplication/ExampleInstrumentedTest.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.santalu.myapplication; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.assertEquals; - -/** - * Instrumentation test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("com.santalu.myapplication", appContext.getPackageName()); - } -} diff --git a/app/src/androidTest/java/com/santalu/myapplication/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/santalu/myapplication/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..934edff --- /dev/null +++ b/app/src/androidTest/java/com/santalu/myapplication/ExampleInstrumentedTest.kt @@ -0,0 +1,22 @@ +package com.santalu.myapplication + +import android.support.test.InstrumentationRegistry +import android.support.test.runner.AndroidJUnit4 +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getTargetContext() + assertEquals("com.santalu.myapplication", appContext.packageName) + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2c1cdf3..c01d61e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,8 +2,6 @@ - - - + @@ -23,30 +18,11 @@ - - - - - - - - - + + + + + diff --git a/app/src/main/java/com/santalu/myapplication/CardViewSampleActivity.java b/app/src/main/java/com/santalu/myapplication/CardViewSampleActivity.java deleted file mode 100644 index 2005bd6..0000000 --- a/app/src/main/java/com/santalu/myapplication/CardViewSampleActivity.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.santalu.myapplication; - -import android.content.Context; -import android.content.Intent; -import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.Adapter; -import android.support.v7.widget.Toolbar; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -/** - * Created by santalu on 20/07/2017. - */ - -public class CardViewSampleActivity extends AppCompatActivity { - - public static void start(Context context) { - context.startActivity(new Intent(context, CardViewSampleActivity.class)); - } - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_recycler_view); - Toolbar toolbar = findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - - RecyclerView recyclerView = findViewById(R.id.recycler_view); - recyclerView.setLayoutManager(new LinearLayoutManager(this)); - recyclerView.setHasFixedSize(true); - recyclerView.setAdapter(new SampleAdapter(this)); - } - - static class SampleAdapter extends Adapter { - private final LayoutInflater inflater; - - SampleAdapter(Context context) { - inflater = LayoutInflater.from(context); - } - - @NonNull - @Override - public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - return new ViewHolder(inflater.inflate(R.layout.item_card_view, parent, false)); - } - - @Override - public void onBindViewHolder(@NonNull ViewHolder holder, int position) { - } - - @Override - public int getItemCount() { - return 20; - } - - class ViewHolder extends RecyclerView.ViewHolder { - - ViewHolder(View itemView) { - super(itemView); - } - } - } -} diff --git a/app/src/main/java/com/santalu/myapplication/CollapsingToolbarSampleActivity.java b/app/src/main/java/com/santalu/myapplication/CollapsingToolbarSampleActivity.java deleted file mode 100644 index 844f841..0000000 --- a/app/src/main/java/com/santalu/myapplication/CollapsingToolbarSampleActivity.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.santalu.myapplication; - -import android.content.Context; -import android.content.Intent; -import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import com.santalu.diagonalimageview.DiagonalImageView; - -/** - * Created by santalu on 20/07/2017. - */ - -public class CollapsingToolbarSampleActivity extends AppCompatActivity { - - public static void start(Context context) { - context.startActivity(new Intent(context, CollapsingToolbarSampleActivity.class)); - } - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_collapsing_toolbar); - Toolbar toolbar = findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - DiagonalImageView imageView = findViewById(R.id.image); - - imageView.setOnClickListener(v -> - imageView.setPosition(DiagonalImageView.BOTTOM) - .setDirection(DiagonalImageView.RIGHT) - .setOverlap(300) - .invalidate()); - } -} diff --git a/app/src/main/java/com/santalu/myapplication/Extensions.kt b/app/src/main/java/com/santalu/myapplication/Extensions.kt new file mode 100644 index 0000000..51f5915 --- /dev/null +++ b/app/src/main/java/com/santalu/myapplication/Extensions.kt @@ -0,0 +1,19 @@ +package com.santalu.myapplication + +import android.content.Context +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.Toast + +/** + * Created by fatih.santalu on 7/24/2018. + */ + +fun ViewGroup.inflate(layoutRes: Int): View { + return LayoutInflater.from(context).inflate(layoutRes, this, false) +} + +fun Context.toast(text: CharSequence) { + Toast.makeText(this, text, Toast.LENGTH_SHORT).show() +} \ No newline at end of file diff --git a/app/src/main/java/com/santalu/myapplication/GridLayoutSampleActivity.java b/app/src/main/java/com/santalu/myapplication/GridLayoutSampleActivity.java deleted file mode 100644 index 3994f18..0000000 --- a/app/src/main/java/com/santalu/myapplication/GridLayoutSampleActivity.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.santalu.myapplication; - -import android.content.Context; -import android.content.Intent; -import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; - -/** - * Created by santalu on 7/18/17. - */ - -public class GridLayoutSampleActivity extends AppCompatActivity { - - public static void start(Context context) { - context.startActivity(new Intent(context, GridLayoutSampleActivity.class)); - } - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_grid_layout); - Toolbar toolbar = findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - } -} diff --git a/app/src/main/java/com/santalu/myapplication/MainActivity.java b/app/src/main/java/com/santalu/myapplication/MainActivity.java deleted file mode 100644 index 027191d..0000000 --- a/app/src/main/java/com/santalu/myapplication/MainActivity.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.santalu.myapplication; - -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; - -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - Toolbar toolbar = findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - - Button sampleGrid = findViewById(R.id.sample_grid); - Button sampleList = findViewById(R.id.sample_list); - Button sampleListComplex = findViewById(R.id.sample_list_complex); - Button sampleCard = findViewById(R.id.sample_card); - Button sampleCollapsing = findViewById(R.id.sample_collapsing); - - sampleGrid.setOnClickListener(v -> GridLayoutSampleActivity.start(MainActivity.this)); - sampleList.setOnClickListener(v -> RecyclerViewSampleActivity.start(MainActivity.this)); - sampleListComplex.setOnClickListener(v -> RecyclerViewComplexSampleActivity.start(MainActivity.this)); - sampleCard.setOnClickListener(v -> CardViewSampleActivity.start(MainActivity.this)); - sampleCollapsing.setOnClickListener(v -> CollapsingToolbarSampleActivity.start(MainActivity.this)); - } -} diff --git a/app/src/main/java/com/santalu/myapplication/MainActivity.kt b/app/src/main/java/com/santalu/myapplication/MainActivity.kt new file mode 100644 index 0000000..2e8d5eb --- /dev/null +++ b/app/src/main/java/com/santalu/myapplication/MainActivity.kt @@ -0,0 +1,27 @@ +package com.santalu.myapplication + +import android.os.Bundle +import android.support.v7.app.AppCompatActivity +import kotlinx.android.synthetic.main.activity_main.cardListSample +import kotlinx.android.synthetic.main.activity_main.gridSample +import kotlinx.android.synthetic.main.activity_main.listSample + +class MainActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + listSample.setOnClickListener { + SampleListActivity.start(this) + } + + cardListSample.setOnClickListener { + SampleCardListActivity.start(this) + } + + gridSample.setOnClickListener { + SampleGridActivity.start(this) + } + } +} diff --git a/app/src/main/java/com/santalu/myapplication/RecyclerViewComplexSampleActivity.java b/app/src/main/java/com/santalu/myapplication/RecyclerViewComplexSampleActivity.java deleted file mode 100644 index 5f6621e..0000000 --- a/app/src/main/java/com/santalu/myapplication/RecyclerViewComplexSampleActivity.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.santalu.myapplication; - -import android.content.Context; -import android.content.Intent; -import android.graphics.Rect; -import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.View.OnClickListener; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.ImageView.ScaleType; -import com.santalu.diagonalimageview.DiagonalImageView; -import com.squareup.picasso.Picasso; - -/** - * Created by santalu on 14/08/2017. - */ - -public class RecyclerViewComplexSampleActivity extends AppCompatActivity { - - public static void start(Context context) { - context.startActivity(new Intent(context, RecyclerViewComplexSampleActivity.class)); - } - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_recycler_view); - Toolbar toolbar = findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - - int overlap = getResources().getDimensionPixelSize(R.dimen.overlap_size); - RecyclerView recyclerView = findViewById(R.id.recycler_view); - LinearLayoutManager layoutManager = new LinearLayoutManager(this); - recyclerView.setLayoutManager(layoutManager); - recyclerView.setHasFixedSize(true); - recyclerView.addItemDecoration(new OverlapItemDecoration(-overlap)); - recyclerView.setAdapter(new SampleAdapter(this)); - } - - static class SampleAdapter extends RecyclerView.Adapter { - private static final int TYPE_PAGER = 1; - private static final int TYPE_REGULAR = 2; - - private final Context context; - private final LayoutInflater inflater; - - SampleAdapter(Context context) { - this.context = context; - inflater = LayoutInflater.from(context); - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - switch (viewType) { - case TYPE_PAGER: - return new SampleAdapter.PagerHolder( - inflater.inflate(R.layout.item_view_pager, parent, false)); - case TYPE_REGULAR: - default: - return new SampleAdapter.ViewHolder( - inflater.inflate(R.layout.item_recycler_view, parent, false)); - } - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - switch (holder.getItemViewType()) { - case TYPE_PAGER: - PagerHolder pagerHolder = (PagerHolder) holder; - pagerHolder.bind(); - break; - case TYPE_REGULAR: - default: - ViewHolder viewHolder = (ViewHolder) holder; - viewHolder.bind(position); - break; - } - } - - @Override - public int getItemCount() { - return 20; - } - - @Override - public int getItemViewType(int position) { - return position == 0 ? TYPE_PAGER : TYPE_REGULAR; - } - - class PagerHolder extends RecyclerView.ViewHolder { - ViewPager viewPager; - - PagerHolder(View itemView) { - super(itemView); - viewPager = itemView.findViewById(R.id.view_pager); - } - - void bind() { - viewPager.setAdapter(new SamplePagerAdapter(context)); - } - } - - class ViewHolder extends RecyclerView.ViewHolder { - DiagonalImageView image; - - ViewHolder(View itemView) { - super(itemView); - image = itemView.findViewById(R.id.image); - image.setOnClickListener(v -> Log.v("DiagonalImageView", getAdapterPosition() + " clicked")); - } - - void bind(int position) { - Picasso.with(context) - .load("https://media.gq" + - ".com/photos/561e9f0ca7113fb922cd6151/master/pass/gq-guide-to" + - "-suits-color-2015-03.jpg") - .placeholder(R.drawable.demo) - .error(R.drawable.demo) - .into(image); - - if (position > 1) { - image.setPosition(DiagonalImageView.TOP); - } else { - image.setPosition(DiagonalImageView.NONE); - } - } - } - } - - static class SamplePagerAdapter extends PagerAdapter { - private final Context context; - - SamplePagerAdapter(Context context) { - this.context = context; - } - - @Override - public int getCount() { - return 3; - } - - @Override - public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { - return view == object; - } - - @NonNull - @Override - public Object instantiateItem(@NonNull ViewGroup container, int position) { - ImageView imageView = new ImageView(context); - imageView.setScaleType(ScaleType.CENTER_CROP); - - Picasso.with(context) - .load("https://www.thefashionisto" + - ".com/wp-content/uploads/ama/2011/1/dknyspringcampaign1.jpg") - .placeholder(R.drawable.demo) - .error(R.drawable.demo) - .into(imageView); - - container.addView(imageView); - return imageView; - } - - @Override - public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { - container.removeView((View) object); - } - } - - static class OverlapItemDecoration extends RecyclerView.ItemDecoration { - private int overlap; - - OverlapItemDecoration(int overlap) { - this.overlap = overlap; - } - - @Override - public void getItemOffsets(Rect outRect, - View view, - RecyclerView parent, - RecyclerView.State state) { - super.getItemOffsets(outRect, view, parent, state); - if (parent.getChildAdapterPosition(view) > 1) { - outRect.top = overlap; - } - } - } -} diff --git a/app/src/main/java/com/santalu/myapplication/RecyclerViewSampleActivity.java b/app/src/main/java/com/santalu/myapplication/RecyclerViewSampleActivity.java deleted file mode 100644 index 6abc56b..0000000 --- a/app/src/main/java/com/santalu/myapplication/RecyclerViewSampleActivity.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.santalu.myapplication; - -import android.content.Context; -import android.content.Intent; -import android.graphics.Rect; -import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.View.OnClickListener; -import android.view.ViewGroup; -import com.santalu.diagonalimageview.DiagonalImageView; - -/** - * Created by santalu on 7/18/17. - */ - -public class RecyclerViewSampleActivity extends AppCompatActivity { - - public static void start(Context context) { - context.startActivity(new Intent(context, RecyclerViewSampleActivity.class)); - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_recycler_view); - Toolbar toolbar = findViewById(R.id.toolbar); - setSupportActionBar(toolbar); - - int overlap = getResources().getDimensionPixelSize(R.dimen.overlap_size); - RecyclerView recyclerView = findViewById(R.id.recycler_view); - LinearLayoutManager layoutManager = new LinearLayoutManager(this); - recyclerView.setLayoutManager(layoutManager); - recyclerView.setHasFixedSize(true); - recyclerView.addItemDecoration(new OverlapItemDecoration(-overlap)); - recyclerView.setAdapter(new SampleAdapter(this)); - } - - static class SampleAdapter extends RecyclerView.Adapter { - private final LayoutInflater inflater; - - SampleAdapter(Context context) { - inflater = LayoutInflater.from(context); - } - - @NonNull - @Override - public SampleAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - return new SampleAdapter.ViewHolder( - inflater.inflate(R.layout.item_recycler_view, parent, false)); - } - - @Override - public void onBindViewHolder(@NonNull SampleAdapter.ViewHolder holder, int position) { - holder.bind(position); - } - - @Override - public int getItemCount() { - return 20; - } - - class ViewHolder extends RecyclerView.ViewHolder { - DiagonalImageView image; - - ViewHolder(View itemView) { - super(itemView); - image = itemView.findViewById(R.id.image); - image.setOnClickListener(v -> Log.v("cmd", getAdapterPosition() + " clicked")); - } - - void bind(int position) { - if (position == 0) { - image.setPosition(DiagonalImageView.NONE); - } else { - image.setPosition(DiagonalImageView.TOP); - } - } - } - } - - static class OverlapItemDecoration extends RecyclerView.ItemDecoration { - private int overlap; - - OverlapItemDecoration(int overlap) { - this.overlap = overlap; - } - - @Override - public void getItemOffsets(Rect outRect, - View view, - RecyclerView parent, - RecyclerView.State state) { - super.getItemOffsets(outRect, view, parent, state); - if (parent.getChildAdapterPosition(view) > 0) { - outRect.top = overlap; - } - } - } -} diff --git a/app/src/main/java/com/santalu/myapplication/SampleCardListActivity.kt b/app/src/main/java/com/santalu/myapplication/SampleCardListActivity.kt new file mode 100644 index 0000000..41d7816 --- /dev/null +++ b/app/src/main/java/com/santalu/myapplication/SampleCardListActivity.kt @@ -0,0 +1,54 @@ +package com.santalu.myapplication + +import android.app.Activity +import android.content.Intent +import android.os.Bundle +import android.support.v7.app.AppCompatActivity +import android.support.v7.widget.RecyclerView +import android.view.View +import android.view.ViewGroup +import kotlinx.android.synthetic.main.activity_list.recyclerView + +/** + * Created by fatih.santalu on 7/24/2018. + */ + +class SampleCardListActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_list) + + recyclerView.setHasFixedSize(true) + recyclerView.adapter = SampleAdapter() + } + + class SampleAdapter : RecyclerView.Adapter() { + + override fun getItemCount(): Int { + return 20 + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SampleViewHolder { + val view = parent.inflate(R.layout.item_card_list) + return SampleViewHolder(view) + } + + override fun onBindViewHolder(holder: SampleViewHolder, position: Int) { + holder.itemView.setOnClickListener { + it.context.toast("position $position clicked") + } + } + + class SampleViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) + } + + companion object { + + fun start(activity: Activity) { + val intent = Intent(activity, SampleCardListActivity::class.java) + activity.startActivity(intent) + } + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/santalu/myapplication/SampleGridActivity.kt b/app/src/main/java/com/santalu/myapplication/SampleGridActivity.kt new file mode 100644 index 0000000..5fe8812 --- /dev/null +++ b/app/src/main/java/com/santalu/myapplication/SampleGridActivity.kt @@ -0,0 +1,31 @@ +package com.santalu.myapplication + +import android.app.Activity +import android.content.Intent +import android.os.Bundle +import android.support.v7.app.AppCompatActivity +import android.view.View + +/** + * Created by fatih.santalu on 7/24/2018. + */ + +class SampleGridActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_grid) + } + + fun onImageClick(view: View) { + toast("clicked") + } + + companion object { + + fun start(activity: Activity) { + val intent = Intent(activity, SampleGridActivity::class.java) + activity.startActivity(intent) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/santalu/myapplication/SampleListActivity.kt b/app/src/main/java/com/santalu/myapplication/SampleListActivity.kt new file mode 100644 index 0000000..b450780 --- /dev/null +++ b/app/src/main/java/com/santalu/myapplication/SampleListActivity.kt @@ -0,0 +1,74 @@ +package com.santalu.myapplication + +import android.app.Activity +import android.content.Intent +import android.graphics.Rect +import android.os.Bundle +import android.support.v7.app.AppCompatActivity +import android.support.v7.widget.RecyclerView +import android.support.v7.widget.RecyclerView.ItemDecoration +import android.support.v7.widget.RecyclerView.State +import android.view.View +import android.view.ViewGroup +import com.santalu.diagonalimageview.DiagonalImageView +import kotlinx.android.synthetic.main.activity_list.recyclerView +import kotlinx.android.synthetic.main.item_list.view.image + +/** + * Created by fatih.santalu on 7/24/2018. + */ + +class SampleListActivity : AppCompatActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_list) + + val overlap = resources.getDimensionPixelSize(R.dimen.overlap_size) + recyclerView.addItemDecoration(OverlapItemDecoration(-overlap)) + recyclerView.setHasFixedSize(true) + recyclerView.adapter = SampleAdapter() + } + + class SampleAdapter : RecyclerView.Adapter() { + + override fun getItemCount(): Int { + return 20 + } + + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SampleViewHolder { + val view = parent.inflate(R.layout.item_list) + return SampleViewHolder(view) + } + + override fun onBindViewHolder(holder: SampleViewHolder, position: Int) { + holder.itemView.image.position = + if (position == 0) DiagonalImageView.NONE else DiagonalImageView.TOP + holder.itemView.setOnClickListener { + it.context.toast("position $position clicked") + } + } + + class SampleViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) + } + + class OverlapItemDecoration(private val overlap: Int) : ItemDecoration() { + + override fun getItemOffsets(outRect: Rect?, view: View?, parent: RecyclerView?, state: State?) { + super.getItemOffsets(outRect, view, parent, state) + parent?.let { + if (it.getChildAdapterPosition(view) > 0) { + outRect?.top = overlap + } + } + } + } + + companion object { + + fun start(activity: Activity) { + val intent = Intent(activity, SampleListActivity::class.java) + activity.startActivity(intent) + } + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..7daee77 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_favorite.xml b/app/src/main/res/drawable/ic_favorite.xml deleted file mode 100644 index 9c829d7..0000000 --- a/app/src/main/res/drawable/ic_favorite.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..4ea54ca --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/selector.xml b/app/src/main/res/drawable/selector.xml deleted file mode 100644 index b056d35..0000000 --- a/app/src/main/res/drawable/selector.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_collapsing_toolbar.xml b/app/src/main/res/layout/activity_collapsing_toolbar.xml deleted file mode 100644 index 400b95d..0000000 --- a/app/src/main/res/layout/activity_collapsing_toolbar.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_grid.xml b/app/src/main/res/layout/activity_grid.xml new file mode 100644 index 0000000..273e7cf --- /dev/null +++ b/app/src/main/res/layout/activity_grid.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_grid_layout.xml b/app/src/main/res/layout/activity_grid_layout.xml deleted file mode 100644 index 62cf3c8..0000000 --- a/app/src/main/res/layout/activity_grid_layout.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_list.xml b/app/src/main/res/layout/activity_list.xml new file mode 100644 index 0000000..62cbbf9 --- /dev/null +++ b/app/src/main/res/layout/activity_list.xml @@ -0,0 +1,12 @@ + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 601e8f1..ed02e10 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,49 +1,27 @@ - + android:gravity="center" + android:orientation="vertical" + android:padding="24dp"> - - - - -