Ingen beskrivning

liweihao 903bbc19a4 Fix: module card design style 6 år sedan
src 903bbc19a4 Fix: module card design style 6 år sedan
.gitignore cf3dda6144 New : color setting method to zendesk login notify dialog 7 år sedan
build.gradle b51d42e546 Temp : add lamda for non-update bulid tool version 26 app 7 år sedan
proguard-rules.pro bbb1eaf94e New : create kdan others library for android 7 år sedan
readme.md 383a340189 Update : Update readme file 7 år sedan

readme.md

#Kdan Utilities

Features

###2017/07/19

  1. SimpleWebActivity ###2017/04/10
  2. Zendesk login notify dialog

Setup

1. Clone the submodule

$ cd [YOUR PROJECT]
$ git submodule add ssh://git@git.kdan.cc:Shan/kdan_others_library_for_android.git

2. Include the module as a library

a. Declear KdanUtilites module: #####At [YOUR PROJECT]/settings.gradle:

include ':app', ... ,':kdan_others_library_for_android'

b. Include the module the as a library: #####At [YOUR PROJECT]/app/build.gradle:

dependencies {
   compile project(path: ':kdan_others_library_for_android')
}

Usage

Create ZendeskNotifyDialog

ZendeskLoginNotifyDialog dialog = 
new ZendeskLoginNotifyDialog(this,
 new ZendeskLoginNotifyDialog.ZendeskLoginNotifyDialogInterface() {

    @Override
    public void onSignInClick() {}

    @Override
    public void onGuestVisitClick() {}

 }).show();

Style ZendeskNotifyDialog

you need style dialog before call show() method.

Style content text color

dialog.setContentColor(Color.BLACK);
dialog.setContentColorRes(R.color.colorSecondaryTextDark);

####Style dialog background color

dialog.setBackgroundColor(Color.WHITE);
dialog.setBackgroundColorRes(R.color.primaryLight);

####Style button text color

dialog.setButtonColor(Color.BLACK);
dialog.setButtonColorRes(R.color.colorAccentCloud);

###SimpleWebActivity Put this into you app's manifest, you can change some settings.

<activity
    android:name="com.kdanmobile.kdan_others_library_for_android.view.SimpleWebViewActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
    android:launchMode="singleTask"
    android:screenOrientation="sensorLandscape"
    android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen" />

Call this then it will works.

String url = "https://www.google.com";
SimpleWebViewActivity.launch(this, url);