Merge pull request #1088 from owncloud/updated_docs_about_target_of_PRs
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / dialog / ChangelogDialog.java
index 676bea5..83c6053 100644 (file)
@@ -1,5 +1,7 @@
-/* ownCloud Android client application
- *   Copyright (C) 2012-2013 ownCloud Inc.
+/**
+ *   ownCloud Android client application
+ *
+ *   Copyright (C) 2015 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
@@ -21,24 +23,27 @@ import android.app.AlertDialog;
 import android.app.Dialog;
 import android.content.DialogInterface;
 import android.os.Bundle;
 import android.app.Dialog;
 import android.content.DialogInterface;
 import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
 import android.webkit.WebView;
 
 import android.webkit.WebView;
 
-import com.actionbarsherlock.app.SherlockDialogFragment;
 import com.owncloud.android.R;
 import com.owncloud.android.R;
+import com.owncloud.android.utils.DisplayUtils;
 
 
 /**
  * Dialog to show the contents of res/raw/CHANGELOG.txt
  */
 
 
 /**
  * Dialog to show the contents of res/raw/CHANGELOG.txt
  */
-public class ChangelogDialog extends SherlockDialogFragment {
+public class ChangelogDialog extends DialogFragment {
 
 
-    private static final String ARG_CANCELABLE = ChangelogDialog.class.getCanonicalName() + ".ARG_CANCELABLE";
+    private static final String ARG_CANCELABLE = ChangelogDialog.class.getCanonicalName() +
+            ".ARG_CANCELABLE";
 
 
     /**
      * Public factory method to get dialog instances.
      * 
 
 
     /**
      * Public factory method to get dialog instances.
      * 
-     * @param cancelable    If 'true', the dialog can be cancelled by the user input (BACK button, touch outside...)
+     * @param cancelable    If 'true', the dialog can be cancelled by the user input
+     *                      (BACK button, touch outside...)
      * @return              New dialog instance, ready to show.
      */
     public static ChangelogDialog newInstance(boolean cancelable) {
      * @return              New dialog instance, ready to show.
      */
     public static ChangelogDialog newInstance(boolean cancelable) {
@@ -57,13 +62,14 @@ public class ChangelogDialog extends SherlockDialogFragment {
     public Dialog onCreateDialog(Bundle savedInstanceState) {
         /// load the custom view to insert in the dialog, between title and 
         WebView webview = new WebView(getActivity());
     public Dialog onCreateDialog(Bundle savedInstanceState) {
         /// load the custom view to insert in the dialog, between title and 
         WebView webview = new WebView(getActivity());
-        webview.loadUrl("file:///android_res/raw/" + getResources().getResourceEntryName(R.raw.changelog) + ".html");
+        webview.loadUrl("file:///android_res/raw/" +
+                getResources().getResourceEntryName(R.raw.changelog) + ".html");
         
         /// build the dialog
         AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
         
         Dialog dialog = builder.setView(webview)
         
         /// build the dialog
         AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
         
         Dialog dialog = builder.setView(webview)
-                                .setIcon(R.drawable.icon)
+                                .setIcon(DisplayUtils.getSeasonalIconId())
                                 //.setTitle(R.string.whats_new)
                                 .setPositiveButton(R.string.common_ok,
                                         new DialogInterface.OnClickListener() {
                                 //.setTitle(R.string.whats_new)
                                 .setPositiveButton(R.string.common_ok,
                                         new DialogInterface.OnClickListener() {
@@ -81,7 +87,8 @@ public class ChangelogDialog extends SherlockDialogFragment {
      * {@inheritDoc}
      *-/
     @Override
      * {@inheritDoc}
      *-/
     @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+    Bundle savedInstanceState) {
         /// load the custom layout
         View view = inflater.inflate(R.layout.fragment_changelog, container);
         mEditText = (EditText) view.findViewById(R.id.txt_your_name);
         /// load the custom layout
         View view = inflater.inflate(R.layout.fragment_changelog, container);
         mEditText = (EditText) view.findViewById(R.id.txt_your_name);