File tree 29 files changed +52
-53
lines changed
androidTest/java/com/gun/presentation
java/com/gun/presentation
test/java/com/gun/presentation 29 files changed +52
-53
lines changed Original file line number Diff line number Diff line change 1
1
object AppConfig {
2
- const val NAME_SPACE = " com.gun.android_marvel_example "
2
+ const val NAME_SPACE = " com.gun.mvvm_cleanarchitecture "
3
3
const val COMPILE_SDK = 33
4
4
const val MIN_SDK = 24
5
5
const val TARGET_SDK = 33
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ android {
12
12
compileSdk = AppConfig .COMPILE_SDK
13
13
14
14
defaultConfig {
15
- applicationId = " com.gun.android_marvel_example "
15
+ applicationId = " com.gun.mvvm_cleanarchitecture "
16
16
minSdk = AppConfig .MIN_SDK
17
17
targetSdk = AppConfig .TARGET_SDK
18
18
versionCode = 1
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example
1
+ package com.gun.presentation
2
2
3
3
import androidx.test.platform.app.InstrumentationRegistry
4
4
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
19
19
fun useAppContext () {
20
20
// Context of the app under test.
21
21
val appContext = InstrumentationRegistry .getInstrumentation().targetContext
22
- assertEquals(" com.gun.android_marvel_example " , appContext.packageName)
22
+ assertEquals(" com.gun.mvvm_cleanarchitecture " , appContext.packageName)
23
23
}
24
24
}
Original file line number Diff line number Diff line change 11
11
android : icon =" @mipmap/ic_launcher"
12
12
android : label =" @string/app_name"
13
13
android : supportsRtl =" true"
14
- android : theme =" @style/Theme.Android_Marvel_Example "
14
+ android : theme =" @style/Theme.MVVM_CleanArchitecture "
15
15
tools : targetApi =" 31" >
16
16
<activity
17
- android : name =" .ui.main.MainActivity"
17
+ android : name =" com.gun.presentation .ui.main.MainActivity"
18
18
android : exported =" true" >
19
19
<intent-filter >
20
20
<action android : name =" android.intent.action.MAIN" />
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .common
1
+ package com.gun.presentation .common
2
2
3
3
import android.annotation.SuppressLint
4
4
import androidx.recyclerview.widget.DiffUtil
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .common
1
+ package com.gun.presentation .common
2
2
3
3
import androidx.recyclerview.widget.ListAdapter
4
4
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .common
1
+ package com.gun.presentation .common
2
2
3
3
import android.view.View
4
4
import androidx.recyclerview.widget.RecyclerView
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.favorite
1
+ package com.gun.presentation .ui.favorite
2
2
3
3
import android.os.Bundle
4
4
import androidx.fragment.app.Fragment
5
5
import android.view.LayoutInflater
6
6
import android.view.View
7
7
import android.view.ViewGroup
8
- import com.gun.android_marvel_example .R
8
+ import com.gun.mvvm_cleanarchitecture .R
9
9
10
10
// TODO: Rename parameter arguments, choose names that match
11
11
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.home
1
+ package com.gun.presentation .ui.home
2
2
3
3
import android.os.Bundle
4
4
import android.view.LayoutInflater
@@ -7,13 +7,13 @@ import android.view.ViewGroup
7
7
import androidx.databinding.DataBindingUtil
8
8
import androidx.fragment.app.Fragment
9
9
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
10
- import com.gun.android_marvel_example.R
11
10
import com.gun.domain.model.TestData
12
- import com.gun.android_marvel_example.databinding.FragmentHomeBinding
13
- import com.gun.android_marvel_example.ui.home.banner.HomeBannerAdapter
14
- import com.gun.android_marvel_example.ui.home.banner.HomeBannerFragment
15
- import com.gun.android_marvel_example.ui.home.banner.HomeBannerPageChangeCallback
16
- import com.gun.android_marvel_example.ui.home.list.HomeListRecyclerAdapter
11
+ import com.gun.mvvm_cleanarchitecture.R
12
+ import com.gun.mvvm_cleanarchitecture.databinding.FragmentHomeBinding
13
+ import com.gun.presentation.ui.home.banner.HomeBannerAdapter
14
+ import com.gun.presentation.ui.home.banner.HomeBannerFragment
15
+ import com.gun.presentation.ui.home.banner.HomeBannerPageChangeCallback
16
+ import com.gun.presentation.ui.home.list.HomeListRecyclerAdapter
17
17
18
18
19
19
class HomeFragment : Fragment () {
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.home.banner
1
+ package com.gun.presentation .ui.home.banner
2
2
3
3
import androidx.fragment.app.Fragment
4
4
import androidx.fragment.app.FragmentActivity
@@ -11,7 +11,6 @@ class HomeBannerAdapter(
11
11
) : FragmentStateAdapter(fragmentActivity) {
12
12
13
13
override fun getItemCount (): Int {
14
- if (fragmentList == null ) return 0
15
14
return fragmentList.size
16
15
}
17
16
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.home.banner
1
+ package com.gun.presentation .ui.home.banner
2
2
3
3
import android.os.Bundle
4
4
import android.view.LayoutInflater
5
5
import android.view.View
6
6
import android.view.ViewGroup
7
7
import androidx.fragment.app.Fragment
8
8
import com.bumptech.glide.Glide
9
- import com.gun.android_marvel_example .databinding.FragmentHomeBannerBinding
9
+ import com.gun.mvvm_cleanarchitecture .databinding.FragmentHomeBannerBinding
10
10
11
11
class HomeBannerFragment : Fragment () {
12
12
private lateinit var binding: FragmentHomeBannerBinding
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.home.banner
1
+ package com.gun.presentation .ui.home.banner
2
2
3
3
import androidx.viewpager2.adapter.FragmentStateAdapter
4
4
import androidx.viewpager2.widget.ViewPager2
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.home.list
1
+ package com.gun.presentation .ui.home.list
2
2
3
3
import android.view.LayoutInflater
4
4
import android.view.ViewGroup
5
- import com.gun.android_marvel_example .common.BaseListAdapter
6
- import com.gun.android_marvel_example .common.BaseViewHolder
5
+ import com.gun.presentation .common.BaseListAdapter
6
+ import com.gun.presentation .common.BaseViewHolder
7
7
import com.gun.domain.model.TestData
8
- import com.gun.android_marvel_example .databinding.HolderHomeListBinding
8
+ import com.gun.mvvm_cleanarchitecture .databinding.HolderHomeListBinding
9
9
10
10
class HomeListRecyclerAdapter :
11
11
BaseListAdapter <TestData , HomeListRecyclerAdapter .ViewHolder >() {
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.main
1
+ package com.gun.presentation .ui.main
2
2
3
3
import android.os.Bundle
4
- import android.view.View
5
4
import androidx.appcompat.app.AppCompatActivity
6
5
import androidx.databinding.DataBindingUtil
7
6
import androidx.navigation.fragment.NavHostFragment
8
7
import androidx.navigation.fragment.findNavController
9
8
import androidx.navigation.ui.setupWithNavController
10
- import com.gun.android_marvel_example .R
11
- import com.gun.android_marvel_example .databinding.ActivityMainBinding
9
+ import com.gun.mvvm_cleanarchitecture .R
10
+ import com.gun.mvvm_cleanarchitecture .databinding.ActivityMainBinding
12
11
13
12
class MainActivity : AppCompatActivity () {
14
13
private val binding by lazy<ActivityMainBinding > {
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.profile
1
+ package com.gun.presentation .ui.profile
2
2
3
3
import android.os.Bundle
4
4
import androidx.fragment.app.Fragment
5
5
import android.view.LayoutInflater
6
6
import android.view.View
7
7
import android.view.ViewGroup
8
- import com.gun.android_marvel_example .R
8
+ import com.gun.mvvm_cleanarchitecture .R
9
9
10
10
// TODO: Rename parameter arguments, choose names that match
11
11
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example .ui.search
1
+ package com.gun.presentation .ui.search
2
2
3
3
import android.os.Bundle
4
4
import androidx.fragment.app.Fragment
5
5
import android.view.LayoutInflater
6
6
import android.view.View
7
7
import android.view.ViewGroup
8
- import com.gun.android_marvel_example .R
8
+ import com.gun.mvvm_cleanarchitecture .R
9
9
10
10
class SearchFragment : Fragment () {
11
11
Original file line number Diff line number Diff line change 2
2
<layout xmlns : android =" http://schemas.android.com/apk/res/android"
3
3
xmlns : app =" http://schemas.android.com/apk/res-auto"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
- tools : context =" .ui.main.MainActivity" >
5
+ tools : context =" com.gun.presentation .ui.main.MainActivity" >
6
6
7
7
<androidx .constraintlayout.widget.ConstraintLayout style =" @style/Base.Size.Match_Match" >
8
8
Original file line number Diff line number Diff line change 2
2
<layout
3
3
xmlns : android =" http://schemas.android.com/apk/res/android"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
- tools : context =" .ui.favorite.FavoriteFragment" >
5
+ tools : context =" com.gun.presentation .ui.favorite.FavoriteFragment" >
6
6
7
7
<FrameLayout style =" @style/Base.Size.Match_Match" >
8
8
Original file line number Diff line number Diff line change 2
2
<layout xmlns : android =" http://schemas.android.com/apk/res/android"
3
3
xmlns : app =" http://schemas.android.com/apk/res-auto"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
- tools : context =" .ui.home.HomeFragment" >
5
+ tools : context =" com.gun.presentation .ui.home.HomeFragment" >
6
6
7
7
<androidx .coordinatorlayout.widget.CoordinatorLayout style =" @style/Base.Size.Match_Match" >
8
8
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<layout xmlns : android =" http://schemas.android.com/apk/res/android"
3
3
xmlns : app =" http://schemas.android.com/apk/res-auto"
4
- xmlns : tools =" http://schemas.android.com/tools" >
4
+ xmlns : tools =" http://schemas.android.com/tools"
5
+ tools : context =" com.gun.presentation.ui.home.HomeFragment" >
5
6
6
7
<androidx .constraintlayout.widget.ConstraintLayout style =" @style/Base.Size.Match_Match" >
7
8
Original file line number Diff line number Diff line change 2
2
<layout
3
3
xmlns : android =" http://schemas.android.com/apk/res/android"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
- tools : context =" .ui.profile.ProfileFragment" >
5
+ tools : context =" com.gun.presentation .ui.profile.ProfileFragment" >
6
6
7
7
<FrameLayout style =" @style/Base.Size.Match_Match" >
8
8
Original file line number Diff line number Diff line change 2
2
<layout
3
3
xmlns : android =" http://schemas.android.com/apk/res/android"
4
4
xmlns : tools =" http://schemas.android.com/tools"
5
- tools : context =" .ui.search.SearchFragment" >
5
+ tools : context =" com.gun.presentation .ui.search.SearchFragment" >
6
6
7
7
<FrameLayout style =" @style/Base.Size.Match_Match" >
8
8
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<layout xmlns : app =" http://schemas.android.com/apk/res-auto"
3
- xmlns : android =" http://schemas.android.com/apk/res/android" >
3
+ xmlns : android =" http://schemas.android.com/apk/res/android"
4
+ xmlns : tools =" http://schemas.android.com/tools"
5
+ tools : context =" com.gun.presentation.ui.home.HomeFragment" >
4
6
5
7
<androidx .constraintlayout.widget.ConstraintLayout style =" @style/Base.Size.Match_Wrap" >
6
8
Original file line number Diff line number Diff line change 7
7
8
8
<fragment
9
9
android : id =" @+id/homeFragment"
10
- android : name =" com.gun.android_marvel_example .ui.home.HomeFragment"
10
+ android : name =" com.gun.presentation .ui.home.HomeFragment"
11
11
android : label =" fragment_home"
12
12
tools : layout =" @layout/fragment_home" >
13
13
<action
23
23
24
24
<fragment
25
25
android : id =" @+id/searchFragment"
26
- android : name =" com.gun.android_marvel_example .ui.search.SearchFragment"
26
+ android : name =" com.gun.presentation .ui.search.SearchFragment"
27
27
android : label =" fragment_search"
28
28
tools : layout =" @layout/fragment_search" />
29
29
30
30
<fragment
31
31
android : id =" @+id/favoriteFragment"
32
- android : name =" com.gun.android_marvel_example .ui.favorite.FavoriteFragment"
32
+ android : name =" com.gun.presentation .ui.favorite.FavoriteFragment"
33
33
android : label =" fragment_favorite"
34
34
tools : layout =" @layout/fragment_favorite" />
35
35
36
36
<fragment
37
37
android : id =" @+id/profileFragment"
38
- android : name =" com.gun.android_marvel_example .ui.profile.ProfileFragment"
38
+ android : name =" com.gun.presentation .ui.profile.ProfileFragment"
39
39
android : label =" fragment_profile"
40
40
tools : layout =" @layout/fragment_profile" />
41
41
Original file line number Diff line number Diff line change 1
1
<resources xmlns : tools =" http://schemas.android.com/tools" >
2
2
<!-- Base application theme. -->
3
- <style name =" Theme.Android_Marvel_Example " parent =" Theme.MaterialComponents.DayNight.DarkActionBar" >
3
+ <style name =" Theme.MVVM_CleanArchitecture " parent =" Theme.MaterialComponents.DayNight.DarkActionBar" >
4
4
<!-- Primary brand color. -->
5
5
<item name =" colorPrimary" >@color/purple_200</item >
6
6
<item name =" colorPrimaryVariant" >@color/purple_700</item >
Original file line number Diff line number Diff line change 1
1
<resources >
2
- <string name =" app_name" >Android_Marvel_Example</string >
3
-
4
- <string name =" hello_blank_fragment" >Hello blank fragment</string >
2
+ <string name =" app_name" >MVVM_CleanArchitecture</string >
5
3
</resources >
Original file line number Diff line number Diff line change 1
1
<resources xmlns : tools =" http://schemas.android.com/tools" >
2
2
<!-- Base application theme. -->
3
- <style name =" Theme.Android_Marvel_Example " parent =" Theme.AppCompat.NoActionBar" >
3
+ <style name =" Theme.MVVM_CleanArchitecture " parent =" Theme.AppCompat.NoActionBar" >
4
4
<!-- Primary brand color. -->
5
5
<item name =" colorPrimary" >@color/purple_500</item >
6
6
<item name =" colorPrimaryVariant" >@color/purple_700</item >
Original file line number Diff line number Diff line change 1
- package com.gun.android_marvel_example
1
+ package com.gun.presentation
2
2
3
3
import org.junit.Test
4
4
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ dependencyResolutionManagement {
13
13
}
14
14
}
15
15
16
- rootProject.name = " Android_Marvel_Example "
16
+ rootProject.name = " Android_MVVM_CleanArchitecture "
17
17
18
18
include(
19
19
" :presentation" ,
You can’t perform that action at this time.
0 commit comments