skip to Main Content

Android Studio – How to get parameter values in string.xml from MainActivity?

This is my MainActivity.java. public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String myString = "Mary"; int myInt = 12; String formatted = getString(R.string.my_xml_string, myString, myInt); } } string.xml <resources> <string name="app_name">My First App</string>…

VIEW QUESTION

Android Studio – Retrofit response.body is empty if minified is enabled

I am trying to create a release version of my app using below configuration. buildTypes { release { debuggable false minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { debuggable true minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' }…

VIEW QUESTION
Back To Top
Search