Android Open Source - android-properties Main Activity






From Project

Back to project page android-properties.

License

The source code is released under:

Apache License

If you think the Android project android-properties listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.github.fernandodev.androidproperties.sample;
//from  w  w  w  . j a  va2 s . c o  m
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.widget.TextView;

import com.github.fernandodev.androidproperties.lib.AssetsProperties;


public class MainActivity extends ActionBarActivity {
  Config myConfig;
  AnotherConfig anotherConfig;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    myConfig = new Config(this);
    anotherConfig = new AnotherConfig(this);

    TextView configView = (TextView) findViewById(R.id.values_for_config);
    TextView anotherView = (TextView) findViewById(R.id.values_for_another);
    configView.setText(
        "message : " + myConfig.message + "\n" +
            "max : " + myConfig.max + "\n" +
            "rate_value : " + myConfig.rateValue + "\n" +
            "temperature : " + myConfig.temperature + "\n"
    );

    anotherView.setText(
        "staging_url : " + anotherConfig.stagingUrl + "\n" +
            "production_url : " + anotherConfig.productionUrl + "\n" +
            "token_url : " + anotherConfig.token + "\n" +
            "max_messages_count : " + anotherConfig.maxMessagesCount
    );
  }
}




Java Source Code List

com.github.fernandodev.androidproperties.lib.AssetsPropertiesTest.java
com.github.fernandodev.androidproperties.lib.AssetsProperties.java
com.github.fernandodev.androidproperties.lib.ConfigTest.java
com.github.fernandodev.androidproperties.lib.Config.java
com.github.fernandodev.androidproperties.lib.Property.java
com.github.fernandodev.androidproperties.sample.AnotherConfig.java
com.github.fernandodev.androidproperties.sample.Config.java
com.github.fernandodev.androidproperties.sample.MainActivity.java