Revision 703aee64
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/dialogs/RubikDialogAbout.java | ||
|---|---|---|
| 26 | 26 |
import androidx.fragment.app.FragmentActivity; |
| 27 | 27 |
import androidx.appcompat.app.AlertDialog; |
| 28 | 28 |
import androidx.appcompat.app.AppCompatDialogFragment; |
| 29 |
|
|
| 30 |
import android.text.method.LinkMovementMethod; |
|
| 29 | 31 |
import android.view.LayoutInflater; |
| 30 | 32 |
import android.view.View; |
| 31 | 33 |
import android.view.Window; |
| ... | ... | |
| 65 | 67 |
String appName = getString(R.string.app_name); |
| 66 | 68 |
String appVers = getString(R.string.app_version); |
| 67 | 69 |
text.setText(getString(R.string.ap_placeholder,appName, appVers)); |
| 70 |
|
|
| 71 |
TextView text1 = view.findViewById(R.id.about_section1); |
|
| 72 |
text1.setMovementMethod(LinkMovementMethod.getInstance()); |
|
| 73 |
TextView text2 = view.findViewById(R.id.about_section2); |
|
| 74 |
text2.setMovementMethod(LinkMovementMethod.getInstance()); |
|
| 75 |
|
|
| 68 | 76 |
builder.setView(view); |
| 69 | 77 |
|
| 70 | 78 |
Dialog dialog = builder.create(); |
| src/main/res/layout/dialog_about.xml | ||
|---|---|---|
| 24 | 24 |
android:layout_marginBottom="10dp"/> |
| 25 | 25 |
|
| 26 | 26 |
<TextView |
| 27 |
android:id="@+id/about_section1" |
|
| 27 | 28 |
android:layout_width="match_parent" |
| 28 | 29 |
android:layout_height="fill_parent" |
| 29 | 30 |
android:layout_weight="0.40" |
| ... | ... | |
| 34 | 35 |
android:text="@string/credits1"/> |
| 35 | 36 |
|
| 36 | 37 |
<TextView |
| 38 |
android:id="@+id/about_section2" |
|
| 37 | 39 |
android:layout_width="match_parent" |
| 38 | 40 |
android:layout_height="fill_parent" |
| 39 | 41 |
android:layout_weight="0.60" |
| ... | ... | |
| 41 | 43 |
android:layout_marginTop="10dp" |
| 42 | 44 |
android:layout_marginLeft="10dp" |
| 43 | 45 |
android:layout_marginRight="10dp" |
| 44 |
android:linksClickable="true" |
|
| 45 |
android:autoLink="web" |
|
| 46 | 46 |
android:text="@string/credits2"/> |
| 47 | 47 |
|
| 48 | 48 |
</LinearLayout> |
| src/main/res/values/strings.xml | ||
|---|---|---|
| 36 | 36 |
<string name="new_name_try_again">The name you have chosen, %s, is already taken. Try again:</string> |
| 37 | 37 |
<string name="downloading">Downloading…</string> |
| 38 | 38 |
<string name="submitting">Submitting…</string> |
| 39 |
<string name="credits1">Open Source app developed using the Distorted graphics library. Licensed under GPL version 2 or - at your option - any later version.</string>
|
|
| 39 |
<string name="credits1">Open Source app developed using the Distorted graphics library. Licensed under <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html">GPL version 2</a> or - at your option - any later version.</string>
|
|
| 40 | 40 |
<string name="credits2">Download code, take a look at tutorials, learn how to add your own graphics effect, learn how to code your own object, contribute a Pretty Pattern, implement your own solver, or report a bug: \n\n<a href="https://distorted.org/redmine/projects/magic-cube/wiki">Distorted.org</a></string> |
| 41 | 41 |
|
| 42 | 42 |
<string name="solver_generic_error1">Solver for this object and size not implemented yet!</string> |
Also available in: Unified diff
Fix clickable links in the About dialog.