GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - alimogh/QuickAndroid: Generates Java source for activity declarations in the XML layout.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

28 Commits
28 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
ActivityReader.java
ActivityReader.java
 
 
CreateClass.java
CreateClass.java
 
 
KnownViews.java
KnownViews.java
 
 
LocalException.java
LocalException.java
 
 
QuickAndroidMain.java
QuickAndroidMain.java
 
 
README.md
README.md
 
 
Run.bat
Run.bat
 
 
SourceGenerator.java
SourceGenerator.java
 
 
ViewList.txt
ViewList.txt
 
 
ViewType.java
ViewType.java
 
 
quickAndroid_img.jpg
quickAndroid_img.jpg
 
 

Repository files navigation

QuickAndroid - Boost your android development.

alt tag

Generates Java source for activity declarations in the XML layout.

Sample

An Android activity XML would contain following view decelaration:

<EditText
    android:id="@+id/userUnique"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10" 
    android:padding="20sp"
    android:inputType="text" />
    
<Button
    android:id="@+id/loginOk"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/ok"
    android:layout_below="@id/password"
    android:padding="20sp" />

In order to map the layout with the Java source we would be writing following code everytime:

   private EditText userUnique;
  private Button loginOk;	
  
  userUnique = (EditText) findViewById(R.id.userUnique);
  loginOk = (Button) findViewById(R.id.loginOk);
	loginOkListener = new OnClickListener(){
		@Override
		public void onClick(View v) {
			/* Write your code here */ 
		}
	};
	loginOk.setOnClickListener(loginOkListener);

This project aimed to generate the mapping source of xml.

Usage

  1. Unzip the QuickAndroid folder into your android project root folder

  2. Verify the Views in "ViewList.txt" file and add few tags which are required for your project.

  3. Specify eSprinkle tags as below in your xml file inside the comments as below:

    ""

    ""

    ""

    ""

  4. There tags can be anywhere inside the layout file but they should exists.

  5. Run the sources "QuickAndroidMain" by opening "Run" batch file and provide the xml file name.

  6. Your activity class will be generated for the respective xml file

Documentation

eSprinkle-quickAndroid:package => denotes under which package the class should be placed. => exclude this tag for default package

eSprinkle-quickAndroid:class
=> denotes the class name

eSprinkle-quickAndroid:is_new
=> it is mandatory tag and for now it should be set as true, => We are building the next version in which 'false' specifies the class is already created and need to create mappings only for the missing.

eSprinkle-quickAndroid:sync_enabled
=> As soon as you save your changes in xml file, => The mappings will be reflected in java file, (currently not available)

Future

  1. Able to map the view for existing classes.
  2. Realtime sync with layout file.
  3. Would be available as an eclipse plugin

=========== eSprinkle Open Source

About

Generates Java source for activity declarations in the XML layout.

Resources

Readme
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.