Skip to content

Commit

Permalink
Merge pull request #6 from SoufianeKreX/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
soufianekremcht authored Jan 30, 2021
2 parents cca0af1 + 46b0164 commit 4b0a5f8
Show file tree
Hide file tree
Showing 27 changed files with 253 additions and 106 deletions.
98 changes: 86 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,88 @@
# Built application files
*.apk
*.aar
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/

# Android Profiling
*.hprof
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/render.experimental.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
compileSdkVersion 29

defaultConfig {
applicationId "com.soufianekre.urlpreviewersample"
applicationId "com.soufianekre.linkpreviewersample"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
Expand Down Expand Up @@ -41,7 +41,7 @@ dependencies {
debugImplementation 'cat.ereza:customactivityoncrash:2.2.0'

implementation project(path: ':library')
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.soufianekre.urlpreviewersample
package com.soufianekre.linkpreviewersample

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.soufianekre.urlpreviewersample">
package="com.soufianekre.linkpreviewersample">

<uses-permission android:name="android.permission.INTERNET"/>

<application
android:name="com.soufianekre.urlpreviewersample.MyApp"
android:name="com.soufianekre.linkpreviewersample.MyApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar">
<activity android:name="com.soufianekre.urlpreviewersample.ui.MainActivity" >
<activity android:name="com.soufianekre.linkpreviewersample.ui.MainActivity" >

<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.soufianekre.urlpreviewersample
package com.soufianekre.linkpreviewersample

import android.app.Application

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.soufianekre.urlpreviewersample.ui
package com.soufianekre.linkpreviewersample.ui

import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL
import com.soufianekre.urlpreviewer.data.UrlPreviewItem
import com.soufianekre.urlpreviewer.views.UrlPreviewCard
import com.soufianekre.urlpreviewersample.R
import com.soufianekre.linkpreviewer.data.UrlPreviewItem
import com.soufianekre.linkpreviewer.views.UrlPreviewCard
import com.soufianekre.linkpreviewersample.R

import kotlinx.android.synthetic.main.activity_main.*

Expand All @@ -30,6 +30,7 @@ class MainActivity : AppCompatActivity(),UrlPreviewCard.OnPreviewLoad {
urlList.add("https://developer.android.com/studio")
urlList.add("https://github.com/SoufianeKreX/UrlPreviewer")


links_recycler_view.layoutManager = LinearLayoutManager(this, VERTICAL, false)
urlPreviewAdapter = UrlPreviewAdapter(this, urlList)
links_recycler_view.adapter = urlPreviewAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.soufianekre.urlpreviewersample.ui
package com.soufianekre.linkpreviewersample.ui

import android.content.Context
import android.os.Handler
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.soufianekre.urlpreviewer.data.UrlPreviewItem
import com.soufianekre.urlpreviewer.views.UrlPreviewCard
import com.soufianekre.urlpreviewersample.R
import com.soufianekre.linkpreviewer.data.UrlPreviewItem
import com.soufianekre.linkpreviewer.views.UrlPreviewCard
import com.soufianekre.linkpreviewersample.R


class UrlPreviewAdapter(var context: Context, var urlList: ArrayList<String>) :
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.soufianekre.urlpreviewersample.ui
package com.soufianekre.linkpreviewersample.ui

import android.view.View
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView

import com.soufianekre.urlpreviewer.views.UrlPreviewCard
import com.soufianekre.urlpreviewersample.R
import com.soufianekre.linkpreviewer.views.UrlPreviewCard
import com.soufianekre.linkpreviewersample.R


class UrlPreviewViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:textSize="@dimen/font_large"
android:padding="@dimen/spacing_normal"/>

<com.soufianekre.urlpreviewer.views.UrlPreviewCard
<com.soufianekre.linkpreviewer.views.UrlPreviewCard
android:id="@+id/single_url_preview_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/list_item_url_preview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

</androidx.cardview.widget.CardView>

<com.soufianekre.urlpreviewer.views.UrlPreviewCard
<com.soufianekre.linkpreviewer.views.UrlPreviewCard
android:id="@+id/item_url_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">URLPreviewer</string>
<string name="app_name">LinkPreviewer</string>
</resources>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.soufianekre.urlpreviewersample
package com.soufianekre.linkpreviewersample

import org.junit.Test

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:3.27.0"
classpath "com.android.tools.build:gradle:4.0.2"
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Nov 23 21:25:37 WEST 2020
#Sat Jan 30 18:08:00 WEST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.soufianekre.urlpreviewer
package com.soufianekre.linkpreviewer

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.soufianekre.urlpreviewer">
package="com.soufianekre.linkpreviewer">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Expand Down
Loading

0 comments on commit 4b0a5f8

Please sign in to comment.