Advertisement
Guest User

Untitled

a guest
Apr 11th, 2017
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. import android.content.Intent;
  2. import android.content.SharedPreferences;
  3. import android.support.v7.app.AppCompatActivity;
  4. import android.os.Bundle;
  5. import android.view.View;
  6. import android.widget.AdapterView;
  7. import android.widget.ArrayAdapter;
  8. import android.widget.ListView;
  9. import android.widget.RelativeLayout;
  10.  
  11. import java.io.BufferedReader;
  12. import java.io.File;
  13. import java.io.FileInputStream;
  14. import java.io.FileNotFoundException;
  15. import java.io.IOException;
  16. import java.io.InputStreamReader;
  17. import java.util.ArrayList;
  18.  
  19. public class Lista1 extends AppCompatActivity implements AdapterView.OnItemClickListener {
  20.  
  21. ListView lista;
  22. RelativeLayout screen;
  23.  
  24. String[] temp;
  25. String[] tabload;
  26. ArrayList<String> list;
  27.  
  28. @Override
  29. protected void onCreate(Bundle savedInstanceState) {
  30. super.onCreate(savedInstanceState);
  31. setContentView(R.layout.activity_lista1);
  32. screen = (RelativeLayout) findViewById(R.id.lista1);
  33.  
  34. }
  35.  
  36. public void loadData() {
  37.  
  38. }
  39.  
  40.  
  41. public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
  42.  
  43. }
  44.  
  45. protected void onResume() {
  46. super.onResume();
  47. SharedPreferences odbierz = getSharedPreferences("MyPreferences", MODE_PRIVATE);
  48. int color = odbierz.getInt("Background", -1);
  49. screen.setBackgroundColor(color);
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement