Tree [6aebba] jb-x86 kitkat-x86 lollipop-x86 marshmallow-x86 nougat-x86 android-x86-4.4-r1 android-x86-4.4-r2 android-x86-4.4-r3 android-x86-6.0-r1 android-x86-6.0-r2 /
 History

HTTPS access


File Date Author Commit
 Widgets 2013-05-30 Koushik Dutta Koushik Dutta [6aebba] gitignore
 WidgetsSample 2013-05-16 Koushik Dutta Koushik Dutta [ef6a7d] android studio
 .gitignore 2013-02-23 Koushik Dutta Koushik Dutta [bc8fd2] remove gen
 LICENSE 2013-03-01 Koushik Dutta Koushik Dutta [43e4c8] LICENSE
 README.md 2013-01-13 Koushik Dutta Koushik Dutta [ecef1c] Update README.md
 dark.png 2013-01-13 Koushik Dutta Koushik Dutta [9bb5b4] resize
 light.png 2013-01-13 Koushik Dutta Koushik Dutta [9bb5b4] resize

Read Me

To do this:


Write this:

public class MainActivity extends ActivityBase {
    @Override
    public void onCreate(Bundle savedInstanceState, View view) {
        super.onCreate(savedInstanceState, view);

        addItem("Theme", new ListItem(getFragment(), "Dark Theme", null, R.drawable.ic_launcher) {
            @Override
            public void onClick(View view) {
                super.onClick(view);
                startActivity(new Intent(MainActivity.this, MainActivityDark.class));
            }
        });

        addItem(R.string.cloud, new ListItem(getFragment(), R.string.googledrive, R.string.googledrive_summary, R.drawable.drive) {
            @Override
            public void onClick(View view) {
                super.onClick(view);
                Toast.makeText(MainActivity.this, "You clicked Google Drive!", Toast.LENGTH_SHORT).show();
            }
        });
        addItem(R.string.cloud, new ListItem(getFragment(), R.string.dropbox, 0, R.drawable.dropbox));
        addItem(R.string.cloud, new ListItem(getFragment(), R.string.box, 0, R.drawable.box));

        addItem(R.string.devices, new ListItem(getFragment(), "Nexus S", null, R.drawable.nexusone)).setCheckboxVisible(true).setChecked(true);
        addItem(R.string.devices, new ListItem(getFragment(), "Nexus One", null, R.drawable.nexusone)).setCheckboxVisible(true);
        addItem(R.string.devices, new ListItem(getFragment(), "Nexus 4", null, R.drawable.nexusone)).setCheckboxVisible(true);
        addItem(R.string.devices, new ListItem(getFragment(), "Nexus 7", null, R.drawable.nexusone)).setCheckboxVisible(true).setChecked(true);;
        addItem(R.string.devices, new ListItem(getFragment(), "Nexus 10", null, R.drawable.nexusone)).setCheckboxVisible(true);
    }
}

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks