-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* - NFC card emulation mode for sharing DCC on View cert page. Host apdu service with NFC Forum type 4 implementation for NDEF message exchange; - NFC reader mode on main certificates page; * - add base binding fragment; - clean up logic; * - claim certificate when received via NFC; * - detect and handle DCC sent event in service; - display toast when dcc sent; * - code refactor; * - remove NFC reader initialization from cert fragment; - remove UI component; - parse message in activity and navigate to claim cert fragment; - send qr code text only via nfc; * - navigate to claim cert view on app start; * - merge main branch; - remove unused images; * - revert changes to claim viewModel; * - update button style;
- Loading branch information
1 parent
dd0219f
commit ea6266c
Showing
39 changed files
with
852 additions
and
83 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
58 changes: 58 additions & 0 deletions
58
app/src/main/java/dgca/wallet/app/android/base/BindingFragment.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,58 @@ | ||
/* | ||
* ---license-start | ||
* eu-digital-green-certificates / dgca-verifier-app-android | ||
* --- | ||
* Copyright (C) 2021 T-Systems International GmbH and all other contributors | ||
* --- | ||
* 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. | ||
* ---license-end | ||
* | ||
* Created by mykhailo.nester on 18/08/2021, 17:21 | ||
*/ | ||
|
||
package dgca.wallet.app.android.base | ||
|
||
import android.os.Bundle | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.fragment.app.Fragment | ||
import androidx.viewbinding.ViewBinding | ||
|
||
abstract class BindingFragment<T : ViewBinding> : Fragment() { | ||
|
||
private var _binding: T? = null | ||
val binding get() = _binding!! | ||
|
||
abstract fun onCreateBinding(inflater: LayoutInflater, container: ViewGroup?): T | ||
|
||
open fun onDestroyBinding(binding: T) { | ||
} | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { | ||
val innerBinding = onCreateBinding(inflater, container) | ||
_binding = innerBinding | ||
return innerBinding.root | ||
} | ||
|
||
override fun onDestroyView() { | ||
val innerBinding = _binding | ||
if (innerBinding != null) { | ||
onDestroyBinding(innerBinding) | ||
} | ||
|
||
_binding = null | ||
|
||
super.onDestroyView() | ||
} | ||
} |
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
Oops, something went wrong.