nafiefn_10

Untitled

Apr 17th, 2021
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. package nofieanggraeni.blogspot.com.appresource;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4. import androidx.core.content.ContextCompat;
  5. import android.content.Context;
  6. import android.content.res.Resources;
  7. import android.os.Bundle;
  8.  
  9. public class MainActivity extends AppCompatActivity {
  10.  
  11. @Override
  12. protected void onCreate(Bundle savedInstanceState) {
  13. super.onCreate(savedInstanceState);
  14. setContentView(R.layout.activity_main);
  15.  
  16. String submitText = getResources().getString(R.string.submit_label);
  17.  
  18. Resources res = getResources();
  19. float fontSize = res.getDimension(R.dimen.font_size);
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment