Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11897 Reply

    jade

    i have to change seach dialog my own ui style (background, text, color. progress….)
    i think search dialog show in jar file.
    can i change it?

    #11899 Reply

    Dr. Plug
    Moderator

    Hello jade,

    Thank you for your inquiry.
    We will add code to customize search text dialogs until this week.

    I’ll contact you again shortly after the PlugPDF SDK updated.

    Best regards,

    Dr.Plug
    PlugPDF Support

    #11943 Reply

    Dr. Plug
    Moderator

    Hello jade,

    Thank you for your patience. We add a code so that you can customize the dialogs.
    Please download the newest PlugPDF SDK at the https://plugpdf.com/sdkfile/PlugPDF_Android_temp.zip

    The below methods are added in the ReaderView class.

    I hope this will be helpful to you.

    Best regards,
    Dr.Plug

    PlugPDF Support

    #11945 Reply

    jade

    Hello i received new jar file and setSearchFinishAlertBuilder has some Issue.
    I think, setSearchFinishAlertBuilder argument (AlertDialog Or Dialog) is better than setSearchFinishAlertBuilder(AlertDialog.Builder alertBuilder)
    /////////////// My Application Code Start //////////////////
    View findDialogView = mInflater.inflate(R.layout.dlg_layout_search_finish, null);
    AlertDialog.Builder builder = new Builder(mContext)
    .setView(findDialogView);
    final AlertDialog dlg = builder.create();
    findDialogView.findViewById(R.id.btnNeutral).setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
    Log.d(TAG,”button Click”);
    //showing AlertDialog instance and this dlg is defferernt
    //so i can’t dismiss dialog
    dlg.dismiss();
    }
    });
    mReaderView.setSearchFinishAlertBuilder(builder);
    /////////////// My Application Code End //////////////////

    /////////////// RearderView Code Start //////////////////
    Builder ab = ReaderView.this.mSearchFinishAlertBuilder;
    if(ab == null) {
    ab = new Builder(ReaderView.this.getContext());
    ab.setTitle(ReaderView.this.getContext().getString(ResourceManager.getStringId(ReaderView.this.mCtx, “text_search_found_fail”)));
    ab.setPositiveButton(ReaderView.this.getContext().getString(ResourceManager.getStringId(ReaderView.this.mCtx, “text_ok”)), (OnClickListener)null);
    }
    // I can’t get this alert instace , becaouse this is local value
    AlertDialog alert = ab.create();
    alert.show();
    /////////////// RearderView Code Start //////////////////

    And,
    setSearchProgressDialog(ProgressDialog progressDialog) this function occur

    04-12 15:01:38.497: E/AndroidRuntime(8314): FATAL EXCEPTION: main
    04-12 15:01:38.497: E/AndroidRuntime(8314): Process: com.mobilus.manual, PID: 8314
    04-12 15:01:38.497: E/AndroidRuntime(8314): android.util.AndroidRuntimeException: requestFeature() must be called before adding content
    04-12 15:01:38.497: E/AndroidRuntime(8314): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:249)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at com.android.internal.app.AlertController.installContent(AlertController.java:234)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.app.AlertDialog.onCreate(AlertDialog.java:337)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.app.ProgressDialog.onCreate(ProgressDialog.java:198)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.app.Dialog.dispatchOnCreate(Dialog.java:379)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.app.Dialog.show(Dialog.java:266)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at com.epapyrus.plugpdf.core.viewer.ReaderView$6$1.run(ReaderView.java:1105)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.os.Handler.handleCallback(Handler.java:733)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.os.Handler.dispatchMessage(Handler.java:95)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.os.Looper.loop(Looper.java:136)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at android.app.ActivityThread.main(ActivityThread.java:5017)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at java.lang.reflect.Method.invokeNative(Native Method)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at java.lang.reflect.Method.invoke(Method.java:515)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:655)
    04-12 15:01:38.497: E/AndroidRuntime(8314): at dalvik.system.NativeStart.main(Native Method)

    /////////////// My Application Code Start //////////////////
    View progressDialogView = mInflater.inflate(R.layout.dlg_layout_search_progress, null);
    ProgressDialog prgressdlg = new ProgressDialog(mContext);
    prgressdlg.setProgressStyle(1);
    prgressdlg.setContentView(progressDialogView);

    mReaderView.setSearchFinishAlertBuilder(builder);
    mReaderView.setSearchProgressDialog(prgressdlg);
    mReaderView.goToPage(mFirstShowPage);
    view.addView(mReaderView);
    /////////////// My Application Code End //////////////////

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: dialog ui change
Your information: