-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from emreesen27/develop
v1.0.0-beta2 is completed
- Loading branch information
Showing
40 changed files
with
713 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ | |
.cxx | ||
local.properties | ||
app/release/ | ||
app/google-services.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## v1.0.0-beta2 (14.02.2024) | ||
|
||
* Start screen is completed | ||
* About screen added | ||
* Minor ui fix | ||
|
||
## v1.0.0-beta1 (12.02.2024) | ||
|
||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/build | ||
/build | ||
google-services.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../java/com/sn/snfilemanager/core/Config.kt → .../com/sn/snfilemanager/core/util/Config.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/sn/snfilemanager/core/util/Constant.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.sn.snfilemanager.core.util | ||
|
||
object Constant { | ||
const val GITHUB_URL = | ||
"https://github.com/emreesen27/Android-Sn-File-Manager" | ||
const val PRIVACY_URL = | ||
"https://github.com/emreesen27/Android-Sn-File-Manager/blob/develop/PRIVACY.md" | ||
const val OPEN_SOURCE_LICENSE = | ||
"https://github.com/emreesen27/Android-Sn-File-Manager/blob/develop/LICENSE" | ||
} |
40 changes: 40 additions & 0 deletions
40
app/src/main/java/com/sn/snfilemanager/feature/about/AboutFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.sn.snfilemanager.feature.about | ||
|
||
import android.content.Intent | ||
import android.net.Uri | ||
import androidx.navigation.fragment.findNavController | ||
import com.sn.snfilemanager.core.base.BaseFragment | ||
import com.sn.snfilemanager.core.extensions.click | ||
import com.sn.snfilemanager.core.extensions.startActivitySafely | ||
import com.sn.snfilemanager.core.util.Constant.GITHUB_URL | ||
import com.sn.snfilemanager.core.util.Constant.PRIVACY_URL | ||
import com.sn.snfilemanager.databinding.FragmentAboutBinding | ||
import com.sn.snfilemanager.view.dialog.license.LicenseDialog | ||
|
||
class AboutFragment : BaseFragment<FragmentAboutBinding, AboutViewModel>() { | ||
override fun getViewModelClass() = AboutViewModel::class.java | ||
|
||
override fun getViewBinding() = FragmentAboutBinding.inflate(layoutInflater) | ||
|
||
override fun setupViews() { | ||
binding.vm = viewModel | ||
binding.lifecycleOwner = viewLifecycleOwner | ||
initClicks() | ||
} | ||
|
||
private fun initClicks() { | ||
binding.toolbar.setNavigationOnClickListener { findNavController().popBackStack() } | ||
binding.btnGithub.click { openUrl(GITHUB_URL) } | ||
binding.btnLicense.click { showLicensesDialog() } | ||
binding.btnPrivacy.click { openUrl(PRIVACY_URL) } | ||
} | ||
|
||
private fun showLicensesDialog() { | ||
LicenseDialog().show(childFragmentManager, LicenseDialog.TAG) | ||
} | ||
|
||
private fun openUrl(url: String) { | ||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) | ||
context?.startActivitySafely(intent) | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/sn/snfilemanager/feature/about/AboutViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.sn.snfilemanager.feature.about | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import androidx.lifecycle.ViewModel | ||
import com.sn.snfilemanager.BuildConfig | ||
|
||
class AboutViewModel : ViewModel() { | ||
private val _versionLiveData: MutableLiveData<String> = MutableLiveData() | ||
val versionLiveData: LiveData<String> = _versionLiveData | ||
|
||
init { | ||
getVersion() | ||
} | ||
|
||
private fun getVersion() { | ||
_versionLiveData.value = BuildConfig.VERSION_NAME | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
app/src/main/java/com/sn/snfilemanager/feature/settings/SettingsToolbar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.sn.snfilemanager.feature.settings | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import androidx.navigation.findNavController | ||
import androidx.preference.Preference | ||
import androidx.preference.PreferenceViewHolder | ||
import com.google.android.material.appbar.MaterialToolbar | ||
import com.sn.snfilemanager.R | ||
|
||
class SettingsToolbar | ||
@JvmOverloads | ||
constructor( | ||
context: Context, | ||
attrs: AttributeSet? = null, | ||
defStyleAttr: Int = 0, | ||
) : Preference(context, attrs, defStyleAttr) { | ||
override fun onBindViewHolder(holder: PreferenceViewHolder) { | ||
super.onBindViewHolder(holder) | ||
|
||
val toolbar = holder.findViewById(R.id.toolbar_settings) as MaterialToolbar | ||
toolbar.setNavigationOnClickListener { | ||
toolbar.findNavController().popBackStack() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/sn/snfilemanager/view/dialog/license/License.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.sn.snfilemanager.view.dialog.license | ||
|
||
data class License( | ||
val name: String, | ||
val url: String, | ||
val license: String, | ||
) |
Oops, something went wrong.