14
SHORTIFY FOR ANDROID BY: DHRUV PATEL

Shortify for Android

Embed Size (px)

Citation preview

Page 1: Shortify for Android

SHORTIFY FOR ANDROID

BY: DHRUV PATEL

Page 2: Shortify for Android

TRADITIONAL ANDROID FUNCTIONS• Complex coding

• Needs more time to implement

• APK size will be large due to huge amounts of code

Page 3: Shortify for Android

SHORTIFY - FEATURES• Library for minimizing your coding work

• Has built in methods and classes which help developers to build an app quickly

• Has all of the features which are used most

1. Binding of Views

2. Binding of Resources

3. Customization of View

4. Event handlers

5. Dialogs

6. Other methods

Page 4: Shortify for Android

DIFFERENCE – BINDING OF VIEWS// Basic

EditText editText = (EditText) context.findViewById(R.id.editText1);

com.example.view.CustomView customView = (com.example.view.CustomView) context.findViewById(R.id.view);

// Shortify

EditText editText = $.bind(R.id.editText1);

com.example.view.CustomView customView = $.bind(R.id.view);

Page 5: Shortify for Android

DIFFERENCE – BINDING OF RESOURCES// Basic

String str = getApplicationContext().getString(R.string.app_name);

Drawable drawable = getApplicationContext().getDrawable(R.drawable.example);

Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.animation1);

// Shortify

String str = $.bindStr(R.string.app_name);

Drawable drawable = $.bindDrawable(R.drawable.example);Animation animation = $.bindAnim(R.anim.animation1);

Page 6: Shortify for Android

DIFFERENCE – CUSTOMIZATION OF VIEWS//Basic

TextView textView = (TextView) findViewById(R.id.textView);

textView.setText(getApplicationContext().getString(R.string.app_name));

textView.setTextColor(Color.BLUE);

textView.setTextSize(16f);

textView.setAllCaps(true);

Linkify.addLinks(textView, Linkify.ALL);

//Shortify$.id(R.id.textView).text(R.string.app_name)

.color(Color.BLUE)

.size(16)

.allcapital()

.linkify();

Page 7: Shortify for Android

DIFFERENCE – EVENT HANDLERS //Basic

Button button = (Button) findViewById(R.id.button);

button.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {

}

});

//Shortify

$.id(R.id.button).click(new Task() {

@Override

public void perform() {

}});

Page 8: Shortify for Android

DIFFERENCE - DIALOGS//Simple alert dialog box

$.alertDialog("Title","Description");

//Generates and shows dialog with OK button with onClick event handlers

$.confirmDialog("Title", "Description", new Click() {

@Override

public void ok() {

}});

Page 9: Shortify for Android

DIFFERENCE - DIALOGS

//Generates and shows dialog with YES and NO button with onClick event handlers

$.yesNoDialog("Title", "Description", new Agree() {

@Override

public void yes() {

}

@Override

public void no() {

}});

Page 10: Shortify for Android

DIFFERENCE – OTHER METHODS//Check, if app is installed or not in device

$.checkIfAppInstalled(PKG_NAME);

//Open current or any other app page in Play store app

$.openAppInStore();

$.openAppInStore(PKG_NAME);

//Showing toast$.toast(MESSAGE);

Page 11: Shortify for Android

DIFFERENCE – OTHER METHODS//Get current date and time in any format

$.time("d m y");

//Check app permission (used for Runntime Permission Model)

$.checkPermission(PERMISSION_STRING);

//Navigate to any activity with or without passing data

$.open(Activity.class);$.open(Activity.class, bundle);

Page 12: Shortify for Android

CURRENTLY IN DEVELOPMENT• $.get(URL);

• $.post(URL, new Bundle());

• $.rateDialog();

• $.html(“<div><h1>Header</h1><a href=‘’>click</a></div>”);

• $.getJSON(URL, new Callback(){});

• $.parseJSON(new JSONObject());

• $.inviteFriends(“Share text”);

• And much more…

Page 13: Shortify for Android

HAVE QUESTIONS?

Page 14: Shortify for Android

THANK YOU