Code example for Properties

Methods: get, load

0
    private void initializeBloggerKey() throws IOException { 
        Resources resources = this.getResources();
        AssetManager assetManager = resources.getAssets();
 
        InputStream inputStream = assetManager.open("config.properties");
        Properties properties = new Properties();
        properties.load(inputStream);
 
        BLOGGER_API_KEY = (String) properties.get(BLOGGER_API_KEY_PROPERTY);
    } 
 
    private void initializeTabs() { 
        BlogPost mediumBlogPost = new BlogPost(R.layout.config_layout, R.id.configTable, INTEL_TABLE, MEDIUM_CONFIG_POST_ID);
        BlogPost highBlogPost = new BlogPost(R.layout.config_layout, R.id.configTable, INTEL_TABLE, HIGH_CONFIG_POST_ID);
        BlogPost ultraBlogPost = new BlogPost(R.layout.config_layout, R.id.configTable, CONFIG_TABLE, ULTRA_CONFIG_POST_ID);
        blogPosts.add(mediumBlogPost);
        blogPosts.add(highBlogPost);
        blogPosts.add(ultraBlogPost);
 
        TabHost.TabSpec mediumConfigTab = initializeTab("Medium (35k)", ConfigActivity.class, mediumBlogPost);
        TabHost.TabSpec highConfigTab = initializeTab("HighEnd (60k)", ConfigActivity.class, highBlogPost);