-
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.
* Updated wallet texts displaying * Added certificate type to claim certificate page * Implemented manufacturer check up * Updated * Update * Update * Update * Update * Update * Update
- Loading branch information
1 parent
b8d23c5
commit fbb2ffc
Showing
21 changed files
with
505 additions
and
259 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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
56 changes: 56 additions & 0 deletions
56
app/src/main/java/dgca/wallet/app/android/certificate/claim/ViewHolderUtils.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,56 @@ | ||
/* | ||
* ---license-start | ||
* eu-digital-green-certificates / dgca-wallet-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 osarapulov on 7/22/21 8:42 PM | ||
*/ | ||
|
||
package dgca.wallet.app.android.certificate.claim | ||
|
||
import android.view.View | ||
import android.widget.TextView | ||
import java.util.* | ||
|
||
|
||
fun String.bindCountryWith(countryTitleView: View, countryValueView: TextView) { | ||
val issuerCountry = | ||
if (this.isNotBlank()) Locale("", this).displayCountry else "" | ||
issuerCountry.apply { | ||
if (this.isNotBlank()) { | ||
countryValueView.text = this | ||
View.VISIBLE | ||
} else { | ||
View.GONE | ||
}.apply { | ||
countryTitleView.visibility = this | ||
countryValueView.visibility = this | ||
} | ||
} | ||
} | ||
|
||
fun String.bindText(titleView: View, valueView: TextView) = apply { | ||
if (this.isNotBlank()) { | ||
valueView.text = this | ||
View.VISIBLE | ||
} else { | ||
View.GONE | ||
}.apply { | ||
titleView.visibility = this | ||
valueView.visibility = this | ||
} | ||
} |
Oops, something went wrong.