Skip to content

Commit f1e8884

Browse files
Merge pull request #30 from TechnourceDeveloper/dev_BaseStructure
Add README file, change bottom navigationbar item names and screenshots
2 parents 5a7a67a + 5e095fa commit f1e8884

30 files changed

+200
-62
lines changed

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Hagop Jamkojian
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.

README.md

Lines changed: 151 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,151 @@
1-
# android_kotlin_boilerplate
1+
# Welcome to Android Kotlin Boilerplate!
2+
3+
This repository provides a boilerplate codebase for developing Android applications using Kotlin. It aims to provide a starting point with preconfigured project structure, common libraries, and best practices to kickstart your Android development process.
4+
5+
## Table of Contents
6+
* [Getting Started](#getting-started)
7+
* [Softwares and Version Install Android](#software-and-version-install-android)
8+
* [Features](#features)
9+
* [Clone Project](#clone-project)
10+
* [Folder Structure](#folder-structure)
11+
* [Build variants](#build-variants)
12+
* [Dependencies](#dependencies)
13+
* [Test Dependencies](#test-dependencies)
14+
* [LICENSE](#license)
15+
16+
17+
## Getting Started
18+
19+
This project is a starting point for a Android application.
20+
21+
A few resources to get you started if this is your first Android project:
22+
23+
- [Android Developer Documentation](https://developer.android.com/docs)
24+
- [Kotlin Documentation](https://kotlinlang.org/docs/home.html)
25+
26+
For help getting started with Android development, refer to the [official Android documentation](https://developer.android.com/), which provides tutorials, samples, guidance on mobile development, and a comprehensive API reference.
27+
- An Android app with MVVM architectural pattern.
28+
- _ViewBinding_ for activities and fragments.
29+
- Android Studio _EditorConfig_ file to maintain consistent coding styles.
30+
31+
# Softwares and Version Install Android:
32+
33+
https://docs.flutter.dev/get-started/install
34+
Install Android Studio : Android Studio Dolphin | 2021.3.1 Patch 1
35+
36+
- Android supported version:
37+
- compileSdk 33
38+
- minSdk 21
39+
- targetSdk 33
40+
- versionCode 1
41+
- versionName "1.0"
42+
- jvmTarget '1.8'
43+
44+
45+
## Features
46+
* [Authentication](#authentication)
47+
* [Dashboard](#dashboard)
48+
49+
# Clone Project :
50+
51+
git clone https://github.com/TechnourceDeveloper/android_kotlin_boilerplate
52+
After cloning the project, you can open it in Android Studio by following these steps:
53+
1. Open Android Studio.
54+
2. Select "Open an existing Android Studio project" from the welcome screen.
55+
3. Navigate to the directory where you cloned the project and select the project folder.
56+
4. Click "OK" to open the project in Android Studio.
57+
5. Android Studio will take some time to index and set up the project.
58+
6. Once the indexing is complete, you can start working on the Android project in Android Studio.
59+
60+
# Folder Structure:
61+
```commandline
62+
.
63+
├── app - Folder which contains example application
64+
│ ├── src
65+
│ └── main
66+
│ ├── manifests
67+
│ └── java
68+
│ ├── com.technource.android
69+
│ ├── base
70+
│ ├── commonInterface
71+
│ ├── preference
72+
│ ├── ui
73+
│ ├── utils
74+
│ ├── assets
75+
│ ├── res
76+
│ ├── anim
77+
│ ├── color
78+
│ ├── drawable
79+
│ ├── font
80+
│ ├── layout
81+
│ ├── menu
82+
│ ├── mipmap
83+
│ ├── values
84+
│ ├── colors
85+
│ ├── dimens
86+
│ ├── strings
87+
| ├── xml
88+
├── build.gradle
89+
├── gradle - Folder for gradle build tool
90+
├── gradle.properties - File for gradle configuration
91+
├── gradlew
92+
├── gradlew.bat
93+
├── project.properties
94+
├── README.md
95+
└── settings.gradle - File for graddle setting
96+
```
97+
## Build variants
98+
99+
Herein you can find multiple targets that the app takes into account:
100+
Where the following formed variants are built for staging purposes:
101+
102+
- stagingInternalDebug
103+
- stagingInternalRelease
104+
105+
And these ones for production purposes:
106+
107+
- productionInternalDebug
108+
- productionInternalRelease
109+
- productionExternalDebug
110+
- productionExternalRelease
111+
112+
## Dependencies
113+
- App Localization
114+
implementation 'dev.b3nedikt.applocale:applocale:3.0.0'
115+
implementation 'dev.b3nedikt.reword:reword:4.0.2'
116+
- PinView
117+
implementation 'io.github.chaosleung:pinview:1.4.4'
118+
- Glide
119+
implementation 'com.github.bumptech.glide:glide:4.14.2'
120+
kapt 'com.github.bumptech.glide:compiler:4.14.2'
121+
- Image picker
122+
implementation 'com.github.dhaval2404:imagepicker:2.1'
123+
124+
## Test Dependencies
125+
126+
- [JUnit](https://github.com/junit-team/junit4) - a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
127+
- [AndroidX](https://github.com/android/android-test) - the androidx test library provides an extensive framework for testing Android apps.
128+
129+
## Authentication
130+
- Registration Screen
131+
- Login Screen
132+
- Forgot-password Screen
133+
- OTP Verification Screen
134+
- Reset Password Screen
135+
- Edit Profile Screen
136+
- Upload Photo from Camera & Gallery
137+
## Application Language
138+
- English
139+
- French
140+
- Russian
141+
## Dashboard
142+
- Dashboard UI with Bottom TabNavigation
143+
- AboutUs Screen
144+
- Terms-Conditions Screen
145+
- Privacy-Policy Screen
146+
- Change Language Screen
147+
- Logout Screen
148+
149+
## License
150+
151+
- This project is licensed under the [MIT License](LICENSE)

app/src/main/java/com/technource/android/ui/settingsModule/SettingsFragment.kt

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,20 @@ class SettingsFragment(private val mActivity: AppCompatActivity) :
4444
drawerAdapter.setOnItemClick(object : RecyclerviewInterface {
4545
override fun onItemClick(position: Int) {
4646
when (position) {
47-
0 -> {}
48-
1 -> {}
49-
2 -> {}
50-
3 -> {}
51-
4 -> {
47+
0 -> {
5248
// Start the ChangeLanguageActivity when "Change Language" is selected
5349
isChangeLanguageSelected = true
5450
startActivity(Intent(mActivity, ChangeLanguageActivity::class.java))
5551
mActivity.overridePendingTransition(R.anim.slide_in_up, R.anim.nothing_ani)
5652
}
57-
5 -> {
53+
1 -> {
5854
// Open the GitHub repository in a browser when "Git Repo" is selected
5955
val uri: Uri =
6056
Uri.parse(Constants.GIT_REPO_LINK) // missing 'http://' will cause crashed
61-
6257
val intent = Intent(Intent.ACTION_VIEW, uri)
6358
startActivity(intent)
6459
}
65-
6 -> {
60+
2 -> {
6661
// Start the MoreActivity when "More" is selected
6762
startActivity(Intent(mActivity, AboutActivity::class.java))
6863
mActivity.overridePendingTransition(R.anim.slide_in_up, R.anim.nothing_ani)
@@ -126,34 +121,6 @@ class SettingsFragment(private val mActivity: AppCompatActivity) :
126121
*/
127122
private fun addDataInMenu() {
128123
drawerItemList.clear()
129-
drawerItemList.add(
130-
DrawerMenu(
131-
resources.getString(R.string.bottom_menu_1),
132-
"",
133-
R.drawable.ic_bullet
134-
)
135-
)
136-
drawerItemList.add(
137-
DrawerMenu(
138-
resources.getString(R.string.bottom_menu_2),
139-
"",
140-
R.drawable.ic_bullet
141-
)
142-
)
143-
drawerItemList.add(
144-
DrawerMenu(
145-
resources.getString(R.string.bottom_menu_3),
146-
"",
147-
R.drawable.ic_bullet
148-
)
149-
)
150-
drawerItemList.add(
151-
DrawerMenu(
152-
resources.getString(R.string.bottom_menu_4),
153-
"",
154-
R.drawable.ic_bullet
155-
)
156-
)
157124
drawerItemList.add(
158125
DrawerMenu(
159126
resources.getString(R.string.change_language),

app/src/main/res/layout/drawer_menu_item_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
android:layout_height="wrap_content"
2727
android:layout_marginStart="@dimen/dp_10"
2828
android:layout_weight="90"
29-
android:text="@string/bottom_menu_1" />
29+
android:text="@string/home" />
3030

3131
<androidx.appcompat.widget.AppCompatTextView
3232
android:id="@+id/itemDesc"

app/src/main/res/layout/fragment_home.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@
9191
android:layout_height="wrap_content"
9292
android:layout_gravity="center"
9393
android:gravity="center"
94-
android:text="@string/bottom_menu_1" />
94+
android:text="@string/home" />
9595

9696
</FrameLayout>

app/src/main/res/layout/fragment_notification.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
android:layout_width="match_parent"
1010
android:layout_height="match_parent"
1111
android:gravity="center"
12-
android:text="@string/bottom_menu_3" />
12+
android:text="@string/notification" />
1313

1414
</FrameLayout>

app/src/main/res/layout/fragment_order.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
android:layout_width="match_parent"
1010
android:layout_height="match_parent"
1111
android:gravity="center"
12-
android:text="@string/bottom_menu_2" />
12+
android:text="@string/order" />
1313

1414
</FrameLayout>

app/src/main/res/layout/fragment_settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
android:layout_width="match_parent"
1717
android:layout_height="match_parent"
1818
android:gravity="center"
19-
android:text="@string/bottom_menu_4" />
19+
android:text="@string/settings" />
2020
</LinearLayout>
2121

2222
<RelativeLayout

app/src/main/res/menu/nav_menu.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
<item
55
android:id="@+id/home"
66
android:icon="@drawable/home_item_selection"
7-
android:title="@string/bottom_menu_1" />
7+
android:title="@string/home" />
88

99
<item
1010
android:id="@+id/order"
1111
android:icon="@drawable/order_itme_selection"
12-
android:title="@string/bottom_menu_2" />
12+
android:title="@string/order" />
1313
<item
1414
android:id="@+id/notification"
1515
android:icon="@drawable/notification_item_selection"
16-
android:title="@string/bottom_menu_3" />
16+
android:title="@string/notification" />
1717
<item
1818
android:id="@+id/setting"
1919
android:icon="@drawable/setting_item_selection"
20-
android:title="@string/bottom_menu_4" />
20+
android:title="@string/settings" />
2121
</menu>

app/src/main/res/values-en/strings.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@
7474
<string name="set_new_password">Set New Password</string>
7575
<string name="set_new_password_message">Here you can add your new password</string>
7676
<string name="reset_password">Reset Password</string>
77-
<string name="bottom_menu_1">Bottom Menu 1</string>
78-
<string name="bottom_menu_2">Bottom Menu 2</string>
79-
<string name="bottom_menu_3">Bottom Menu 3</string>
80-
<string name="bottom_menu_4">Bottom Menu 4</string>
77+
<string name="home">Home</string>
78+
<string name="order">Order</string>
79+
<string name="notification">Notification</string>
80+
<string name="settings">Settings</string>
8181
<string name="search_here">Search Here</string>
8282
<string name="git_repo">Github Repo</string>
8383
<string name="more">More</string>

0 commit comments

Comments
 (0)