package com.jenzz.buildconstants.sample;

import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

}

@@ -54,96 +54,767 @@
 oid.
-support.v7.app.AppCompatActivity;%0A%0Apublic class MainActivity extends AppCompatActivity %7B%0A
+content.res.Resources;%0Aimport android.os.Bundle;%0Aimport android.support.annotation.Nullable;%0Aimport android.support.v7.app.AppCompatActivity;%0A%0Apublic class MainActivity extends AppCompatActivity %7B%0A%0A  @SuppressWarnings(%22unused%22)%0A  @Override%0A  protected void onCreate(@Nullable Bundle savedInstanceState) %7B%0A    super.onCreate(savedInstanceState);%0A%0A    // Java constants%0A    String javaString = SampleBuildConstants.ASTRING;%0A    boolean javaBoolean = SampleBuildConstants.ABOOLEAN;%0A    int javaNumber = SampleBuildConstants.ANUMBER;%0A%0A    // XML constants%0A    Resources res = getResources();%0A    String xmlString = res.getString(R.string.astring);%0A    boolean xmlBoolean = res.getBoolean(R.bool.aboolean);%0A    int xmlNumber = res.getInteger(R.integer.anumber);%0A  %7D
 %0A%7D%0A

Use generated constants in sample project