Android Open Source - WifiProxySetting Main Activity






From Project

Back to project page WifiProxySetting.

License

The source code is released under:

MIT License

If you think the Android project WifiProxySetting 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.kyokomi.wifiproxysetting.ui.activity;
/*from  w  ww .j a v a 2  s .  com*/
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import com.kyokomi.wifiproxysetting.DemoApplication;
import com.kyokomi.wifiproxysetting.ui.fragment.PlaceholderFragment;
import com.kyokomi.wifiproxysetting.R;

import javax.inject.Inject;

public class MainActivity extends DemoActivity {

    @Inject
    SharedPreferences sharedPreferences;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ((DemoApplication) getApplication()).component().inject(this);

        setContentView(R.layout.activity_main);
        if (savedInstanceState == null) {
            getFragmentManager().beginTransaction()
                    .add(R.id.container, new PlaceholderFragment())
                    .commit();
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}




Java Source Code List

com.kyokomi.wifiproxysetting.AndroidModule.java
com.kyokomi.wifiproxysetting.ApplicationTest.java
com.kyokomi.wifiproxysetting.DemoApplication.java
com.kyokomi.wifiproxysetting.ForApplication.java
com.kyokomi.wifiproxysetting.ui.activity.DemoActivity.java
com.kyokomi.wifiproxysetting.ui.activity.MainActivity.java
com.kyokomi.wifiproxysetting.ui.fragment.DemoFragment.java
com.kyokomi.wifiproxysetting.ui.fragment.PlaceholderFragment.java