Skip to content

Wideroid Android Helper Framework; A bunch of helpers and annotations to help you write less and do more, mainly designed to be used in Android development.

License

Notifications You must be signed in to change notification settings

kamcpp/wideroid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wideroid Android Helper Framework

Synopsis

A bunch of helpers and annotations to help you write less and do more, mainly designed to be used in Android development.

Quick Start

ViewReference Annotation

public class MainActivity extends Activity {
  
  @ViewReference
  private TextView textViewHelloWorld;
  
  @ViewReference(viewId = "buttonOK")
  private Button buttonChangeText;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Wideroid.processActivity(this);
    
    buttonChangeText.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View view) {
        textViewHelloWorld.setText("Text Changed!");
      }
    }
  }
}

OnClick Annotation

public class MainActivity extends Activity {
  
  @OnClick(methodName = "changeText")
  @ViewReference(viewId = "buttonChangeText")
  private Button changeTextButton;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    Wideroid.processActivity(this);
  }
  
  public void changeText(View view) {
    textViewHelloWorld.setText("Text Changed!");
  }
  
  @OnClick(viewId = "buttonMakeToastMessage")
  public void makeToastMessage(View view) {
    Toast.makeText(this, "Hello World from Toast ...", Toast.LENGTH_LONG).show();
  }
}

Contributors

  1. Kamran Amini

License

Wideroid is free, open source and redistributable under Apache License Version 2.0.

About

Wideroid Android Helper Framework; A bunch of helpers and annotations to help you write less and do more, mainly designed to be used in Android development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages