Down-and upload now possible, added about page first time tap show Info
This commit is contained in:
parent
6a522dfc72
commit
b8f2887ef7
|
@ -14,8 +14,8 @@
|
|||
<option name="values">
|
||||
<map>
|
||||
<entry key="assetSourceType" value="FILE" />
|
||||
<entry key="outputName" value="ic_reload" />
|
||||
<entry key="sourceFile" value="$PROJECT_DIR$/../DisIcons/reload.svg" />
|
||||
<entry key="outputName" value="ic_f_droid" />
|
||||
<entry key="sourceFile" value="$PROJECT_DIR$/../DisIcons/F-Droid_Logo_4_backup_backup.svg" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
|
|
Binary file not shown.
|
@ -21,4 +21,11 @@
|
|||
* Tapping on a disroot domain from external app (such as browser or chat app) opens Disroot app
|
||||
* Added reload button
|
||||
* Welcome activity added
|
||||
|
||||
## 0.0.3
|
||||
* if Pix-art is installed then it will be launched as chat app
|
||||
* Download is possible
|
||||
* Upload is possible
|
||||
* Added about page
|
||||
* Added linkt to fdroid
|
||||
* First time tapping on icons shows ontime info
|
||||
|
|
|
@ -30,7 +30,4 @@ dependencies {
|
|||
implementation 'com.android.support:support-v4:27.1.1'
|
||||
implementation 'com.android.support:customtabs:27.1.1'
|
||||
implementation 'com.android.support:cardview-v7:27.1.1'
|
||||
implementation 'com.jakewharton:butterknife:8.8.1'
|
||||
// Processors
|
||||
def anpros = ['com.jakewharton:butterknife-compiler:8.8.1']
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
package="com.example.webview">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
|
||||
|
||||
<application
|
||||
android:hardwareAccelerated="true"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/home/massy/Documenti/disapp/CHANGELOG.md
|
|
@ -0,0 +1,165 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
Binary file not shown.
Before Width: | Height: | Size: 144 KiB |
File diff suppressed because one or more lines are too long
|
@ -1,28 +0,0 @@
|
|||
body {
|
||||
background-color: #123456;
|
||||
}
|
||||
|
||||
#all-links {
|
||||
position: relative;
|
||||
width: 600;
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
}
|
||||
|
||||
.img-link {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #fff;
|
||||
font-family: "Monospace";
|
||||
font-size: 1.3em;
|
||||
text-decoration:none;
|
||||
margin: 40px;
|
||||
}
|
||||
|
||||
.link-text {
|
||||
padding: 20px;
|
||||
padding-top: 2%;
|
||||
}
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,159 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
background-color: #123456;
|
||||
background: url("bgimage.jpg")
|
||||
}
|
||||
#wrapper {
|
||||
width: 400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 100px;
|
||||
}
|
||||
|
||||
#logo {
|
||||
background: url("logo.png") no-repeat;
|
||||
background-size: auto 45px;
|
||||
height: 45px;
|
||||
margin-top: 20px;
|
||||
margin-left: 15%;
|
||||
}
|
||||
|
||||
#all-links {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.img-link {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #fff;
|
||||
font-family: "Source-Sans-Pro",sans-serif;
|
||||
font-size: 0.7em;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: #a33;
|
||||
}
|
||||
|
||||
#all-links {
|
||||
position: relative;
|
||||
width: 120;
|
||||
top: 5%;
|
||||
left: 5%;
|
||||
}
|
||||
|
||||
.img-link {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #fff;
|
||||
font-family: "Monospace";
|
||||
font-size: 1.3em;
|
||||
text-decoration:none;
|
||||
margin: 40px;
|
||||
}
|
||||
|
||||
.link-text {
|
||||
padding: 20px;
|
||||
padding-top: 2%;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="css/font-awesome.min.css">
|
||||
<title>Disroot's Dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="logo">
|
||||
</div>
|
||||
<div id="wrapper">
|
||||
<div id="all-links">
|
||||
<a class="link" href="mailto:" target=_blank>
|
||||
<div id="link-to-mail" class="img-link">
|
||||
<i class="fa fa-envelope fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> E-MAIL </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://cloud.disroot.org" target=_blank>
|
||||
<div id="link-to-cloud" class="img-link">
|
||||
<i class="fa fa-cloud fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> CLOUD </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://pod.disroot.org" target=_blank>
|
||||
<div id="link-to-pod" class="img-link">
|
||||
<i class="fa fa-asterisk fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> DIASPORA* </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://forum.disroot.org" target=_blank>
|
||||
<div id="link-to-forum" class="img-link">
|
||||
<i class="fa fa-stack-exchange fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> FORUM </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="xmpp:disroot@chat.disroot.org?join" target=_blank>
|
||||
<div id="link-to-chat" class="img-link">
|
||||
<i class="fa fa-comments fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> Chat </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://pad.disroot.org" target=_blank>
|
||||
<div id="link-to-pad" class="img-link">
|
||||
<i class="fa fa-file-text fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> ETHERPAD </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://calc.disroot.org" target=_blank>
|
||||
<div id="link-to-calc" class="img-link">
|
||||
<i class="fa fa-calculator fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> ETHERCALC </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://bin.disroot.org" target=_blank>
|
||||
<div id="link-to-bin" class="img-link">
|
||||
<i class="fa fa-calendar-o fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> ZEROBIN </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://upload.disroot.org" target=_blank>
|
||||
<div id="link-to-upload" class="img-link">
|
||||
<i class="fa fa-paper-plane fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> UPLOAD </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://search.disroot.org" target=_blank>
|
||||
<div id="link-to-search" class="img-link">
|
||||
<i class="fa fa-search fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> SEARX </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://poll.disroot.org" target=_blank>
|
||||
<div id="link-to-poll" class="img-link">
|
||||
<i class="fa fa-check-square fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> POLLS </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://board.disroot.org" target=_blank>
|
||||
<div id="link-to-board" class="img-link">
|
||||
<i class="fa fa-th fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> TAIGA </p>
|
||||
</div>
|
||||
</a>
|
||||
<a class="link" href="https://user.disroot.org" target=_blank>
|
||||
<div id="link-to-user" class="img-link">
|
||||
<i class="fa fa-user fa-5x" aria-hidden="true"></i>
|
||||
<p class="link-text"> PASSWORD </p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
|
@ -1,5 +1,8 @@
|
|||
package org.disroot.disrootapp.ui;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
|
@ -17,10 +20,15 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.webview.BuildConfig;
|
||||
import com.example.webview.R;
|
||||
|
||||
import org.disroot.disrootapp.utils.Constants;
|
||||
|
||||
public class AboutActivity extends AppCompatActivity {
|
||||
|
||||
/**
|
||||
|
@ -84,8 +92,11 @@ public class AboutActivity extends AppCompatActivity {
|
|||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
if (id == R.id.action_home) {
|
||||
Intent goHome = new Intent(AboutActivity.this, MainActivity.class);
|
||||
AboutActivity.this.startActivity(goHome);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -116,13 +127,121 @@ public class AboutActivity extends AppCompatActivity {
|
|||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View rootView = inflater.inflate(R.layout.fragment_about, container, false);
|
||||
TextView textView = (TextView) rootView.findViewById(R.id.section_label);
|
||||
textView.setText(getString(R.string.section_format, getArguments().getInt(ARG_SECTION_NUMBER)));
|
||||
View rootView = null;
|
||||
switch (getArguments().getInt(ARG_SECTION_NUMBER)){
|
||||
|
||||
case 1:
|
||||
rootView = inflater.inflate(R.layout.fragment_about_help, container, false);
|
||||
//Buttons
|
||||
|
||||
|
||||
final Button ContributeBtn = (Button) rootView.findViewById(R.id.ContributeBtn);//ContributeBtn
|
||||
ContributeBtn.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_SOURCE));
|
||||
Intent code = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(code);
|
||||
}
|
||||
});
|
||||
|
||||
final Button TranslateBtn = (Button) rootView.findViewById(R.id.TranslateBtn);//TranslateBtn
|
||||
TranslateBtn.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_TRANSLATE));
|
||||
Intent translate = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(translate);
|
||||
}
|
||||
});
|
||||
|
||||
final Button FeedbackBtn1 = (Button) rootView.findViewById(R.id.FeedbackBtn1);//FeedbackBtn1
|
||||
FeedbackBtn1.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_BUGS));
|
||||
Intent feedback1 = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(feedback1);
|
||||
}
|
||||
});
|
||||
|
||||
final Button FeedbackBtn2 = (Button) rootView.findViewById(R.id.FeedbackBtn2);//FeedbackBtn2
|
||||
FeedbackBtn2.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_XMPP));
|
||||
Intent feedback2 = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(feedback2);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 2:
|
||||
rootView = inflater.inflate(R.layout.fragment_about_about, container, false);
|
||||
final ImageButton fDroidBtn = (ImageButton) rootView.findViewById(R.id.fDroidBtn);//fDroidBtn
|
||||
fDroidBtn.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_FDROID));
|
||||
Intent fDroid = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(fDroid);
|
||||
}
|
||||
});
|
||||
final ImageButton homeBtn = (ImageButton) rootView.findViewById(R.id.homeBtn);//DisrootBtn
|
||||
homeBtn.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_DISROOT));
|
||||
Intent home = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(home);
|
||||
}
|
||||
});
|
||||
final TextView PackageName=(TextView)rootView.findViewById(R.id.PackageName);
|
||||
PackageName.setText("ID: " + BuildConfig.APPLICATION_ID);
|
||||
|
||||
final TextView AppVersion=(TextView)rootView.findViewById(R.id.AppVersion);
|
||||
AppVersion.setText("Version: " + BuildConfig.VERSION_NAME + "(" + BuildConfig.VERSION_CODE + ")");
|
||||
|
||||
final TextView AndroidVersion=(TextView)rootView.findViewById(R.id.AndroidVersion);
|
||||
AndroidVersion.setText("Android version: " + Build.VERSION.RELEASE);
|
||||
|
||||
final TextView Device=(TextView)rootView.findViewById(R.id.Device);
|
||||
Device.setText("Device name: " + Build.MANUFACTURER + Build.MODEL);
|
||||
break;
|
||||
case 3:
|
||||
rootView = inflater.inflate(R.layout.fragment_about_license, container, false);
|
||||
//Buttons
|
||||
final Button licenseBtn = (Button) rootView.findViewById(R.id.license_button);//LicenseBtn
|
||||
licenseBtn.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_LICENSE));
|
||||
Intent license = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(license);
|
||||
}
|
||||
});
|
||||
final TextView disrootBtn = (TextView) rootView.findViewById(R.id.disrootUrl);//DisrootBtn
|
||||
disrootBtn.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_DISROOT));
|
||||
Intent disroot = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(disroot);
|
||||
}
|
||||
});
|
||||
final TextView dioBtn = (TextView) rootView.findViewById(R.id.dioBtn);//DisrootBtn
|
||||
disrootBtn.setOnClickListener(new View.OnClickListener()
|
||||
{
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_DIO));
|
||||
Intent dio = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(dio);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
return rootView;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
This file is part of the dandelion*.
|
||||
|
||||
dandelion* is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
dandelion* is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with the dandelion*.
|
||||
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.disroot.disrootapp.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.AppCompatTextView;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.text.util.Linkify;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Patterns;
|
||||
|
||||
import org.disroot.disrootapp.ui.MainActivity;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* TextView, that renders HTML with highlited and clickable links and hashtags.
|
||||
* Links are opened in a webbrowser.
|
||||
* Hashtags open the MainActivity, load the new-post site of the selected pod and insert the
|
||||
* hashtag into the post editor. See data/HashtagContentProvider.
|
||||
*/
|
||||
public class HtmlTextView extends AppCompatTextView {
|
||||
|
||||
public HtmlTextView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public HtmlTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
public HtmlTextView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Linkify, format markdown and escape the displayed message.
|
||||
*/
|
||||
private void init() {
|
||||
formatHtmlAndCustomTags();
|
||||
}
|
||||
|
||||
public void setTextFormatted(String text) {
|
||||
setText(text);
|
||||
formatHtmlAndCustomTags();
|
||||
}
|
||||
|
||||
private void formatHtmlAndCustomTags() {
|
||||
setText(new SpannableString(Html.fromHtml(getText().toString())));
|
||||
Linkify.TransformFilter filter = new Linkify.TransformFilter() {
|
||||
public final String transformUrl(final Matcher match, String url) {
|
||||
return match.group();
|
||||
}
|
||||
};
|
||||
|
||||
Pattern hashtagPattern = Pattern.compile("[#]+[A-Za-z0-9-_]+\\b");
|
||||
String hashtagScheme = MainActivity.CONTENT_HASHTAG;
|
||||
Linkify.addLinks(this, hashtagPattern, hashtagScheme, null, filter);
|
||||
|
||||
Pattern urlPattern = Patterns.WEB_URL;
|
||||
Linkify.addLinks(this, urlPattern, null, null, filter);
|
||||
}
|
||||
}
|
|
@ -1,12 +1,24 @@
|
|||
package org.disroot.disrootapp.ui;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.DownloadManager;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Parcelable;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
|
@ -17,9 +29,18 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.TranslateAnimation;
|
||||
import android.webkit.DownloadListener;
|
||||
import android.webkit.GeolocationPermissions;
|
||||
import android.webkit.URLUtil;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
@ -29,7 +50,15 @@ import org.disroot.disrootapp.utils.Constants;
|
|||
import org.disroot.disrootapp.webviews.DisWebChromeClient;
|
||||
import org.disroot.disrootapp.webviews.DisWebViewClient;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements View.OnLongClickListener {
|
||||
|
||||
|
@ -38,6 +67,23 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
private DisWebChromeClient disWebChromeClient;
|
||||
Button button;
|
||||
SharedPreferences firstStart = null;//first start
|
||||
private static final int INPUT_FILE_REQUEST_CODE = 1;//file upload
|
||||
private static final int FILECHOOSER_RESULTCODE = 1;
|
||||
String loadUrl;
|
||||
private WebSettings webSettings;
|
||||
private ValueCallback<Uri> mUploadMessage;
|
||||
private Uri mCapturedImageURI = null;
|
||||
private ValueCallback<Uri[]> mFilePathCallback;
|
||||
private String mCameraPhotoPath;
|
||||
ValueCallback<Uri[]> chooserPathUri;
|
||||
private ProgressBar progressBar;
|
||||
|
||||
public static final int REQUEST_ID_MULTIPLE_PERMISSIONS = 1;
|
||||
|
||||
WebView chooserWV;
|
||||
WebChromeClient.FileChooserParams chooserParams;
|
||||
|
||||
public static final String CONTENT_HASHTAG = "content://org.disroot.disrootapp.ui.mainactivity/";
|
||||
|
||||
|
||||
|
||||
|
@ -47,7 +93,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
setContentView(R.layout.activity_main);
|
||||
FrameLayout frameLayoutContainer = (FrameLayout) findViewById(R.id.framelayout_container);
|
||||
ViewGroup viewLoading = (ViewGroup) findViewById(R.id.linearlayout_view_loading_container);
|
||||
setupWebView(savedInstanceState, frameLayoutContainer, viewLoading);
|
||||
setupWebView(savedInstanceState, frameLayoutContainer);
|
||||
firstStart = getSharedPreferences("org.disroot.disrootap", MODE_PRIVATE);//fisrt start
|
||||
// enables the activity icon as a 'home' button. required if "android:targetSdkVersion" > 14
|
||||
//getActionBar().setHomeButtonEnabled(true);
|
||||
|
@ -56,6 +102,8 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
setSupportActionBar(toolbar);
|
||||
final ScrollView dashboard = (ScrollView)findViewById(R.id.dashboard);
|
||||
|
||||
|
||||
progressBar = (ProgressBar)findViewById(R.id.progressbarLoading);
|
||||
//Set buttons
|
||||
// Locate the button in activity_main.xml
|
||||
button = (Button) findViewById(R.id.MailBtn);//MailBtn
|
||||
|
@ -67,18 +115,22 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// Capture button clicks
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
// Start NewActivity.class
|
||||
String k9 = "com.fsck.k9";
|
||||
Intent mail = getPackageManager().getLaunchIntentForPackage(k9);
|
||||
if(mail == null) {
|
||||
if(mail == null&&(firstStart.getBoolean("firsttap", false))) {
|
||||
mail = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+k9));
|
||||
}//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
}
|
||||
startActivity(mail);
|
||||
else startActivity(mail);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
button = (Button) findViewById(R.id.CloudBtn);//CloudBtn
|
||||
|
@ -96,8 +148,12 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
Intent cloud = getPackageManager().getLaunchIntentForPackage(nc);
|
||||
if(cloud == null) {
|
||||
cloud = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+nc));
|
||||
}//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
}
|
||||
startActivity(cloud);
|
||||
else startActivity(cloud);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -109,8 +165,12 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
Intent pod = getPackageManager().getLaunchIntentForPackage(Diaspora);
|
||||
if(pod == null) {
|
||||
pod = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+Diaspora));
|
||||
}//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
}
|
||||
startActivity(pod);
|
||||
else startActivity(pod);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -118,6 +178,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.ForumBtn);//ForumBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_FORUM);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -142,6 +209,12 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
if((xmpp1 != null)&&(xmpp2 != null)) {
|
||||
startActivity(xmpp2);
|
||||
}
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
}
|
||||
else
|
||||
startActivity(xmpp1);
|
||||
}
|
||||
|
||||
|
@ -155,7 +228,12 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
if(pad == null) {
|
||||
pad = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+Padland));
|
||||
}
|
||||
startActivity(pad);
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
}
|
||||
else startActivity(pad);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -163,6 +241,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.CalcBtn);//CalcBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_CALC);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -173,6 +258,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.BinBtn);//BinBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_BIN);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -183,6 +275,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.UploadBtn);//UploadBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_UPLOAD);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -193,6 +292,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.SearxBtn);//SearxBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_SEARX);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -203,6 +309,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.PollsBtn);//PollsBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_POLL);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -213,6 +326,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.BoardBtn);//BoardBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_BOARD);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -223,6 +343,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.UserBtn);//UserBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_USER);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -233,6 +360,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.StateBtn);//UserBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_STATE);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -243,6 +377,13 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button = (Button) findViewById(R.id.HowtoBtn);//AboutBtn
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
else
|
||||
webView.loadUrl(Constants.URL_DisApp_HOWTO);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
dashboard.setVisibility(View.GONE);
|
||||
|
@ -254,12 +395,26 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
Intent goAbout = new Intent(MainActivity.this, AboutActivity.class);
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
}
|
||||
else
|
||||
MainActivity.this.startActivity(goAbout);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void showFirstTap() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||
builder.setTitle(R.string.FirstTitle);
|
||||
builder.setMessage(getString(R.string.FirstInfo));
|
||||
builder.setPositiveButton(R.string.global_ok, null);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private void showCloudInfo() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||
builder.setTitle(R.string.CloudInfoTitle);
|
||||
|
@ -524,10 +679,11 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
* actionBar.setTitle("");
|
||||
}*/
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
private void setupWebView(Bundle savedInstanceState, FrameLayout customViewContainer, ViewGroup viewLoading) {
|
||||
private void setupWebView(Bundle savedInstanceState, FrameLayout customViewContainer) {
|
||||
disWebChromeClient = new DisWebChromeClient(this, webView, customViewContainer);
|
||||
progressBar = (ProgressBar)findViewById(R.id.progressbarLoading);
|
||||
webView = (WebView) findViewById(R.id.webView_content);
|
||||
webView.setWebViewClient(new DisWebViewClient(savedInstanceState, viewLoading));
|
||||
webView.setWebViewClient(new DisWebViewClient(savedInstanceState));
|
||||
webView.setWebChromeClient(disWebChromeClient);
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.getSettings().setDomStorageEnabled(true);//solves taiga board \o/
|
||||
|
@ -535,11 +691,380 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
webView.getSettings().setAppCacheEnabled(true);
|
||||
webView.getSettings().setBuiltInZoomControls(true);
|
||||
webView.getSettings().setSaveFormData(true);
|
||||
webView.getSettings().setAllowFileAccess(true);
|
||||
webView.getSettings().setLoadWithOverviewMode(true);
|
||||
webView.getSettings().setUseWideViewPort(true);
|
||||
// webView.loadUrl(Constants.URL_DisApp_MAIN_PAGE);
|
||||
webView.setOnLongClickListener(this);
|
||||
// webView.setVisibility(View.GONE);;
|
||||
|
||||
|
||||
|
||||
//Make download possible
|
||||
webView.setDownloadListener(new DownloadListener() {
|
||||
public void onDownloadStart(String url, String userAgent,
|
||||
String contentDisposition, String mimetype,
|
||||
long contentLength) {
|
||||
final String filename= URLUtil.guessFileName(url, contentDisposition, mimetype);
|
||||
DownloadManager.Request request = new DownloadManager.Request(
|
||||
Uri.parse(url));
|
||||
request.allowScanningByMediaScanner();
|
||||
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);
|
||||
DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
|
||||
dm.enqueue(request);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//check permissions
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
}
|
||||
else if(Build.VERSION.SDK_INT >=11 && Build.VERSION.SDK_INT < 19) {
|
||||
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
}
|
||||
webView.setWebChromeClient(new ChromeClient());
|
||||
webView.loadUrl(loadUrl); //change with your website
|
||||
|
||||
this.webView.setWebViewClient(new WebViewClient(){
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
return handleUrl(url);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.N)
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
|
||||
final Uri uri = request.getUrl();
|
||||
return handleUrl(request.getUrl().toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public boolean handleUrl(String url){
|
||||
|
||||
if (url.startsWith("geo:") || url.startsWith("mailto:") || url.startsWith("tel:") || url.startsWith("sms:")|| url.startsWith("xmpp:")) {
|
||||
Intent searchAddress = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
startActivity(searchAddress);
|
||||
}else
|
||||
webView.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean checkAndRequestPermissions() {
|
||||
int permissionCamera = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA);
|
||||
int permissionStorage = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
List<String> listPermissionsNeeded = new ArrayList<>();
|
||||
if (permissionStorage != PackageManager.PERMISSION_GRANTED) {
|
||||
listPermissionsNeeded.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
||||
}
|
||||
if (permissionCamera != PackageManager.PERMISSION_GRANTED) {
|
||||
listPermissionsNeeded.add(Manifest.permission.CAMERA);
|
||||
}
|
||||
if (!listPermissionsNeeded.isEmpty()) {
|
||||
ActivityCompat.requestPermissions(this, listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]),REQUEST_ID_MULTIPLE_PERMISSIONS);
|
||||
Log.e(TAG, "Returned falseeeee-------");
|
||||
return false;
|
||||
}
|
||||
Log.d(TAG, "Permission returned trueeeee-------");
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
|
||||
Log.d(TAG, "Permission callback called-------");
|
||||
switch (requestCode) {
|
||||
case REQUEST_ID_MULTIPLE_PERMISSIONS: {
|
||||
|
||||
Map<String, Integer> perms = new HashMap<>();
|
||||
// Initialize the map with both permissions
|
||||
perms.put(Manifest.permission.CAMERA, PackageManager.PERMISSION_GRANTED);
|
||||
perms.put(Manifest.permission.WRITE_EXTERNAL_STORAGE, PackageManager.PERMISSION_GRANTED);
|
||||
// Fill with actual results from user
|
||||
if (grantResults.length > 0) {
|
||||
for (int i = 0; i < permissions.length; i++)
|
||||
perms.put(permissions[i], grantResults[i]);
|
||||
// Check for both permissions
|
||||
if (perms.get(Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED
|
||||
&& perms.get(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "camera & Storage permission granted");
|
||||
Toast.makeText(this, "Permissions granted! Try now.", Toast.LENGTH_SHORT).show();
|
||||
//chromClt.openChooser(chooserWV, chooserPathUri, chooserParams);
|
||||
// process the normal flow
|
||||
//else any one or both the permissions are not granted
|
||||
} else {
|
||||
Log.d(TAG, "Some permissions are not granted ask again ");
|
||||
//permission is denied (this is the first time, when "never ask again" is not checked) so ask again explaining the usage of permission
|
||||
// shouldShowRequestPermissionRationale will return true
|
||||
//show the dialog or snackbar saying its necessary and try again otherwise proceed with setup.
|
||||
if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.CAMERA) || ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
|
||||
showDialogOK("Camera and Storage Permission required for this app",
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
switch (which) {
|
||||
case DialogInterface.BUTTON_POSITIVE:
|
||||
checkAndRequestPermissions();
|
||||
break;
|
||||
case DialogInterface.BUTTON_NEGATIVE:
|
||||
// proceed with logic by disabling the related features or quit the app.
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//permission is denied (and never ask again is checked)
|
||||
//shouldShowRequestPermissionRationale will return false
|
||||
else {
|
||||
Toast.makeText(this, "Go to settings and enable permissions", Toast.LENGTH_LONG).show();
|
||||
// //proceed with logic by disabling the related features or quit the app.
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void showDialogOK(String message, DialogInterface.OnClickListener okListener) {
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(message)
|
||||
.setPositiveButton("OK", okListener)
|
||||
.setNegativeButton("Cancel", okListener)
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (requestCode != INPUT_FILE_REQUEST_CODE || mFilePathCallback == null) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
return;
|
||||
}
|
||||
Uri[] results = null;
|
||||
// Check that the response is a good one
|
||||
if (resultCode == MainActivity.RESULT_OK) {
|
||||
if (data == null) {
|
||||
// If there is not data, then we may have taken a photo
|
||||
if (mCameraPhotoPath != null) {
|
||||
results = new Uri[]{Uri.parse(mCameraPhotoPath)};
|
||||
}
|
||||
} else {
|
||||
String dataString = data.getDataString();
|
||||
if (dataString != null) {
|
||||
results = new Uri[]{Uri.parse(dataString)};
|
||||
}else {
|
||||
if (Build.VERSION.SDK_INT >= 16) {
|
||||
if (data.getClipData() != null) {
|
||||
final int numSelectedFiles = data.getClipData().getItemCount();
|
||||
|
||||
results = new Uri[numSelectedFiles];
|
||||
|
||||
for (int i = 0; i < numSelectedFiles; i++) {
|
||||
results[i] = data.getClipData().getItemAt(i).getUri();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mFilePathCallback.onReceiveValue(results);
|
||||
mFilePathCallback = null;
|
||||
} else if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
|
||||
if (requestCode != FILECHOOSER_RESULTCODE || mUploadMessage == null) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
return;
|
||||
}
|
||||
if (requestCode == FILECHOOSER_RESULTCODE) {
|
||||
if (null == this.mUploadMessage) {
|
||||
return;
|
||||
}
|
||||
Uri result = null;
|
||||
try {
|
||||
if (resultCode != RESULT_OK) {
|
||||
result = null;
|
||||
} else {
|
||||
// retrieve from the private variable if the intent is null
|
||||
result = data == null ? mCapturedImageURI : data.getData();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(getApplicationContext(), "activity :" + e,
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
mUploadMessage.onReceiveValue(result);
|
||||
mUploadMessage = null;
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
if (checkSelfPermission(android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
== PackageManager.PERMISSION_GRANTED) {
|
||||
Log.e("Permission error","You have permission");
|
||||
} else {
|
||||
|
||||
Log.e("Permission error","You have asked for permission");
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
|
||||
}
|
||||
}
|
||||
else { //you dont need to worry about these stuff below api level 23
|
||||
Log.e("Permission error","You already have the permission");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
private File createImageFile() throws IOException {
|
||||
// Create an image file name
|
||||
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
|
||||
String imageFileName = "JPEG_" + timeStamp + "_";
|
||||
File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
|
||||
File imageFile = File.createTempFile(
|
||||
imageFileName, /* prefix */
|
||||
".jpg", /* suffix */
|
||||
storageDir /* directory */
|
||||
);
|
||||
return imageFile;
|
||||
}
|
||||
|
||||
public class ChromeClient extends WebChromeClient {
|
||||
|
||||
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
|
||||
// callback.invoke(String origin, boolean allow, boolean remember);
|
||||
Log.e(TAG, "onGeolocationPermissionsShowPrompt: " );
|
||||
callback.invoke(origin, true, false);
|
||||
}
|
||||
|
||||
// For Android 5.0
|
||||
public boolean onShowFileChooser(WebView view, ValueCallback<Uri[]> filePath, WebChromeClient.FileChooserParams fileChooserParams) {
|
||||
|
||||
chooserWV = view;
|
||||
chooserPathUri = filePath;
|
||||
chooserParams = fileChooserParams;
|
||||
|
||||
if(checkAndRequestPermissions()){
|
||||
openChooser(chooserWV, chooserPathUri, chooserParams);
|
||||
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void openChooser(WebView view, ValueCallback<Uri[]> filePath, WebChromeClient.FileChooserParams fileChooserParams){
|
||||
|
||||
// Double check that we don't have any existing callbacks
|
||||
if (mFilePathCallback != null) {
|
||||
mFilePathCallback.onReceiveValue(null);
|
||||
}
|
||||
mFilePathCallback = filePath;
|
||||
Intent takePictureIntent;
|
||||
|
||||
takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
|
||||
// Create the File where the photo should go
|
||||
File photoFile = null;
|
||||
try {
|
||||
photoFile = createImageFile();
|
||||
takePictureIntent.putExtra("PhotoPath", mCameraPhotoPath);
|
||||
} catch (IOException ex) {
|
||||
// Error occurred while creating the File
|
||||
Log.e(TAG, "Unable to create Image File", ex);
|
||||
}
|
||||
// Continue only if the File was successfully created
|
||||
if (photoFile != null) {
|
||||
mCameraPhotoPath = "file:" + photoFile.getAbsolutePath();
|
||||
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));
|
||||
} else {
|
||||
takePictureIntent = null;
|
||||
}
|
||||
}
|
||||
Intent contentSelectionIntent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
if (Build.VERSION.SDK_INT >= 18) {
|
||||
contentSelectionIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
||||
}
|
||||
contentSelectionIntent.setType("*/*");
|
||||
Intent[] intentArray;
|
||||
if (takePictureIntent != null) {
|
||||
intentArray = new Intent[]{takePictureIntent};
|
||||
} else {
|
||||
intentArray = new Intent[0];
|
||||
}
|
||||
Intent chooserIntent = new Intent(Intent.ACTION_CHOOSER);
|
||||
chooserIntent.putExtra(Intent.EXTRA_INTENT, contentSelectionIntent);
|
||||
chooserIntent.putExtra(Intent.EXTRA_TITLE, "Image Chooser");
|
||||
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, intentArray);
|
||||
startActivityForResult(chooserIntent, INPUT_FILE_REQUEST_CODE);
|
||||
}
|
||||
|
||||
// openFileChooser for Android 3.0+
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {
|
||||
|
||||
mUploadMessage = uploadMsg;
|
||||
// Create AndroidExampleFolder at sdcard
|
||||
// Create AndroidExampleFolder at sdcard
|
||||
File imageStorageDir = new File(Environment.getExternalStoragePublicDirectory(
|
||||
Environment.DIRECTORY_PICTURES)
|
||||
, "AndroidExampleFolder");
|
||||
if (!imageStorageDir.exists()) {
|
||||
// Create AndroidExampleFolder at sdcard
|
||||
imageStorageDir.mkdirs();
|
||||
}
|
||||
// Create camera captured image file path and name
|
||||
File file = new File(
|
||||
imageStorageDir + File.separator + "IMG_"
|
||||
+ String.valueOf(System.currentTimeMillis())
|
||||
+ ".jpg");
|
||||
mCapturedImageURI = Uri.fromFile(file);
|
||||
// Camera capture image intent
|
||||
final Intent captureIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageURI);
|
||||
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
i.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
i.setType("image/*");
|
||||
// Create file chooser intent
|
||||
Intent chooserIntent = Intent.createChooser(i, "Image Chooser");
|
||||
// Set camera intent to file chooser
|
||||
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Parcelable[]{captureIntent});
|
||||
// On select image call onActivityResult method of activity
|
||||
|
||||
chooserIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
||||
startActivityForResult(chooserIntent, FILECHOOSER_RESULTCODE);
|
||||
}
|
||||
|
||||
// openFileChooser for Android < 3.0
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg) {
|
||||
openFileChooser(uploadMsg, "");
|
||||
}
|
||||
|
||||
//openFileChooser for other Android versions
|
||||
public void openFileChooser(ValueCallback<Uri> uploadMsg,
|
||||
String acceptType,
|
||||
String capture) {
|
||||
openFileChooser(uploadMsg, acceptType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
public void shareCurrentPage() {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setAction(Intent.ACTION_SEND);
|
||||
|
|
|
@ -1,27 +1,42 @@
|
|||
package org.disroot.disrootapp.ui;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
import com.example.webview.R;
|
||||
|
||||
import org.disroot.disrootapp.utils.Constants;
|
||||
|
||||
public class WelcomeActivity extends AppCompatActivity {
|
||||
ImageButton imageButton;
|
||||
Button button;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_welcome);
|
||||
button = (Button) findViewById(R.id.homeBtn);//Home
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
imageButton = findViewById(R.id.homeBtn);//Home
|
||||
imageButton.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
Intent goHome = new Intent(WelcomeActivity.this, MainActivity.class);
|
||||
WelcomeActivity.this.startActivity(goHome);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
imageButton = findViewById(R.id.fDroidBtn);//Home
|
||||
imageButton.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
Uri uri = Uri.parse(String.valueOf(Constants.URL_FDROID));
|
||||
Intent fDroid = new Intent(Intent.ACTION_VIEW, Uri.parse(String.valueOf(uri)));
|
||||
startActivity(fDroid);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,4 +24,14 @@ public class Constants {
|
|||
public static final String URL_DisApp_STATE = "https://state.disroot.org";
|
||||
public static final String URL_DisApp_HOWTO = "https://howto.disroot.org";
|
||||
public static final String URL_DisApp_K9HELP = "https://howto.disroot.org/en/email/email-clients/mobile/androidk9";
|
||||
public static final String URL_LICENSE = "https://www.gnu.org/licenses/lgpl-3.0.en.html";
|
||||
public static final String URL_DISROOT = "https://disroot.org";
|
||||
public static final String URL_FDROID = "https://f-droid.org/FDroid.apk";
|
||||
public static final String URL_DIO = "https://github.com/renancunha33/DiolinuxApp";
|
||||
public static final String URL_TRANSLATE = "https://git.fosscommunity.in/disroot/disapp";
|
||||
public static final String URL_SOURCE = "https://git.fosscommunity.in/disroot/disapp";
|
||||
public static final String URL_BUGS = "https://git.fosscommunity.in/disroot/disapp/issues";
|
||||
public static final String URL_XMPP = "xmpp:disroot@chat.disroot.org?join";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ public class DisWebChromeClient extends WebChromeClient {
|
|||
private final WebView webView;
|
||||
private final FrameLayout frameLayoutContainer;
|
||||
private final Context context;
|
||||
private ViewGroup viewLoading;
|
||||
private View viewCustom;
|
||||
private CustomViewCallback customViewCallback;
|
||||
|
||||
|
@ -41,17 +40,7 @@ public class DisWebChromeClient extends WebChromeClient {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getVideoLoadingProgressView() {
|
||||
if (viewLoading == null) {
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
viewLoading = (ViewGroup) inflater.inflate(R.layout.view_loading, null);
|
||||
viewLoading.findViewById(R.id.textview_loading_description).setVisibility(View.VISIBLE);
|
||||
}
|
||||
return viewLoading;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onHideCustomView() {
|
||||
super.onHideCustomView();
|
||||
if (viewCustom != null) {
|
||||
|
|
|
@ -21,12 +21,10 @@ import static android.support.v4.content.ContextCompat.startActivity;
|
|||
public class DisWebViewClient extends WebViewClient {
|
||||
|
||||
private final Bundle savedInstanceState;
|
||||
private final ViewGroup viewLoading;
|
||||
private boolean isViewLoadingNotStarted = true;
|
||||
|
||||
public DisWebViewClient(Bundle savedInstanceState, ViewGroup viewLoading) {
|
||||
public DisWebViewClient(Bundle savedInstanceState) {
|
||||
this.savedInstanceState = savedInstanceState;
|
||||
this.viewLoading = viewLoading;
|
||||
}
|
||||
Context context;
|
||||
@Override
|
||||
|
@ -41,25 +39,5 @@ Context context;
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
if (isViewLoadingNotStarted) {
|
||||
viewLoading.setVisibility(View.VISIBLE);
|
||||
isViewLoadingNotStarted = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
if (!isViewLoadingNotStarted) {
|
||||
viewLoading.setVisibility(View.INVISIBLE);
|
||||
isViewLoadingNotStarted = true;
|
||||
}
|
||||
view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
<vector android:height="24dp" android:viewportHeight="48"
|
||||
android:viewportWidth="48" android:width="24dp"
|
||||
xmlns:aapt="http://schemas.android.com/aapt" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillAlpha="0.4" android:fillColor="#263238"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m2.6135,1.9866a1.2501,1.2501 0,0 0,-1.0117 2.0293l3.6035,4.6641c-0.127,0.3331 -0.2031,0.6915 -0.2031,1.0703l0,4 0,2.8652 0,0.1348c0,1.662 1.338,3 3,3l32,0c1.662,0 3,-1.338 3,-3l0,-4 0,-2.8652 0,-0.1348c0,-0.3803 -0.0771,-0.74 -0.2051,-1.0742l3.6016,-4.6602a1.2501,1.2501 0,0 0,-1.0488 -2.0273,1.2501 1.2501,0 0,0 -0.9297,0.498l-3.4316,4.4414c-0.3102,-0.1079 -0.6384,-0.1777 -0.9863,-0.1777l-32,0c-0.3486,0 -0.6776,0.069 -0.9883,0.1777l-3.4336,-4.4414a1.2501,1.2501 0,0 0,-0.9668 -0.5zM8.0021,20.7504c-0.2077,0 -0.4098,0.021 -0.6055,0.061 -1.3695,0.2761 -2.3945,1.4698 -2.3945,2.9101l0,0.029 0,19.7793 0,0.029 0,0.1914c0,1.662 1.338,3 3,3l32,0c1.662,0 3,-1.338 3,-3l0,-20 0,-0.029c0,-1.4403 -1.025,-2.634 -2.3945,-2.9101 -0.1956,-0.039 -0.3977,-0.061 -0.6055,-0.061l-32,0z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#8ab000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m45.4108,2.5 l-4.25,5.5"
|
||||
android:strokeAlpha="1" android:strokeColor="#769616"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="0.29803923" android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m45.3885,1.2472c0.4535,0.012 0.7617,0.189 0.9807,0.4486 -2.0269,2.4089 -2.3684,2.7916 -5.1355,6.2214 -1.0195,1.319 -2.0816,0.6373 -1.0621,-0.6817l4.25,-5.5c0.229,-0.3056 0.5851,-0.478 0.9668,-0.4883z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="0.2" android:fillColor="#263238"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m46.3777,1.7083c0.1239,0.1479 0.5612,0.8046 0.0225,1.5562l-4.25,5.5c-1.0195,1.319 -1.1499,-0.6123 -1.1499,-0.6123 -0,0 3.7345,-4.51 5.3774,-6.4439z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#8ab000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m45.6619,1.4821c0.4382,0 0.9599,0.1416 0.8242,0.7986 -0.1036,0.5016 -4.6608,6.0744 -4.6608,6.0744 -1.0195,1.319 -2.4935,0.6763 -1.4739,-0.6425l4.2344,-5.4727c0.2602,-0.29 0.6085,-0.7436 1.0762,-0.7578z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#8ab000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m2.5889,2.5 l4.25,5.5" android:strokeAlpha="1"
|
||||
android:strokeColor="#769616" android:strokeLineCap="round"
|
||||
android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="0.29803923" android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m2.6113,1.2472c-0.4535,0.012 -0.7617,0.189 -0.9807,0.4486 2.0269,2.4089 2.3684,2.7916 5.1355,6.2214 1.0195,1.319 2.0816,0.6373 1.0621,-0.6817l-4.25,-5.5c-0.229,-0.3056 -0.5851,-0.478 -0.9668,-0.4883z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="0.2" android:fillColor="#263238"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m1.6221,1.7083c-0.1239,0.1479 -0.5612,0.8046 -0.0225,1.5562l4.25,5.5c1.0195,1.319 1.1499,-0.6123 1.1499,-0.6123 0,0 -3.7345,-4.51 -5.3774,-6.4439z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#8ab000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m2.3379,1.4821c-0.4382,0 -0.9599,0.1416 -0.8242,0.7986 0.1036,0.5016 4.6608,6.0744 4.6608,6.0744 1.0195,1.319 2.4935,0.6763 1.4739,-0.6425l-4.2344,-5.4727c-0.2602,-0.29 -0.6085,-0.7436 -1.0762,-0.7578z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#aeea00"
|
||||
android:pathData="M8,6L40,6A3,3 0,0 1,43 9L43,16A3,3 0,0 1,40 19L8,19A3,3 0,0 1,5 16L5,9A3,3 0,0 1,8 6z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="0.2" android:fillColor="#263238"
|
||||
android:pathData="M8,9L40,9A3,3 0,0 1,43 12L43,16A3,3 0,0 1,40 19L8,19A3,3 0,0 1,5 16L5,12A3,3 0,0 1,8 9z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="0.29803923" android:fillColor="#ffffff"
|
||||
android:pathData="M8,6L40,6A3,3 0,0 1,43 9L43,13A3,3 0,0 1,40 16L8,16A3,3 0,0 1,5 13L5,9A3,3 0,0 1,8 6z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#aeea00"
|
||||
android:pathData="M8,7L40,7A3,2.5385 0,0 1,43 9.5385L43,15.4615A3,2.5385 0,0 1,40 18L8,18A3,2.5385 0,0 1,5 15.4615L5,9.5385A3,2.5385 0,0 1,8 7z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#1976d2"
|
||||
android:pathData="M8,20L40,20A3,3 0,0 1,43 23L43,43A3,3 0,0 1,40 46L8,46A3,3 0,0 1,5 43L5,23A3,3 0,0 1,8 20z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="0.2" android:fillColor="#263238"
|
||||
android:pathData="M8,33L40,33A3,3 0,0 1,43 36L43,43A3,3 0,0 1,40 46L8,46A3,3 0,0 1,5 43L5,36A3,3 0,0 1,8 33z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="0.2" android:fillColor="#ffffff"
|
||||
android:pathData="M8,20L40,20A3,3 0,0 1,43 23L43,30A3,3 0,0 1,40 33L8,33A3,3 0,0 1,5 30L5,23A3,3 0,0 1,8 20z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#1976d2"
|
||||
android:pathData="M8,21L40,21A3,2.7692 0,0 1,43 23.7693L43,42.2307A3,2.7692 0,0 1,40 45L8,45A3,2.7692 0,0 1,5 42.2307L5,23.7693A3,2.7692 0,0 1,8 21z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#0d47a1"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="m24,26.75c-2.8807,0 -5.3198,1.9847 -6.0332,4.6504l3.2129,0C21.734,30.415 22.7748,29.75 24,29.75c1.8127,0 3.25,1.4373 3.25,3.25 0,1.8127 -1.4373,3.25 -3.25,3.25 -1.3074,0 -2.4113,-0.7527 -2.9297,-1.8496l-3.1543,0C18.5583,37.1661 21.0479,39.25 24,39.25c3.434,0 6.25,-2.816 6.25,-6.25 0,-3.434 -2.816,-6.25 -6.25,-6.25z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="3"/>
|
||||
<path android:fillAlpha="0.40392157" android:fillColor="#00000000"
|
||||
android:pathData="M24,33m-9.55,0a9.55,9.55 0,1 1,19.1 0a9.55,9.55 0,1 1,-19.1 0"
|
||||
android:strokeAlpha="1" android:strokeColor="#0d47a1"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="1.89999998"/>
|
||||
<path android:fillAlpha="0.2" android:fillColor="#263238"
|
||||
android:pathData="M11,12.625a3.375,3.875 0,1 0,6.75 0a3.375,3.875 0,1 0,-6.75 0z"
|
||||
android:strokeAlpha="0.69721117" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="1.89999998"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#ffffff"
|
||||
android:pathData="M14.375,13.125m-3.375,0a3.375,3.375 0,1 1,6.75 0a3.375,3.375 0,1 1,-6.75 0"
|
||||
android:strokeAlpha="0.69721117" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="1.89999998"/>
|
||||
<path android:fillAlpha="0.2" android:fillColor="#263238"
|
||||
android:pathData="M30.5,12.625a3.375,3.875 0,1 0,6.75 0a3.375,3.875 0,1 0,-6.75 0z"
|
||||
android:strokeAlpha="0.69721117" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="1.89999998"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#ffffff"
|
||||
android:pathData="M33.875,13.125m-3.375,0a3.375,3.375 0,1 1,6.75 0a3.375,3.375 0,1 1,-6.75 0"
|
||||
android:strokeAlpha="0.69721117" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="1.89999998"/>
|
||||
<path android:fillAlpha="1" android:fillType="evenOdd"
|
||||
android:pathData="m2.6135,1.2365a1.2501,1.2501 0,0 0,-1.0117 2.0293l3.6035,4.6641c-0.127,0.3331 -0.2031,0.6915 -0.2031,1.0703l0,4 0,2.8652 0,0.1348c0,1.662 1.338,3 3,3l32,0c1.662,0 3,-1.338 3,-3l0,-4 0,-2.8652 0,-0.1348c0,-0.3803 -0.0771,-0.74 -0.2051,-1.0742l3.6016,-4.6602a1.2501,1.2501 0,0 0,-1.0488 -2.0273,1.2501 1.2501,0 0,0 -0.9297,0.498l-3.4316,4.4414c-0.3102,-0.1079 -0.6384,-0.1777 -0.9863,-0.1777l-32,0c-0.3486,0 -0.6776,0.069 -0.9883,0.1777l-3.4336,-4.4414a1.2501,1.2501 0,0 0,-0.9668 -0.5zM8.0021,20.0002c-0.2077,0 -0.4098,0.021 -0.6055,0.061 -1.3695,0.2761 -2.3945,1.4698 -2.3945,2.9101l0,0.029 0,19.7793 0,0.029 0,0.1914c0,1.662 1.338,3 3,3l32,0c1.662,0 3,-1.338 3,-3l0,-20 0,-0.029c0,-1.4403 -1.025,-2.634 -2.3945,-2.9101 -0.1956,-0.039 -0.3977,-0.061 -0.6055,-0.061l-32,0z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.5"/>
|
||||
</vector>
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".AboutActivity">
|
||||
tools:context="org.disroot.disrootapp.ui.AboutActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
|
@ -36,19 +36,19 @@
|
|||
android:id="@+id/tabItem"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tab_text_1" />
|
||||
android:text="@string/help" />
|
||||
|
||||
<android.support.design.widget.TabItem
|
||||
android:id="@+id/tabItem2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tab_text_2" />
|
||||
android:text="@string/action_about" />
|
||||
|
||||
<android.support.design.widget.TabItem
|
||||
android:id="@+id/tabItem3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tab_text_3" />
|
||||
android:text="@string/license" />
|
||||
|
||||
</android.support.design.widget.TabLayout>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
|
|
@ -1,17 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/item_toolbar" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressbarLoading"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:visibility="gone"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateTintMode="add"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/framelayout_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webView_content"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,45 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.WelcomeActivity"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/WelcomeTitle"
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/WelcomeTitle"
|
||||
android:textSize="25dp"
|
||||
/>
|
||||
tools:context=".ui.WelcomeActivity"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="@dimen/fab_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/WelcomeInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:gravity="left"
|
||||
android:text="@string/WelcomeInfo"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/InnerRelativeLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" >
|
||||
<Button
|
||||
android:id="@+id/homeBtn"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/WelcomeTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_reload"
|
||||
android:text="@string/action_home"
|
||||
android:layout_margin="50dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
android:gravity="center"
|
||||
android:text="@string/WelcomeTitle"
|
||||
android:textSize="25sp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/WelcomeInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
android:text="@string/WelcomeInfo"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/fDroidBtn"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="start"
|
||||
android:foreground="@drawable/ic_f_droid"
|
||||
android:contentDescription="@string/fDroid" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/fDroidBtn"
|
||||
android:text="@string/fDroid"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:layout_toRightOf="@+id/fDroidBtn"
|
||||
android:layout_toEndOf="@+id/fDroidBtn">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/homeBtn"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@color/bg_primary_blue"
|
||||
android:foreground="@drawable/ic_home"
|
||||
android:contentDescription="@string/app_name" /></LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:layout_toEndOf="@+id/fDroidBtn"
|
||||
android:layout_below="@id/fDroidBtn"
|
||||
android:layout_toRightOf="@+id/fDroidBtn">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:gravity="end"/></LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout> </ScrollView>
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".AboutActivity$PlaceholderFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/section_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/constraintLayout"
|
||||
tools:layout_constraintLeft_creator="1"
|
||||
tools:layout_constraintTop_creator="1" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,141 @@
|
|||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
tools:context="org.disroot.disrootapp.ui.AboutActivity$AboutFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<!-- About -->
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"/>
|
||||
|
||||
<TextView
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/WelcomeInfo"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/fDroidBtn"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="start"
|
||||
android:foreground="@drawable/ic_f_droid"
|
||||
android:contentDescription="@string/fDroid" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/fDroidBtn"
|
||||
android:text="@string/fDroid"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:layout_toRightOf="@+id/fDroidBtn"
|
||||
android:layout_toEndOf="@+id/fDroidBtn">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/homeBtn"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@color/bg_primary_blue"
|
||||
android:foreground="@drawable/ic_home"
|
||||
android:contentDescription="@string/DisrootWeb" /></LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:layout_toEndOf="@+id/fDroidBtn"
|
||||
android:layout_below="@id/fDroidBtn"
|
||||
android:layout_toRightOf="@+id/fDroidBtn">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/DisrootWeb"
|
||||
android:gravity="end"/></LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!--Vertical padding-->
|
||||
<android.support.v4.widget.Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/activity_vertical_margin" />
|
||||
|
||||
<!-- APP SECTION -->
|
||||
<TextView
|
||||
android:id="@+id/AppSection"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/AppSection" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/PackageName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AppVersion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- DEVICE SECTION -->
|
||||
<TextView
|
||||
android:id="@+id/DeviceSection"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:text="@string/Device"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/AndroidVersion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/Device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"/>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
|
@ -0,0 +1,194 @@
|
|||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
tools:context="org.disroot.disrootapp.ui.AboutActivity$HelpFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Contribute Code -->
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Contribute"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ContributeText"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/ContributeBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/ContributeBtn"/>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- Translate -->
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Translate"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/TranslateText"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/TranslateBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/TranslateBtn"/>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- Give Feedback -->
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Feedback"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/FeedbackText"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/FeedbackBtn1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/FeedbackBtn1"/>
|
||||
<Button
|
||||
android:id="@+id/FeedbackBtn2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/FeedbackBtn2"/>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- Spread the Word -->
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/SpreadTheWord"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<org.disroot.disrootapp.ui.HtmlTextView
|
||||
android:id="@+id/fragment_about__spread_the_word_text"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/SpreadTheWordTxt"/>
|
||||
|
||||
<!--<Button
|
||||
android:id="@+id/SpreadTheWordBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/SpreadTheWordBtn"/>-->
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
|
@ -0,0 +1,235 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="64dp"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingBottom="@dimen/activity_horizontal_margin"
|
||||
tools:context="org.disroot.disrootapp.ui.AboutActivity$LicenseFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Maintainers -->
|
||||
<android.support.v7.widget.CardView
|
||||
tools:style="@style/CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
card_view:cardElevation="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/horizontal_half_margin"
|
||||
android:layout_marginStart="@dimen/horizontal_half_margin"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/maintainersText"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/maintainersTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/maintainers"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/maintainersText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/disroot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/disroot" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/disrootUrl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/disrootUrl"
|
||||
android:textColor="@color/bg_primary_blue_dark"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
<!-- Contibutors -->
|
||||
<android.support.v7.widget.CardView
|
||||
tools:style="@style/CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
card_view:cardElevation="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/horizontal_half_margin"
|
||||
android:layout_marginStart="@dimen/horizontal_half_margin"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contibutors"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/contributorsTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mastext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/contributors" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
<!-- License -->
|
||||
<android.support.v7.widget.CardView
|
||||
tools:style="@style/CardView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/activity_vertical_margin"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
card_view:cardElevation="5dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="@dimen/activity_vertical_margin">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/horizontal_half_margin"
|
||||
android:layout_marginStart="@dimen/horizontal_half_margin"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/licenseText"
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/licenseTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/license"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/licenseText"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/license_button"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/license_button" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- Third Party Libraries -->
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin_half">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/thirdparty"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/thirdpartyText"/>
|
||||
|
||||
<org.disroot.disrootapp.ui.HtmlTextView
|
||||
android:id="@+id/thirdpartyText"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- Miscellaneous -->
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="64dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
card_view:cardElevation="5dp"
|
||||
card_view:cardCornerRadius="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginEnd="@dimen/activity_horizontal_margin_half"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.DeviceDefault.Large"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/misc"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/miscDio"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/dioBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/miscDioBtn"/>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
|
@ -0,0 +1,11 @@
|
|||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Switch
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
</RelativeLayout>
|
|
@ -2,9 +2,16 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.disroot.disrootapp.ui.AboutActivity">
|
||||
<!--
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
app:showAsAction="never" />
|
||||
-->
|
||||
<item
|
||||
android:icon="@drawable/ic_home"
|
||||
android:id="@+id/action_home"
|
||||
android:title="@string/action_home"
|
||||
app:showAsAction="always"/>
|
||||
</menu>
|
||||
|
|
|
@ -4,4 +4,6 @@
|
|||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="appbar_padding_top">8dp</dimen>
|
||||
<dimen name="horizontal_half_margin">16dp</dimen>
|
||||
<dimen name="activity_horizontal_margin_half">8dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<string name="action_share">Share</string>
|
||||
<string name="action_reload">Reload</string>
|
||||
|
||||
|
||||
<string name="action_options">Actions</string>
|
||||
<string name="activity_main_share_info">share link info</string>
|
||||
<string name="activity_main_manteiners">%s\n\nDeveloper: Massimiliano\n\ncontact us:\n<EMAIL mailto="contact@disroot.org">support@disroot.org</EMAIL></string>
|
||||
|
@ -35,14 +36,50 @@
|
|||
<string name="CloudInfoTitle">Nextcloud settings.</string>
|
||||
<string name="CloudInfo">Information about cloud.\nLike Nextcloud settings etc...\nAnd other stuff like:\nA button to how to page.</string>
|
||||
<string name="WelcomeTitle">Welcome</string>
|
||||
<string name="WelcomeInfo">Welcome\nThis window is temporary\nMust create content for this window\nI may need some helpe here :-p</string>
|
||||
<string name="WelcomeInfo">Disroot is a platform providing online services based on principles of freedom, privacy, federation and decentralization.\nThis app is like your swiss knife to the Disroot platform, made by the community for the community.\nIf you don\'t have a Disroot account you can still use this app to access all the Disroot services that do not require an account:\nEtherpad, Ethercalc, Private bin, Upload, Poll, Searx and Diaspora (requires a Diaspora only account)\n\nThe app may require you to install additional apps, and not all apps can be found on the Play store, So we recommend you to install F-droid market on your device. If you haven\'t you can download it by tapping on the F-droid icon.\n</string>
|
||||
|
||||
<string name="tab_text_1">Help</string>
|
||||
<string name="tab_text_2">About</string>
|
||||
<string name="tab_text_3">License</string>
|
||||
|
||||
<string name="help">Help</string>
|
||||
<string name="license">License</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="section_format">Hello World from section: %1$d</string>
|
||||
|
||||
<string name="licenseTitle">License</string>
|
||||
<string name="license_button">GNU LGPLv3.0 License</string>
|
||||
|
||||
<string translatable="false" name="licenseText">Copyright © 2007 Free Software Foundation, Inc.\n
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 3 of the License only.\n\n
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
</string>
|
||||
|
||||
<string name="maintainersTitle">Maintainers</string>
|
||||
<string name="maintainersText">This app is currently being developed and maintained by\n\n</string>
|
||||
<string name="disrootUrl"><a href = "https://disroot.org">https://disroot.org</a></string>
|
||||
<string name="disroot"> * Disroot community (Disroot):</string>
|
||||
<string name="contributorsTitle">Contributors</string>
|
||||
<string name="contributors"><b>Massimiliano:</b>\n Current developer of the Disroot app</string>
|
||||
<string name="fDroid">F-Droid</string>
|
||||
<string name="thirdparty">Third-Party Libraries</string>
|
||||
<string name="thirdpartyText">None yet</string>
|
||||
<string name="misc">Miscellaneous</string>
|
||||
<string name="miscDio">We used Diolinx as our starting base to create this app. Go check it out, it\'s free software as well!</string>
|
||||
<string name="miscDioBtn">Tell me more</string>
|
||||
<string name="AppSection">Application</string>
|
||||
<string name="AppVersion">App Version: %1$s</string>
|
||||
<string name="Device">Device:</string>
|
||||
<string name="Contribute">Contribute</string>
|
||||
<string name="ContributeText">Disroot app is developed free as in Freedom and follows the ideas of the Disroot Foundation. If you want to contribute, go ahead! Currently we are a very small team, so we greatly appreciate any kind of help!</string>
|
||||
<string name="ContributeBtn">Get the source</string>
|
||||
<string name="Translate">Translate</string>
|
||||
<string name="TranslateText">The app is not available in your language? You can change that! Why don\\\'t you help us by translating it?</string>
|
||||
<string name="TranslateBtn">Let me translate</string>
|
||||
<string name="Feedback">Give Feedback!</string>
|
||||
<string name="FeedbackText">Disroot app is still in development, so if you have suggestions or any kind of feedback, please let us know!</string>
|
||||
<string name="FeedbackBtn1">Report Bugs</string>
|
||||
<string name="FeedbackBtn2">Chat with us</string>
|
||||
<string name="SpreadTheWord">Spread the word!</string>
|
||||
<string name="SpreadTheWordTxt">Tell your friends and family about Disroot! Why don\'t you blog about your experiences? We\'d love to hear from you!</string>
|
||||
<string name="SpreadTheWordBtn">Share the app</string>
|
||||
<string name="DisrootWeb">Disroot web</string>
|
||||
<string name="FirstTitle">I almost forgot</string>
|
||||
<string name="FirstInfo">You can do a long press on each icon to show you extra information...</string>
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="toolbarStyle">@style/Widget.MyApp.ActionBar</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="cardViewStyle">@style/CardView</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.MyApp.ActionBar" parent="Widget.AppCompat.ActionBar">
|
||||
|
@ -24,5 +25,8 @@
|
|||
<style name="DisTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="DisTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="cardViewStyle">@style/CardView</item></style>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue