Started with Disroot app
56
.gitignore
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
|
||||
# Files for the Dalvik VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# Generated files
|
||||
bin/
|
||||
gen/
|
||||
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Proguard folder generated by Eclipse
|
||||
proguard/
|
||||
|
||||
# Log Files
|
||||
*.log
|
||||
|
||||
# OS-specific files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# User-specific configurations
|
||||
.idea/libraries/
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
.idea/.name
|
||||
.idea/compiler.xml
|
||||
.idea/copyright/profiles_settings.xml
|
||||
.idea/encodings.xml
|
||||
.idea/misc.xml
|
||||
.idea/modules.xml
|
||||
.idea/scopes/scope_settings.xml
|
||||
.idea/vcs.xml
|
||||
.idea/gradle.xml
|
||||
|
||||
*.iml
|
||||
|
||||
# Fucking crashlytics strings
|
||||
app/src/main/res/values/com_crashlytics_export_strings.xml
|
||||
app/src/main/assets/crashlytics-build.properties
|
||||
app/app.iml
|
32
.idea/assetWizardSettings.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorWizard">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorAssetStep">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="assetSourceType" value="FILE" />
|
||||
<entry key="outputName" value="ic_home" />
|
||||
<entry key="sourceFile" value="$PROJECT_DIR$/../home.svg" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
BIN
.idea/caches/build_file_checksums.ser
Normal file
29
.idea/codeStyles/Project.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<Objective-C-extensions>
|
||||
<file>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
|
||||
</file>
|
||||
<class>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
|
||||
</class>
|
||||
<extensions>
|
||||
<pair source="cpp" header="h" fileNamingConvention="NONE" />
|
||||
<pair source="c" header="h" fileNamingConvention="NONE" />
|
||||
</extensions>
|
||||
</Objective-C-extensions>
|
||||
</code_scheme>
|
||||
</component>
|
12
.idea/runConfigurations.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
165
LICENCE.txt
Normal file
|
@ -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.
|
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
<h1>Disroot app </h1>
|
||||
|
||||
This app is a webapp for the site siroot.org.
|
||||
|
||||
<i>Link to source:<br />
|
||||
...
|
||||
<br/>
|
||||
Link to APK:<br/>
|
||||
...</i>
|
||||
|
||||
Licence GPLv3 (see licence on source above)
|
||||
|
||||
Requiriments:
|
||||
Android 4.1 or +
|
||||
4 MB free on Smartphone
|
||||
|
||||
<h3>Developed by Massimiliano:</h3>
|
||||
|
1
app/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/build
|
36
app/build.gradle
Normal file
|
@ -0,0 +1,36 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
applicationId "org.disroot.disrootapp"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "0.0.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
implementation 'com.android.support:appcompat-v7:27.1.1'
|
||||
implementation 'com.android.support:design:27.1.1'
|
||||
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']
|
||||
}
|
21
app/proguard-rules.pro
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
|
@ -0,0 +1,13 @@
|
|||
package org.disroot.disrootapp.ui;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
||||
|
||||
/**
|
||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
||||
*/
|
||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
}
|
29
app/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.webview">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@mipmap/ic_disroot"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/DisTheme">
|
||||
<activity
|
||||
android:name="org.disroot.disrootapp.ui.SplashScreenActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.disroot.disrootapp.ui.MainActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:hardwareAccelerated="true"
|
||||
android:label="@string/app_name" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
BIN
app/src/main/assets/bgimage.jpg
Normal file
After Width: | Height: | Size: 144 KiB |
4
app/src/main/assets/css/font-awesome.min.css
vendored
Normal file
28
app/src/main/assets/css/style.css
Normal file
|
@ -0,0 +1,28 @@
|
|||
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%;
|
||||
}
|
BIN
app/src/main/assets/fonts/fontawesome-webfont.eot
Normal file
1
app/src/main/assets/fonts/fontawesome-webfont.svg
Normal file
After Width: | Height: | Size: 434 KiB |
BIN
app/src/main/assets/fonts/fontawesome-webfont.ttf
Normal file
BIN
app/src/main/assets/fonts/fontawesome-webfont.woff
Normal file
BIN
app/src/main/assets/fonts/fontawesome-webfont.woff2
Normal file
159
app/src/main/assets/index.html
Normal file
|
@ -0,0 +1,159 @@
|
|||
<!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="https://mail.disroot.org" 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>
|
BIN
app/src/main/assets/logo.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/ic_dio-web.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
241
app/src/main/java/org/disroot/disrootapp/ui/MainActivity.java
Normal file
|
@ -0,0 +1,241 @@
|
|||
package org.disroot.disrootapp.ui;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.webview.R;
|
||||
|
||||
import org.disroot.disrootapp.utils.Constants;
|
||||
import org.disroot.disrootapp.utils.DeviceProvider;
|
||||
import org.disroot.disrootapp.webviews.DisWebChromeClient;
|
||||
import org.disroot.disrootapp.webviews.DisWebViewClient;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements View.OnLongClickListener {
|
||||
|
||||
private static final String TAG = MainActivity.class.getSimpleName();
|
||||
private WebView webView;
|
||||
private DisWebChromeClient disWebChromeClient;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
setupToolbar();
|
||||
FrameLayout frameLayoutContainer = (FrameLayout) findViewById(R.id.framelayout_container);
|
||||
ViewGroup viewLoading = (ViewGroup) findViewById(R.id.linearlayout_view_loading_container);
|
||||
setupWebView(savedInstanceState, frameLayoutContainer, viewLoading);
|
||||
// enables the activity icon as a 'home' button. required if "android:targetSdkVersion" > 14
|
||||
//getActionBar().setHomeButtonEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
webView.saveState(outState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
webView.restoreState(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
webView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
webView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
disWebChromeClient.hideCustomView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (disWebChromeClient.hideCustomView()) {
|
||||
return true;
|
||||
} else if (!disWebChromeClient.hideCustomView() && webView.canGoBack()) {
|
||||
webView.goBack();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu items for use in the action bar
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.menu_main, menu);
|
||||
|
||||
// To show icons in the actionbar's overflow menu:
|
||||
// http://stackoverflow.com/questions/18374183/how-to-show-icons-in-overflow-menu-in-actionbar
|
||||
//if(featureId == Window.FEATURE_ACTION_BAR && menu != null){
|
||||
if(menu.getClass().getSimpleName().equals("MenuBuilder")){
|
||||
try{
|
||||
Method m = menu.getClass().getDeclaredMethod(
|
||||
"setOptionalIconsVisible", Boolean.TYPE);
|
||||
m.setAccessible(true);
|
||||
m.invoke(menu, true);
|
||||
}
|
||||
catch(NoSuchMethodException e){
|
||||
Log.e(TAG, "onMenuOpened", e);
|
||||
}
|
||||
catch(Exception e){
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_share:
|
||||
shareCurrentPage();
|
||||
return true;
|
||||
case R.id.action_home:
|
||||
webView.loadUrl(Constants.URL_DisApp_MAIN_PAGE);
|
||||
return true;
|
||||
case R.id.action_mail:
|
||||
String k9 = "com.fsck.k9";
|
||||
Intent mail = getPackageManager().getLaunchIntentForPackage(k9);
|
||||
if(mail == null) {
|
||||
mail = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+k9));
|
||||
}
|
||||
startActivity(mail);
|
||||
return true;
|
||||
case R.id.action_cloud:
|
||||
String nc = "com.nextcloud.client";
|
||||
Intent cloud = getPackageManager().getLaunchIntentForPackage(nc);
|
||||
if(cloud == null) {
|
||||
cloud = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+nc));
|
||||
}
|
||||
startActivity(cloud);
|
||||
return true;
|
||||
case R.id.action_diaspora:
|
||||
String Diaspora = "com.github.dfa.diaspora_android";
|
||||
Intent pod = getPackageManager().getLaunchIntentForPackage(Diaspora);
|
||||
if(pod == null) {
|
||||
pod = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+Diaspora));
|
||||
}
|
||||
startActivity(pod);
|
||||
return true;
|
||||
case R.id.action_forum:
|
||||
webView.loadUrl(Constants.URL_DisApp_FORUM);
|
||||
return true;
|
||||
case R.id.action_chat:
|
||||
Intent xmpp = new Intent(Intent.ACTION_MAIN);
|
||||
PackageManager conversations = getPackageManager();
|
||||
xmpp = conversations.getLaunchIntentForPackage("eu.siacs.conversations");
|
||||
xmpp.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
startActivity(xmpp);
|
||||
return true;
|
||||
case R.id.action_pad:
|
||||
webView.loadUrl(Constants.URL_DisApp_PAD);
|
||||
return true;
|
||||
case R.id.action_calc:
|
||||
webView.loadUrl(Constants.URL_DisApp_CALC);
|
||||
return true;
|
||||
case R.id.action_bin:
|
||||
webView.loadUrl(Constants.URL_DisApp_BIN);
|
||||
return true;
|
||||
case R.id.action_upload:
|
||||
webView.loadUrl(Constants.URL_DisApp_UPLOAD);
|
||||
return true;
|
||||
case R.id.action_searx:
|
||||
webView.loadUrl(Constants.URL_DisApp_SEARX);
|
||||
return true;
|
||||
case R.id.action_poll:
|
||||
webView.loadUrl(Constants.URL_DisApp_POLL);
|
||||
return true;
|
||||
case R.id.action_board:
|
||||
webView.loadUrl(Constants.URL_DisApp_BOARD);
|
||||
return true;
|
||||
case R.id.action_user:
|
||||
webView.loadUrl(Constants.URL_DisApp_USER);
|
||||
return true;
|
||||
case R.id.action_about:
|
||||
showAppInfo();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
public void setupToolbar() {
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
((TextView) toolbar.findViewById(R.id.textview_toolbar_title)).setText(R.string.app_name);
|
||||
setSupportActionBar(toolbar);
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null)
|
||||
actionBar.setTitle("");
|
||||
}
|
||||
|
||||
private void setupWebView(Bundle savedInstanceState, FrameLayout customViewContainer, ViewGroup viewLoading) {
|
||||
disWebChromeClient = new DisWebChromeClient(this, webView, customViewContainer);
|
||||
webView = (WebView) findViewById(R.id.webView_content);
|
||||
webView.setWebViewClient(new DisWebViewClient(savedInstanceState, viewLoading));
|
||||
webView.setWebChromeClient(disWebChromeClient);
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.setVerticalScrollBarEnabled(false);
|
||||
webView.getSettings().setAppCacheEnabled(true);
|
||||
webView.getSettings().setBuiltInZoomControls(true);
|
||||
webView.getSettings().setSaveFormData(true);
|
||||
webView.loadUrl(Constants.URL_DisApp_MAIN_PAGE);
|
||||
webView.setOnLongClickListener(this);
|
||||
}
|
||||
|
||||
public void shareCurrentPage() {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setAction(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_TEXT, webView.getUrl());
|
||||
intent.setType("text/plain");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void showAppInfo() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||
builder.setTitle(R.string.app_name);
|
||||
builder.setMessage(getString(R.string.activity_main_manteiners, DeviceProvider.getAppVersion(this)));
|
||||
builder.setPositiveButton(R.string.global_ok, null);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
Toast.makeText(view.getContext(), R.string.activity_main_share_info, Toast.LENGTH_LONG).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package org.disroot.disrootapp.ui;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.example.webview.R;
|
||||
import org.disroot.disrootapp.utils.Constants;
|
||||
|
||||
public class SplashScreenActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splash_screen);
|
||||
if (getSupportActionBar() != null)
|
||||
getSupportActionBar().hide();
|
||||
getSplashScreenCountDownTimer().start();
|
||||
}
|
||||
|
||||
private CountDownTimer getSplashScreenCountDownTimer() {
|
||||
return new CountDownTimer(Constants.SPLASH_SCREEN_DURATION, Constants.SPLASH_SCREEN_INTERVAL) {
|
||||
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package org.disroot.disrootapp.utils;
|
||||
|
||||
/**
|
||||
* Created by jackson on 02/11/15.
|
||||
*/
|
||||
public class Constants {
|
||||
public static final long SPLASH_SCREEN_DURATION = 3000;
|
||||
public static final long SPLASH_SCREEN_INTERVAL = 1000;
|
||||
|
||||
public static final String URL_DisApp_MAIN_PAGE = "file:///android_asset/index.html";
|
||||
public static final String URL_DisApp_MAIL = "https://mail.disroot.org";
|
||||
public static final String URL_DisApp_CLOUD = "https://cloud.disroot.org";
|
||||
public static final String URL_DisApp_DIASPORA = "https://pod.disroot.org/";
|
||||
public static final String URL_DisApp_FORUM = "https://forum.disroot.org/";
|
||||
public static final String URL_DisApp_CHAT = "http://chat.disroot.org";
|
||||
public static final String URL_DisApp_PAD = "http://pad.disroot.org";
|
||||
public static final String URL_DisApp_CALC = "http://calc.disroot.org";
|
||||
public static final String URL_DisApp_BIN = "http://bin.disroot.org";
|
||||
public static final String URL_DisApp_UPLOAD = "http://upload.disroot.org";
|
||||
public static final String URL_DisApp_SEARX = "http://search.disroot.org";
|
||||
public static final String URL_DisApp_POLL = "http://poll.disroot.org";
|
||||
public static final String URL_DisApp_BOARD = "http://board.disroot.org";
|
||||
public static final String URL_DisApp_USER = "http://user.disroot.org";
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package org.disroot.disrootapp.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
/**
|
||||
* Created by jackson on 02/11/15.
|
||||
*/
|
||||
public class DeviceProvider {
|
||||
|
||||
public static String getAppVersion(Context context) {
|
||||
try {
|
||||
PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
|
||||
return packageInfo.versionName;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package org.disroot.disrootapp.webviews;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.example.webview.R;
|
||||
|
||||
/**
|
||||
* Created by jackson on 02/11/15.
|
||||
*/
|
||||
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;
|
||||
|
||||
public DisWebChromeClient(Context context, WebView webView, FrameLayout frameLayoutContainer) {
|
||||
this.context = context;
|
||||
this.webView = webView;
|
||||
this.frameLayoutContainer = frameLayoutContainer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowCustomView(View view, CustomViewCallback callback) {
|
||||
if (viewCustom == null) {
|
||||
viewCustom = view;
|
||||
webView.setVisibility(View.GONE);
|
||||
frameLayoutContainer.setVisibility(View.VISIBLE);
|
||||
frameLayoutContainer.addView(view);
|
||||
customViewCallback = callback;
|
||||
} else {
|
||||
callback.onCustomViewHidden();
|
||||
}
|
||||
}
|
||||
|
||||
@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
|
||||
public void onHideCustomView() {
|
||||
super.onHideCustomView();
|
||||
if (viewCustom != null) {
|
||||
setWebViewVisible();
|
||||
removeCustomViewFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
private void setWebViewVisible() {
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
frameLayoutContainer.setVisibility(View.GONE);
|
||||
viewCustom.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void removeCustomViewFromParent() {
|
||||
frameLayoutContainer.removeView(viewCustom);
|
||||
customViewCallback.onCustomViewHidden();
|
||||
viewCustom = null;
|
||||
}
|
||||
|
||||
public boolean hideCustomView() {
|
||||
if (viewCustom == null) {
|
||||
return false;
|
||||
} else {
|
||||
onHideCustomView();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package org.disroot.disrootapp.webviews;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
/**
|
||||
* Created by jackson on 02/11/15.
|
||||
*/
|
||||
public class DisWebViewClient extends WebViewClient {
|
||||
|
||||
private final Bundle savedInstanceState;
|
||||
private final ViewGroup viewLoading;
|
||||
private boolean isViewLoadingNotStarted = true;
|
||||
|
||||
public DisWebViewClient(Bundle savedInstanceState, ViewGroup viewLoading) {
|
||||
this.savedInstanceState = savedInstanceState;
|
||||
this.viewLoading = viewLoading;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (savedInstanceState == null)
|
||||
view.loadUrl(url);
|
||||
return super.shouldOverrideUrlLoading(view, url);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
BIN
app/src/main/logodisroot.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_share_white_24dp.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
app/src/main/res/drawable-mdpi/ic_share_white_24dp.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
app/src/main/res/drawable-xhdpi/ic_share_white_24dp.png
Normal file
After Width: | Height: | Size: 496 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_share_white_24dp.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_share_white_24dp.png
Normal file
After Width: | Height: | Size: 938 B |
15
app/src/main/res/drawable/ic_home.xml
Normal file
BIN
app/src/main/res/drawable/logodisroot.png
Normal file
After Width: | Height: | Size: 12 KiB |
26
app/src/main/res/layout/activity_main.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/item_toolbar" />
|
||||
|
||||
<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"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="invisible" />
|
||||
|
||||
|
||||
<include layout="@layout/view_loading"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
13
app/src/main/res/layout/activity_splash_screen.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_primary_blue">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/logodisroot" />
|
||||
</RelativeLayout>
|
18
app/src/main/res/layout/item_toolbar.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/bg_primary_blue"
|
||||
android:elevation="8dp"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:theme="@style/ThemeOverlay.MyApp.ActionBar">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview_toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp" />
|
||||
</android.support.v7.widget.Toolbar>
|
23
app/src/main/res/layout/view_loading.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/linearlayout_view_loading_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressbar_loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textview_loading_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingTop="8dp"
|
||||
android:text="@string/view_loading_description"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
63
app/src/main/res/menu/menu_main.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<menu 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"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_share"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_share"
|
||||
android:icon="@drawable/ic_share_white_24dp"
|
||||
app:showAsAction="always" />
|
||||
|
||||
<group
|
||||
android:orderInCategory="101"
|
||||
android:showAsAction="always">
|
||||
<item
|
||||
android:icon="@drawable/ic_home"
|
||||
android:id="@+id/action_home"
|
||||
android:title="@string/action_home"/>
|
||||
<item
|
||||
android:id="@+id/action_mail"
|
||||
android:title="@string/action_mail" />
|
||||
<item
|
||||
android:id="@+id/action_cloud"
|
||||
android:title="@string/action_cloud" />
|
||||
<item
|
||||
android:id="@+id/action_diaspora"
|
||||
android:title="@string/action_diaspora" />
|
||||
<item
|
||||
android:id="@+id/action_forum"
|
||||
android:title="@string/action_forum" />
|
||||
<item
|
||||
android:id="@+id/action_chat"
|
||||
android:title="@string/action_chat" />
|
||||
<item
|
||||
android:id="@+id/action_pad"
|
||||
android:title="@string/action_pad" />
|
||||
<item
|
||||
android:id="@+id/action_calc"
|
||||
android:title="@string/action_calc" />
|
||||
<item
|
||||
android:id="@+id/action_bin"
|
||||
android:title="@string/action_bin" />
|
||||
<item
|
||||
android:id="@+id/action_upload"
|
||||
android:title="@string/action_upload" />
|
||||
<item
|
||||
android:id="@+id/action_searx"
|
||||
android:title="@string/action_searx" />
|
||||
<item
|
||||
android:id="@+id/action_poll"
|
||||
android:title="@string/action_poll" />
|
||||
<item
|
||||
android:id="@+id/action_board"
|
||||
android:title="@string/action_board" />
|
||||
<item
|
||||
android:id="@+id/action_user"
|
||||
android:title="@string/action_user" />
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:title="@string/action_about" />
|
||||
</group>
|
||||
</menu>
|
10
app/src/main/res/menu/menu_splash_screen.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<menu 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"
|
||||
tools:context="org.disroot.disrootapp.ui.SplashScreenActivity">
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_options"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
BIN
app/src/main/res/mipmap-hdpi/ic_disroot.png
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_disroot.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_disroot.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_disroot.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_disroot.png
Normal file
After Width: | Height: | Size: 11 KiB |
5
app/src/main/res/values/colors.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="bg_primary_blue">#50162d</color>
|
||||
<color name="bg_primary_blue_dark">#1f5c60</color>
|
||||
</resources>
|
27
app/src/main/res/values/strings.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<resources>
|
||||
<string name="app_name">Disroot App</string>
|
||||
<string name="action_home">Home</string>
|
||||
<string name="action_mail">Mail</string>
|
||||
<string name="action_cloud">Cloud</string>
|
||||
<string name="action_diaspora">Diaspora*</string>
|
||||
<string name="action_forum">Forum</string>
|
||||
<string name="action_chat">Chat</string>
|
||||
<string name="action_pad">Etherpad</string>
|
||||
<string name="action_calc">EtherCalc</string>
|
||||
<string name="action_bin">Zerobin</string>
|
||||
<string name="action_upload">Upload</string>
|
||||
<string name="action_searx">Searx</string>
|
||||
<string name="action_poll">Poll</string>
|
||||
<string name="action_board">Board |