`<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- App name -->
<string name="app_name">Form</string>
<!--Email subject -->
<string name="vehicle_finance_application_for">Vehicle finance application for :<xliff:g example="Amy" id="surname">%s</xliff:g></string>
<!-- Form header -->
<string name="vehicle_finance_application">Vehicle finance application</string>
<!--Mxo cars application form order -->
<!-- Personal information-->
<string name="surname">Surname :<xliff:g example="Peterson" id="surname">%s</xliff:g></string>
<string name="name">Full names :<xliff:g example="John" id="name">%s</xliff:g></string>
<string name="id_number">Id number :<xliff:g example="560708080" id="id number">%s</xliff:g> </string>
<string name="cell_number">Cell number :<xliff:g example="0123513460" id="cell number">%s</xliff:g> </string>
<string name="email">Email :<xliff:g example="kevin@gmail.com" id="email">%s</xliff:g></string>
<string name="land_line">landline :<xliff:g example="0127395679" id="landline">%s</xliff:g></string>
<string-array name="marital_status_array">
<item>Not Selected</item>
<item>Yes I am married</item>
<item>No I am not married</item>
<item>Divorced</item>
<item>Widowed</item>
</string-array>
<string-array name="graduate_status_array">
<item>Not Selected</item>
<item>Yes I am graduate</item>
<item>No I am not a graduate</item>
</string-array>
<string name="home_address">Home address : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="postal_code">Postal code : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="how_many_years_have_you_been_living_there">How many years have you been living there :<xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="postal_address">Postal address :<xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string-array name="homeowner_status_array">
<item>Not Selected</item>
<item>Yes I am a home owner</item>
<item>No I don\'t own property</item>
</string-array>
<!--Employment information-->
<string name="employers_name">Employers name : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="employers_contact">Employers contact number : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="employers_address">Employers address : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="number_of_years_employed">Number of years employed : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="occupation">Occupation : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="industry">Industry : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<!--Bank details-->
<string name="bank">Bank : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="bank_account_number">Bank account number : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="bank_branch">Bank branch code : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<!--Spouse Information-->
<string name="spouse_name">Spouse name : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="spouse_surname">Spouse surname : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="spouse_id_number">Spouse id number : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="spouse_contact_number">Spouse contact number : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<!--Relative not residing with you-->
<string name="relationship_of_relative">What is the relationship : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="full_names_of_relative">Full names of relative : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="surname_of_relative">Surname of relative : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="phone_number_of_relative">Phone number of relative : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="address_of_relative">Address of relative : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<!--Financial information-->
<string name="gross">Gross : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="net_income">Net income : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="do_you_have_additional_income">Do you have additional income : <xliff:g example="0127395679" id="landline">%s</xliff:g></string>
<string name="source_of_additional_income">Source of additional income : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="clothing_account">Clothing account : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<!--Expenses-->
<string name="personal_loan">Personal loan : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="insurance">Insurance : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="bond_or_renting">Bond or renting payment : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="municipality">Municipality : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="credit_card">Credit card : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="overdraft">Overdraft : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="phone_account">Phone account : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="transport">Transport cost : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="food_or_entertainment">Food or entertainment : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="education_fees">Education fees : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="maintenance">Maintenance : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<string name="household_expenses">Household expenses : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g></string>
<string name="other_expenses">Other expenses : <xliff:g example="Po box 1202 shirley street" id="address">%s</xliff:g> </string>
<!--Send button-->
<string name="send">Send</string>
<!--Parameter strings for spinner questions in vehicle application form-->
<string name="are_you_married">Married : <xliff:g example="0127395679" id="landline">%s</xliff:g></string>
<string name="are_you_a_graduate">Graduate : <xliff:g example="0127395679" id="landline">%s</xliff:g></string>
<string name="are_you_a_home_owner">Home owner : <xliff:g example="0127395679" id="landline">%s</xliff:g></string>
<!-- Spinner header text questions -->
<string name="please_tell_us_if_you_married">Please tell us if you married?</string>
<string name="please_tell_us_if_you_a_graduate">Please tell us if you a graduate ?</string>
<string name="do_you_own_property">Do you own property ?</string>
<!--Header for sections of the vehicle application -->
<string name="personal_information">Personal information</string>
<string name="employer_information">Employer Information</string>
<string name="spouse_information">Spouse information</string>
<string name="relative_information">Relative information</string>
<string name="how_are_you_related">How are you related</string>
<string name="personal_expenses">Personal Expenses</string>
<string name="financial_information">Financial information</string>
<string name="bank_details">Bank details</string>
</resources>`
I'm having a problem with format specifiers being visible in the edit text. I have tried to read the Android documentation about formatting strings and I failed to understand how it all works.
I've included format character %s
in my string.xml
file and its does not help with format specifiers being visible in the edit text autonomously concatenating with the hint of the edit text view.
You can not hide it from user. You can set empty string from your code to make it go away. Like this
if(surname == "" ||surname == null){
yourEditText.setText(getString(R.string.surname,""))
}