1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-12-03 17:52:09 +01:00

Initial commit

This commit is contained in:
scoute-dich 2016-03-03 17:46:31 +01:00
commit 22eccee75b
104 changed files with 3479 additions and 0 deletions

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures

1
.idea/.name Normal file
View file

@ -0,0 +1 @@
Diaspora

22
.idea/compiler.xml Normal file
View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View file

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

19
.idea/gradle.xml Normal file
View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.8" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

46
.idea/misc.xml Normal file
View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

9
.idea/modules.xml Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Diaspora.iml" filepath="$PROJECT_DIR$/Diaspora.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>

View 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>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>

1
app/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

29
app/build.gradle Normal file
View file

@ -0,0 +1,29 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "de.baumann.diaspora"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.getbase:floatingactionbutton:1.9.1'
}

17
app/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/juergen/Android/Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# 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 *;
#}

View file

@ -0,0 +1,13 @@
package de.baumann.diaspora;
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);
}
}

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.baumann.diaspora">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".SplashActivity"
android:launchMode="singleInstance"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PodsActivity"
android:launchMode="singleInstance"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/title_activity_pods"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" >
</activity>
<activity
android:name=".MainActivity"
android:launchMode="singleInstance"
android:windowSoftInputMode="adjustResize"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppTheme.NoActionBar"
android:label="@string/diaspora">
</activity>
<activity
android:name=".ShareActivity"
android:launchMode="singleInstance"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/new_post"
android:screenOrientation="portrait" >
<intent-filter android:label="@string/diaspora"
android:icon="@drawable/ic_launcher">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<service
android:name=".services.GetPodsService"
android:enabled="true"
android:exported="false" >
</service>
</application>
</manifest>

View file

@ -0,0 +1,31 @@
package de.baumann.diaspora;
/**
* Created by juergen on 29.02.16.
*/
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar.SnackbarLayout;
import android.util.AttributeSet;
import android.view.View;
import com.getbase.floatingactionbutton.FloatingActionButton;
import com.getbase.floatingactionbutton.FloatingActionsMenu;
public class FloatingActionsMenuBehavior extends CoordinatorLayout.Behavior<FloatingActionsMenu> {
public FloatingActionsMenuBehavior(Context context, AttributeSet attrs) {
}
@Override
public boolean layoutDependsOn(CoordinatorLayout parent, FloatingActionsMenu child, View dependency) {
return dependency instanceof SnackbarLayout;
}
@Override
public boolean onDependentViewChanged(CoordinatorLayout parent, FloatingActionsMenu child, View dependency) {
float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight());
child.setTranslationY(translationY);
return true;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,262 @@
/*
This file is part of the Diaspora Native WebApp.
Diaspora Native WebApp 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.
Diaspora Native WebApp 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 Diaspora Native WebApp.
If not, see <http://www.gnu.org/licenses/>.
*/
package de.baumann.diaspora;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.app.ActionBarActivity;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.webkit.CookieManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.Collections;
import de.baumann.diaspora.services.GetPodsService;
import de.baumann.diaspora.utils.Helpers;
public class PodsActivity extends ActionBarActivity {
BroadcastReceiver podListReceiver;
EditText filter;
ListView lv;
ImageView imgSelectPod;
ProgressDialog progressDialog;
private static final String TAG = "Diaspora Pods";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pods);
filter = (EditText) findViewById(R.id.edtFilter);
lv = (ListView) findViewById(R.id.lstPods);
lv.setTextFilterEnabled(true);
imgSelectPod = (ImageView) findViewById(R.id.imgSelectPod);
imgSelectPod.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (filter.getText().length() > 4 && filter.getText().toString().contains("."))
askConfirmation(filter.getText().toString());
else
Snackbar.make(lv, R.string.valid_pod, Snackbar.LENGTH_LONG).show();
}
});
podListReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.hasExtra("pods")) {
Bundle extras = intent.getExtras();
String[] pods = extras.getStringArray("pods");
if (progressDialog != null)
progressDialog.dismiss();
if (pods != null && pods.length>0)
updateListview(pods);
else {
Snackbar.make(lv, R.string.podlist_error, Snackbar.LENGTH_LONG).show();
}
} else {
// List of pods empty
}
}
};
registerReceiver(podListReceiver, new IntentFilter(GetPodsService.MESSAGE));
progressDialog = new ProgressDialog(PodsActivity.this);
progressDialog.setCancelable(false);
progressDialog.setIndeterminate(true);
progressDialog.setMessage(getString(R.string.loading_podlist));
if (Helpers.isOnline(PodsActivity.this)) {
progressDialog.show();
} else {
Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show();
}
}
@Override
protected void onResume() {
super.onResume();
Intent i= new Intent(PodsActivity.this, GetPodsService.class);
startService(i);
}
private void updateListview(String[] source) {
final ArrayList<String> podList = new ArrayList<>();
for (int i = 0 ; i < source.length ; i++) {
podList.add(source[i].toLowerCase());
}
Collections.sort(podList);
final ArrayAdapter<String> adapter = new ArrayAdapter<String>(
PodsActivity.this,
android.R.layout.simple_list_item_1,
podList);
lv.setAdapter(adapter);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
askConfirmation(((TextView) view).getText().toString());
}
});
adapter.getFilter().filter(filter.getText());
filter.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
(adapter).getFilter().filter(s.toString());
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
}
});
}
public void askConfirmation(final String podDomain) {
if (Helpers.isOnline(PodsActivity.this)) {
new AlertDialog.Builder(PodsActivity.this)
.setTitle(getString(R.string.confirmation))
.setMessage(getString(R.string.confirm_pod)+podDomain+"?")
.setPositiveButton("YES",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
SharedPreferences sp = getSharedPreferences("PodSettings", MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putString("podDomain", podDomain);
editor.apply();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
try {
CookieManager.getInstance().removeAllCookies(null);
CookieManager.getInstance().removeSessionCookies(null);
} catch (Exception e) {
e.printStackTrace();
}
} else {
try {
CookieManager.getInstance().removeAllCookie();
CookieManager.getInstance().removeSessionCookie();
} catch (Exception e) {
e.printStackTrace();
}
}
Intent i = new Intent(PodsActivity.this, MainActivity.class);
dialog.cancel();
startActivity(i);
finish();
}
})
.setNegativeButton("NO", new DialogInterface.OnClickListener() {
@TargetApi(11)
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
}).show();
} else {
Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show();
}
}
@Override
public void onBackPressed() {
Snackbar snackbar = Snackbar
.make(lv, R.string.confirm_exit, Snackbar.LENGTH_LONG)
.setAction(R.string.yes, new View.OnClickListener() {
@Override
public void onClick(View view) {
moveTaskToBack(true);
}
});
snackbar.show();
}
@Override
protected void onDestroy() {
unregisterReceiver(podListReceiver);
super.onDestroy();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_pods, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.reload) {
if (Helpers.isOnline(PodsActivity.this)) {
progressDialog.show();
Intent i= new Intent(PodsActivity.this, GetPodsService.class);
startService(i);
return true;
} else {
Snackbar.make(lv, R.string.no_internet, Snackbar.LENGTH_LONG).show();
return false;
}
}
return super.onOptionsItemSelected(item);
}
}

View file

@ -0,0 +1,307 @@
/*
This file is part of the Diaspora Native WebApp.
Diaspora Native WebApp 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.
Diaspora Native WebApp 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 Diaspora Native WebApp.
If not, see <http://www.gnu.org/licenses/>.
*/
package de.baumann.diaspora;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.support.design.widget.Snackbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.webkit.JsResult;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.TextView;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import de.baumann.diaspora.utils.Helpers;
public class ShareActivity extends MainActivity {
private WebView webView;
private static final String TAG = "Diaspora Share";
private String podDomain;
private ValueCallback<Uri[]> mFilePathCallback;
private String mCameraPhotoPath;
private com.getbase.floatingactionbutton.FloatingActionsMenu fab;
private TextView txtTitle;
private ProgressBar progressBar;
@SuppressLint("SetJavaScriptEnabled")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
progressBar = (ProgressBar)findViewById(R.id.progressBar);
txtTitle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (Helpers.isOnline(ShareActivity.this)) {
txtTitle.setText(R.string.jb_stream);
Intent i = new Intent(ShareActivity.this, MainActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
finish();
} else {
Snackbar.make(v, R.string.no_internet, Snackbar.LENGTH_SHORT).show();
}
}
});
SharedPreferences config = getSharedPreferences("PodSettings", MODE_PRIVATE);
podDomain = config.getString("podDomain", null);
fab = (com.getbase.floatingactionbutton.FloatingActionsMenu) findViewById(R.id.multiple_actions);
fab.setVisibility(View.GONE);
webView = (WebView)findViewById(R.id.webView);
webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
WebSettings wSettings = webView.getSettings();
wSettings.setJavaScriptEnabled(true);
wSettings.setBuiltInZoomControls(true);
if (Build.VERSION.SDK_INT >= 21)
wSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
/*
* WebViewClient
*/
webView.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.d(TAG, url);
if (!url.contains(podDomain)) {
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(i);
return true;
}
return false;
}
public void onPageFinished(WebView view, String url) {
Log.i(TAG, "Finished loading URL: " + url);
}
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Log.e(TAG, "Error: " + description);
new AlertDialog.Builder(ShareActivity.this)
.setIcon(android.R.drawable.ic_dialog_alert)
.setMessage(description)
.setPositiveButton("CLOSE", null)
.show();
}
});
/*
* WebChromeClient
*/
webView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView wv, int progress) {
progressBar.setProgress(progress);
if (progress > 0 && progress <= 60) {
Helpers.getNotificationCount(wv);
}
if (progress > 60) {
Helpers.hideTopBar(wv);
}
if (progress == 100) {
progressBar.setVisibility(View.GONE);
} else {
progressBar.setVisibility(View.VISIBLE);
}
}
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
if (mFilePathCallback != null) mFilePathCallback.onReceiveValue(null);
mFilePathCallback = filePathCallback;
Intent 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
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), "Unable to get image", Snackbar.LENGTH_SHORT).show();
}
// 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);
contentSelectionIntent.setType("image/*");
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);
return true;
}
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
return super.onJsAlert(view, url, message, result);
}
});
Intent intent = getIntent();
final Bundle extras = intent.getExtras();
String action = intent.getAction();
if (Intent.ACTION_SEND.equals(action)) {
webView.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {
if (extras.containsKey(Intent.EXTRA_TEXT) && extras.containsKey(Intent.EXTRA_SUBJECT)) {
final String extraText = (String) extras.get(Intent.EXTRA_TEXT);
final String extraSubject = (String) extras.get(Intent.EXTRA_SUBJECT);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
finish();
Snackbar.make(webView, R.string.please_reload, Snackbar.LENGTH_LONG).show();
Intent i = new Intent(ShareActivity.this, MainActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
return false;
}
});
webView.loadUrl("javascript:(function() { " +
"document.getElementsByTagName('textarea')[0].style.height='110px'; " +
"document.getElementsByTagName('textarea')[0].innerHTML = '[" + extraSubject + "](" + extraText + ") #ViaDiasporaNativeWebApp'; " +
" if(document.getElementById(\"main_nav\")) {" +
" document.getElementById(\"main_nav\").parentNode.removeChild(" +
" document.getElementById(\"main_nav\"));" +
" } else if (document.getElementById(\"main-nav\")) {" +
" document.getElementById(\"main-nav\").parentNode.removeChild(" +
" document.getElementById(\"main-nav\"));" +
" }" +
"})();");
}
}
});
}
if (savedInstanceState == null) {
if (Helpers.isOnline(ShareActivity.this)) {
webView.loadUrl("https://"+podDomain+"/status_messages/new");
} else {
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_SHORT).show();
}
}
}
private File createImageFile() throws IOException {
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "JPEG_" + timeStamp + "_";
File storageDir = Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES);
return File.createTempFile(
imageFileName, /* prefix */
".jpg", /* suffix */
storageDir /* directory */
);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_compose, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.reload) {
if (Helpers.isOnline(ShareActivity.this)) {
webView.reload();
return true;
} else {
Snackbar.make(getWindow().findViewById(R.id.drawer_layout), R.string.no_internet, Snackbar.LENGTH_SHORT).show();
return false;
}
}
return super.onOptionsItemSelected(item);
}
}

View file

@ -0,0 +1,71 @@
/*
This file is part of the Diaspora Native WebApp.
Diaspora Native WebApp 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.
Diaspora Native WebApp 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 Diaspora Native WebApp.
If not, see <http://www.gnu.org/licenses/>.
*/
package de.baumann.diaspora;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.WindowManager;
import android.widget.ImageView;
import java.util.Timer;
import java.util.TimerTask;
public class SplashActivity extends AppCompatActivity {
ImageView imgSplash;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash);
imgSplash = (ImageView) findViewById(R.id.imgSplash);
TypedArray images = getResources().obtainTypedArray(R.array.splash_images);
int choice = (int) (Math.random() * images.length());
imgSplash.setImageResource(images.getResourceId(choice, R.drawable.splashscreen1));
images.recycle();
final SharedPreferences config = getSharedPreferences("PodSettings", MODE_PRIVATE);
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
Intent i;
if (config.getString("podDomain", null) != null) {
i = new Intent(SplashActivity.this, MainActivity.class);
} else {
i = new Intent(SplashActivity.this, PodsActivity.class);
}
startActivity(i);
finish();
}
}, 2000);
}
}

View file

@ -0,0 +1,139 @@
/*
This file is part of the Diaspora Native WebApp.
Diaspora Native WebApp 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.
Diaspora Native WebApp 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 Diaspora Native WebApp.
If not, see <http://www.gnu.org/licenses/>.
*/
package de.baumann.diaspora.services;
import android.app.Service;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.IBinder;
import android.util.Log;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class GetPodsService extends Service {
public static final String MESSAGE = "de.baumann.diaspora.podsreceived";
private static final String TAG = "Diaspora Pod Service";
public GetPodsService() { }
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
getPods();
return super.onStartCommand(intent, flags, startId);
}
private void getPods() {
/*
* Most of the code in this AsyncTask is from the file getPodlistTask.java
* from the app "Diaspora Webclient".
* A few modifications and adaptations were made by me.
* Source:
* https://github.com/voidcode/Diaspora-Webclient/blob/master/src/com/voidcode/diasporawebclient/getPodlistTask.java
* Thanks to Terkel Sørensen
*/
AsyncTask<Void, Void, String[]> getPodsAsync = new AsyncTask<Void, Void, String[]>() {
@Override
protected String[] doInBackground(Void... params) {
// TODO: Update deprecated code
StringBuilder builder = new StringBuilder();
HttpClient client = new DefaultHttpClient();
List<String> list = null;
try {
HttpGet httpGet = new HttpGet("http://podupti.me/api.php?key=4r45tg&format=json");
HttpResponse response = client.execute(httpGet);
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode == 200) {
HttpEntity entity = response.getEntity();
InputStream content = entity.getContent();
BufferedReader reader = new BufferedReader(
new InputStreamReader(content));
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);
}
} else {
//TODO Notify User about failure
Log.e(TAG, "Failed to download list of pods");
}
} catch (IOException e) {
//TODO handle json buggy feed
e.printStackTrace();
}
//Parse the JSON Data
try {
JSONObject j = new JSONObject(builder.toString());
JSONArray jr = j.getJSONArray("pods");
Log.d(TAG, "Number of entries " + jr.length());
list = new ArrayList<String>();
for (int i = 0; i < jr.length(); i++) {
JSONObject jo = jr.getJSONObject(i);
Log.d(TAG, jo.getString("domain"));
String secure = jo.getString("secure");
if (secure.equals("true"))
list.add(jo.getString("domain"));
}
} catch (Exception e) {
//TODO Handle Parsing errors here
e.printStackTrace();
}
if (list != null)
return list.toArray(new String[list.size()]);
else
return null;
}
@Override
protected void onPostExecute(String[] strings) {
Intent broadcastIntent = new Intent(MESSAGE);
if (strings != null)
broadcastIntent.putExtra("pods", strings);
sendBroadcast(broadcastIntent);
stopSelf();
}
};
getPodsAsync.execute();
}
@Override
public IBinder onBind(Intent intent) {
// TODO: Return the communication channel to the service.
throw new UnsupportedOperationException("Not yet implemented");
}
}

View file

@ -0,0 +1,64 @@
/*
This file is part of the Diaspora Native WebApp.
Diaspora Native WebApp 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.
Diaspora Native WebApp 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 Diaspora Native WebApp.
If not, see <http://www.gnu.org/licenses/>.
*/
package de.baumann.diaspora.utils;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.webkit.WebView;
public class Helpers {
public static boolean isOnline(Context context){
ConnectivityManager cnm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo ni = cnm.getActiveNetworkInfo();
return ni != null && ni.isConnectedOrConnecting();
}
public static void hideTopBar(WebView wv) {
wv.loadUrl("javascript: ( function() {" +
" if(document.getElementById('main_nav')) {" +
" document.getElementById('main_nav').parentNode.removeChild(" +
" document.getElementById('main_nav'));" +
" } else if (document.getElementById('main-nav')) {" +
" document.getElementById('main-nav').parentNode.removeChild(" +
" document.getElementById('main-nav'));" +
" }" +
"})();");
}
public static void getNotificationCount(WebView wv) {
wv.loadUrl("javascript: ( function() {" +
" if (document.getElementById('notification')) {" +
" var count = document.getElementById('notification').innerHTML;" +
" NotificationCounter.setNotificationCount(count.replace(/(\\r\\n|\\n|\\r)/gm, \"\"));" +
" } else {" +
" NotificationCounter.setNotificationCount('0');" +
" }" +
" if (document.getElementById('conversation')) {" +
" var count = document.getElementById('conversation').innerHTML;" +
" NotificationCounter.setConversationCount(count.replace(/(\\r\\n|\\n|\\r)/gm, \"\"));" +
" } else {" +
" NotificationCounter.setConversationCount('0');" +
" }" +
"})();");
}
}

View file

@ -0,0 +1,52 @@
package de.baumann.diaspora.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
public class PrefManager {
private final Context context;
private boolean loadImages = true;
private int minimumFontSize = 0;
public PrefManager(Context ctx) {
SharedPreferences sp = null;
this.context = ctx;
try {
sp = PreferenceManager.getDefaultSharedPreferences(context);
} catch (Exception e) {
e.printStackTrace();
}
if (sp != null) {
loadImages = sp.getBoolean("loadImages", true);
minimumFontSize = sp.getInt("minimumFontSize", 8);
}
}
public boolean getLoadImages() {
return loadImages;
}
public void setLoadImages(boolean loadImages) {
this.loadImages = loadImages;
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
Editor edit = sp.edit();
edit.putBoolean("loadImages", loadImages);
edit.commit();
}
public int getMinimumFontSize() {
return minimumFontSize;
}
public void setMinimumFontSize(int minimumFontSize) {
this.minimumFontSize = minimumFontSize;
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
Editor edit = sp.edit();
edit.putInt("minimumFontSize", minimumFontSize);
edit.commit();
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/label_background"/>
<padding
android:left="16dp"
android:top="4dp"
android:right="16dp"
android:bottom="4dp"/>
<corners
android:radius="2dp"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 KiB

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>

View file

@ -0,0 +1,52 @@
<RelativeLayout 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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:id="@+id/podsLayout"
tools:context="ar.com.tristeslostrestigres.diasporanativewebapp.PodsActivity">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/lstPods"
android:choiceMode="singleChoice"
android:layout_below="@+id/edtFilter"
android:layout_above="@+id/textView" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edtFilter"
android:layout_alignParentTop="true"
android:hint="@string/filter_hint"
android:layout_toLeftOf="@+id/imgSelectPod"
android:layout_toStartOf="@+id/imgSelectPod"
android:inputType="textUri|textWebEditText" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:paddingLeft="5dp"
android:id="@+id/imgSelectPod"
android:src="@mipmap/ic_arrow_right_grey600_24dp"
android:layout_above="@+id/lstPods"
android:layout_alignRight="@+id/lstPods"
android:layout_alignEnd="@+id/lstPods"
android:layout_alignTop="@+id/edtFilter"
android:contentDescription="@string/confirm_url" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/podlist_source_note"
android:id="@+id/textView"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>

View file

@ -0,0 +1,16 @@
<RelativeLayout 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"
tools:context="ar.com.tristeslostrestigres.diasporanativewebapp.SplashActivity">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imgSplash"
android:src="@drawable/splashscreen1"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
android:contentDescription="@string/splash_screen_description" />
</RelativeLayout>

View file

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="de.baumann.myapplication.MainActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/multiple_actions"
fab:fab_addButtonColorNormal="@color/fab_big"
fab:fab_addButtonColorPressed="@color/fab_big_pressed"
fab:fab_addButtonPlusIconColor="@color/white"
fab:fab_labelStyle="@style/menu_labels_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginRight="8dp"
android:layout_marginBottom="4dp"
app:layout_behavior="de.baumann.diaspora.FloatingActionsMenuBehavior">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fab3_click"
fab:fab_colorNormal="@color/fab_small"
fab:fab_icon="@drawable/fab_top"
fab:fab_title="@string/fab3_title"
fab:fab_colorPressed="@color/fab_small_pressed"
fab:fab_labelStyle="@style/menu_labels_style"
fab:fab_size="mini" />
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fab2_click"
fab:fab_colorNormal="@color/fab_small"
fab:fab_icon="@drawable/fab_search"
fab:fab_title="@string/fab2_title"
fab:fab_colorPressed="@color/fab_small_pressed"
fab:fab_labelStyle="@style/menu_labels_style"
fab:fab_size="mini" />
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_compose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="fab1_click"
fab:fab_colorNormal="@color/fab_small"
fab:fab_icon="@drawable/fab_compose"
fab:fab_title="@string/fab1_title"
fab:fab_colorPressed="@color/fab_small_pressed"
fab:fab_size="mini" />
</com.getbase.floatingactionbutton.FloatingActionsMenu>
</android.support.design.widget.CoordinatorLayout>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="de.baumann.myapplication.MainActivity"
tools:showIn="@layout/app_bar_main">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/webView"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</android.support.v4.widget.SwipeRefreshLayout>
<ProgressBar
android:minHeight="4dip"
android:maxHeight="4dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@android:style/Widget.ProgressBar.Horizontal"
android:id="@+id/progressBar"
android:progressTint="@color/fab_big" />
</RelativeLayout>

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RadioGroup
android:id="@+id/genderRadioGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/myCheckBox" >
<RadioButton
android:id="@+id/radNormal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/normal" />
<RadioButton
android:id="@+id/radLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/large" />
<RadioButton
android:id="@+id/radLarger"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/huge" />
</RadioGroup>
</LinearLayout>

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="190dp"
android:background="@color/colorAccent"
android:gravity="bottom"
android:orientation="vertical"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/imageView2"
android:src="@drawable/header"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:src="@drawable/ic_launcher"
android:layout_above="@+id/textView2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/white"
android:textSize="16dp"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:layout_above="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/textView2" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_copyright"
android:textColor="@color/white"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_horizontal_margin"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item
android:id="@+id/jb_stream"
android:icon="@drawable/jb_stream"
android:title="@string/jb_stream" />
<item
android:id="@+id/jb_followed_tags"
android:icon="@drawable/jb_tag2"
android:title="@string/jb_followed_tags" />
<item
android:id="@+id/jb_aspects"
android:icon="@drawable/jb_aspects"
android:title="@string/jb_aspects" />
<item
android:id="@+id/jb_activities"
android:icon="@drawable/jb_activities"
android:title="@string/jb_activities" />
<item
android:id="@+id/jb_liked"
android:icon="@drawable/jb_heart"
android:title="@string/jb_liked" />
<item
android:id="@+id/jb_commented"
android:icon="@drawable/jb_commented"
android:title="@string/jb_commented" />
<item
android:id="@+id/jb_mentions"
android:icon="@drawable/jb_mentions"
android:title="@string/jb_mentions" />
<item
android:id="@+id/jb_public"
android:icon="@drawable/jb_aspects"
android:title="@string/jb_public" />
</group>
<item android:title="@string/jb_menu_1">
<menu>
<item
android:id="@+id/jb_settings_view"
android:icon="@drawable/jb_settings"
android:title="@string/jb_settings_view" />
<item
android:id="@+id/jb_settings_diaspora"
android:icon="@drawable/jb_stream"
android:title="@string/jb_settings_diaspora" />
<item
android:id="@+id/jb_license_help"
android:icon="@drawable/jb_license"
android:title="@string/jb_help_license" />
</menu>
</item>
</menu>

View file

@ -0,0 +1,20 @@
<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/reload"
android:icon="@drawable/ic_sync_white_24dp"
android:title="@string/reload"
android:orderInCategory="109"
app:showAsAction="ifRoom" />
<!--<item-->
<!--android:id="@+id/exit_app"-->
<!--android:title="@string/exit_app"-->
<!--android:orderInCategory="110"-->
<!--android:icon="@drawable/ic_exit_to_app_white_24dp"-->
<!--app:showAsAction="always" />-->
</menu>

View file

@ -0,0 +1,38 @@
<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/notifications"
android:icon="@drawable/ic_bell_outline_white_24dp"
android:title="@string/notifications"
app:showAsAction="always" />
<item
android:id="@+id/conversations"
android:icon="@drawable/ic_message_text_outline_white_24dp"
android:title="@string/messages"
app:showAsAction="always" />
<item
android:id="@+id/help_license"
android:title="@string/jb_help_license"
app:showAsAction="never" />
<item
android:id="@+id/view"
android:title="@string/jb_settings_view"
app:showAsAction="never" />
<item
android:id="@+id/share"
android:title="@string/jb_share"
app:showAsAction="never" />
<item
android:id="@+id/exit"
android:icon="@drawable/ic_sync_white_24dp"
android:title="@string/exit_app"
app:showAsAction="never" />
</menu>

View file

@ -0,0 +1,12 @@
<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="ar.com.tristeslostrestigres.diasporanativewebapp.PodsActivity">
<item
android:id="@+id/reload"
android:title="@string/reload"
android:icon="@drawable/ic_sync_white_24dp"
android:orderInCategory="100"
app:showAsAction="ifRoom" />
</menu>

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="reload">Neu laden</string>
<string name="title_activity_pods">Pod auswählen</string>
<string name="filter_hint">Pod-Domain eingeben</string>
<string name="exit_app">App beenden</string>
<string name="confirm_url">Pod-Adresse bestätigen</string>
<string name="podlist_source_note">Anmerkung: Auf dieser Liste finden sich nur Einträge von podupti.me</string>
<string name="valid_pod">Bitte einen gültigen Domain-Namen (URL) eingeben</string>
<string name="podlist_error">Fehler: Konnte die Podliste nicht abfragen!</string>
<string name="loading_podlist">Podliste wird geladen...</string>
<string name="no_internet">Entschuldigung, du musst mit dem Internet verbunden sein um fortzufahren.</string>
<string name="confirmation">Bestätigung</string>
<string name="confirm_pod">Willst du folgenden Pod benutzen: </string>
<string name="confirm_exit">Möchtest du die App verlassen?</string>
<string name="yes">JA</string>
<string name="no">NEIN</string>
<string name="change_pod_warning">Das wird alle Cookies und Session-Daten löschen. Willst du wirklich den Pod wechseln?</string>
<string name="permissions">Du musst der App Zugriff auf den Gerätespeicher gewähren, damit das Bildschirmfoto
gespeichert werden kann. Danach solltest du die Anwendung komplett schließen oder das Telefon neu starten.
Wenn du den Zugriff verweigerst und die Funktion später doch nutzen willst, kannst du die Berechtigung
nachträglich erteilen. Öffne dafür: Systemeinstellungen - Apps - Wetter. Im Bereich Berechtigungen kannst
dann die entsprechende Einstellung vornehmen.</string>
// Drawer and App
<string name="jb_menu_1">Einstellungen</string>
<string name="jb_stream">Stream</string>
<string name="jb_notifications">Benachrichtigungen</string>
<string name="jb_conversations">Unterhaltungen</string>
<string name="jb_liked">Gelikete Beiträge</string>
<string name="jb_commented">Kommentierte Beiträge</string>
<string name="jb_contacts">Kontakte</string>
<string name="jb_mentions">Erwähnungen</string>
<string name="jb_activities">Meine Aktivitäten</string>
<string name="jb_followed_tags">Verfolgte Tags</string>
<string name="jb_manage_tags">Tags verwalten</string>
<string name="jb_settings">Persönliche Einstellungen</string>
<string name="jb_aspects">Meine Aspekte</string>
<string name="jb_pod">Pod wechseln</string>
<string name="jb_public">Öffentliche Aktivitäten</string>
// Floating Action Buttons - Titles
<string name="fab3_title">Nach oben scrollen</string>
<string name="fab2_title">Suche nach Tags oder Personen ...</string>
<string name="fab1_title">Neuer Beitrag</string>
<string name="search_alert_title">Suche</string>
<string name="search_alert_tag">nach Tags</string>
<string name="search_alert_people">nach Personen</string>
<string name="search_alert_bypeople_validate_needsomedata">Füge einen Namen ein.</string>
<string name="search_alert_bytags_validate_needsomedata">Versuche einen Tag wie: #neuhier oder #kunst</string>
//Dialog
//Dialog
<string name="messages">Unterhaltungen</string>
<string name="new_post">Neuer Beitrag</string>
<string name="notifications">Benachrichtigungen</string>
<string name="settings_font">Schriftgröße ändern</string>
<string name="settings_image">Bilder laden umschalten</string>
<string name="settings_view">Ansicht wechseln</string>
<string name="please_reload">Bitte den Stream neu laden.</string>
<string name="normal">normal</string>
<string name="large">groß</string>
<string name="huge">riesig</string>
<string name="image">Konnte Bild nicht laden ...</string>
<string name="jb_share">Inhalt Teilen</string>
<string name="share_link">Link als Text teilen</string>
<string name="share_screenshot">Bildschirmfoto teilen</string>
<string name="take_screenshot">Bildschirmfoto machen</string>
<string name="toast_screenshot">Bildschirmfoto wird gespeichert...</string>
<string name="jb_settings_diaspora">Diaspora Einstellungen</string>
<string name="jb_settings_view">Ansichtseinstellungen</string>
<string name="about_no">OK</string>
<string name="help_help">Markdown Formatierung</string>
<string name="help_license">Lizenz</string>
<string name="jb_help_license">Lizenz | Hilfe | Spende</string>
<string name="markdown_text">"Auf Diaspora* ist es möglich, dass du deinen Text in Nachrichten, Kommentaren und Unterhaltungen formatierst, indem du ein vereinfachtes Mark-Up-System namens Markdown verwendest. Diese Seite stellt eine kurze Einleitung dar, um grundlegende Formatierungen anwenden zu können.\n\n
Überschriften\n
# das ist eine sehr große Überschrift\n
## halb so groß wie die oben drüber\n
### doppelt so groß wie normaler Text\n\n
Kursiv und fett\n
Kursiv: *Wort* oder _Wort_\n
Fett: **Wort** oder __Wort__\n
Fett kursiv: ***Wort*** oder ___Wort___\n\n
Aufzählung\n
*, + oder - vor jeder Linie die du als Teil der Aufzählung haben willst oder 1., 2., usw. vor jedem Aufzählungspunkt.\n\n
Zitat\n
Wenn du einen Teil eines Artikels oder eines anderen Kommentares zitieren willst, kannst du deinen Text bequem formatieren, indem du die Zeile oder den Abschnitt mit einem > Zeichen beginnst.\n\n
Horizontale Linie\n
Um eine horizontale Linie zu erstellen benutzt du mindestens drei - - -, _ _ _ oder * * * in einer separaten Linie. Jede größere Anzahl bewirkt dasselbe und Leerzeichen zwischen den Zeichen stören nicht.\n\n
Inline Link\n
[displayed text here](http://link.address.here \"alt text\") Der 'alt text' ist optional, und zeigt einen Tool-Tip, wenn der Curser sich über den Link bewegt.\n\n
Externe Bilder\n
![Alt text](http://website.com/image.jpg \"optional title\") Der 'alt text' in der eckigen Klammer wird angezeigt, wenn das Bild nicht geladen werden kann. Der optionale Titel zeigt einen Tool-Tip, wenn der Curser sich über den Link bewegt. Beides ist nützlich aber nicht nötig.\n\n
Escape\n
Wenn du in deiner Nachricht ein Zeichen benutzen willst, das ebenfalls zur Markdownformatierung verwendet wird, kannst du verhindern, dass es von Markdown als Formatcode gelesen wird, indem du es 'escapest'. Um dies zu tun, musst du einen Backslash vor das Zeichen setzen. Du kannst trotzdem 'diaspora*' oder 'D*' schreiben, ohne dass das Sternchen als formatierender Code gelesen wird!\n\n
Sonderzeichen\n
Du kannst Symbole und Sonderzeichen nutzen, indem du bestimmte Zeichenfolgen verwendest. Z.B.:\n
(c) = © ; (r) = ® ; x^2 = x²"</string>
<string name="about_yes">Besuche die Projektseite auf GitHub</string>
<string name="about_text">Zuerst einmal: ich bin kein Entwickler. Ich verstehe ein paar Grundlagen, aber das Meiste meiner
Arbeit ist mit \"Copy and Paste\" passiert. Diese App ist ein Fork der original \"DiasporaNativeWebApp\"
von \"martinchodev\" (der die allermeiste Arbeit erledigt hat -> mein großer Dank gilt ihm), welche unter der GPL-Lizenz
veröffentlicht wurde.\n\n
This program 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.
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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.\n\n
Die Bilder des Startbildschirms können auf Flickr gefunden werden:
https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123/.
Sie wurden von \"Lydia\" veröffentlicht und stehen unter der cc by-nc-sa Lizenz.</string>
<string name="fab2_title_person">Suche nach Personen ...</string>
<string name="fab2_title_tag">Suche nach Tags ...</string>
<string name="donate_1">per Bitcoin</string>
<string name="donate_text">Wenn dir die App gefällt, kannst du dem Entwickler der original \"DiasporaNativeWebApp\"
eine Kleinigkeit spenden:</string>
<string name="help_donate">Spenden</string>
<string name="splash_screen_description">Startbildschirm</string>
</resources>

View file

@ -0,0 +1,9 @@
<resources>>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>

View file

@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View file

@ -0,0 +1,21 @@
<resources>
<string name="app_name" translatable="false">Diaspora Native WebApp</string>
<string name="reload">Reload</string>
<string name="title_activity_pods">Select Pod</string>
<string name="filter_hint">Enter pod domain</string>
<string name="exit_app">Exit app</string>
<string name="confirm_url">Confirm pod url</string>
<string name="diaspora" translatable="false">Diaspora</string>
<string name="podlist_source_note">Note: This list is populated with only the secure pods from podupti.me</string>
<string name="valid_pod">Please enter a valid domain name</string>
<string name="podlist_error">Error: Could not retrieve list of pods!</string>
<string name="loading_podlist">Loading pod list ...</string>
<string name="no_internet">Sorry, you must be connected to the Internet to proceed</string>
<string name="confirmation">Confirmation</string>
<string name="confirm_pod">Do you want to use the pod: </string>
<string name="confirm_exit">Are you sure you want to exit?</string>
<string name="yes">YES</string>
<string name="no">NO</string>
<string name="change_pod_warning">This will erase all cookies and session data. Do you really want to change pods?</string>
<string name="new_post">New post</string>
</resources>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#607d8b</color>
<color name="colorPrimaryDark">#607d8b</color>
<color name="colorAccent">#ff9800</color>
<color name="fab_big">#ff9800</color>
<color name="fab_big_pressed">#ffb74d</color>
<color name="fab_small">#607d8b</color>
<color name="fab_small_pressed">#90a4ae</color>
<color name="label_background">#99212121</color>
<color name="label_text">#ffffff</color>
<color name="white">#ffffff</color>
</resources>

View file

@ -0,0 +1,8 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="nav_header_vertical_spacing">16dp</dimen>
<dimen name="nav_header_height">160dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View file

@ -0,0 +1,166 @@
<resources>
//Application
<string name="navigation_drawer_open" translatable="false">Open navigation drawer</string>
<string name="navigation_drawer_close" translatable="false">Close navigation drawer</string>
<string name="app_name" translatable="false">Diaspora</string>
<string name="reload">Reload</string>
<string name="permissions">You must grant \"Access Storage Permission\" to save screenshots. After that you should
completely close the app or restart the phone. If you don\'t permit the storage access but want to use the
screenshot function at a later time, you can grant the permission later. Please open then: systemsettings - apps -
weather. In the permissions section you can grant the \"write storage permission\".</string>
//Pod Activity
<string name="title_activity_pods">Select Pod</string>
<string name="filter_hint">Enter pod domain</string>
<string name="confirm_url">Confirm pod url</string>
<string name="podlist_source_note">Note: This list is populated with only the secure pods from podupti.me</string>
<string name="valid_pod">Please enter a valid domain name</string>
<string name="podlist_error">Error: Could not retrieve list of pods!</string>
<string name="loading_podlist">Loading pod list ...</string>
<string name="no_internet">Sorry, you must be connected to the Internet to proceed</string>
<string name="confirmation">Confirmation</string>
<string name="confirm_pod">Do you want to use the pod: </string>
<string name="confirm_exit">Do you want to exit?</string>
<string name="yes">YES</string>
<string name="no">NO</string>
<string name="change_pod_warning">This will erase all cookies and session data. Do you really want to change pods?</string>
<string name="new_post">New</string>
<string name="notifications">Notifications</string>
<string name="messages">Conversations</string>
// Drawer and App
<string name="app_copyright" translatable="false">The community-run distributed social network</string>
<string name="jb_menu_1">Settings</string>
<string name="jb_help_license">License | Help | Donate</string>
<string name="jb_stream">Stream</string>
<string name="jb_notifications">Notifications</string>
<string name="jb_conversations">Conversations</string>
<string name="jb_liked">Liked</string>
<string name="jb_commented">Commented</string>
<string name="jb_contacts">Contacts</string>
<string name="jb_mentions">Mentions</string>
<string name="jb_activities">My activity</string>
<string name="jb_followed_tags">Followed Hashtags</string>
<string name="jb_manage_tags">Manage Hashtags</string>
<string name="jb_settings">Personal settings</string>
<string name="jb_aspects">My aspects</string>
<string name="jb_pod">Change pod</string>
<string name="jb_public">Public activities</string>
<string name="jb_settings_view">View settings</string>
<string name="jb_settings_diaspora">Diaspora settings</string>
<string name="jb_share">Share content</string>
<string name="settings_font">Change font size</string>
<string name="settings_image">Toggle image loading</string>
<string name="settings_view">Change view</string>
<string name="share_link">Share link as text</string>
<string name="share_screenshot">Share screenshot of webpage</string>
<string name="take_screenshot">Take screenshot of webpage</string>
<string name="help_license">License</string>
<string name="help_help">Markdown formating</string>
<string name="help_donate">Donate</string>
<string name="toast_screenshot">Taking screenshot ...</string>
// Floating Action Buttons - Titles
<string name="fab3_title">Go to top</string>
<string name="fab2_title">Search by tags or persons</string>
<string name="fab2_title_tag">Search for tag ...</string>
<string name="fab2_title_person">Search for person ...</string>
<string name="fab1_title">New message</string>
<string name="search_alert_title">Search</string>
<string name="search_alert_tag">by tags</string>
<string name="search_alert_people">by people</string>
<string name="search_alert_bypeople_validate_needsomedata">Please add a name</string>
<string name="search_alert_bytags_validate_needsomedata">Try to add a tag like: #newhere or #art</string>
//Dialog //License
<string name="markdown_text">"On diaspora* it's possible to format your text in status messages, comments and conversations using a simplified mark-up system called Markdown. This page gives an introduction to the codes used to create this formatting.\n\n
Heading\n
# This is an extremely large header\n
## Half as big as the one above\n
### Twice the size of normal text\n\n
Italics and bold\n
Italics: *word* or _word_\n
Bold: **word** or __word__\n
Bold italics: ***word*** or ___word___\n\n
Bulleted list\n
*, + or - in front of each line you want as part of the list or 1., 2., etc. in front of the list items\n\n
Quotation\n
When you want to quote an extract of an article or another comment, you can conveniently format your text by starting the line or the paragraph by the > character\n\n
Horizontal line\n
To create a horizontal line, use at least three - - -, _ _ _ or * * * on a separate line. Any number above three will do the same thing and spaces between the characters do not matter.\n\n
Inline link\n
[displayed text here](http://link.address.here \"alt text\") The 'alt text' is optional, and is displayed as a tool-tip when the cursor is moved over the link.\n\n
External images\n
![Alt text](http://website.com/image.jpg \"optional title\") The alternative text in the square brackets is displayed if the image cannot be loaded, and the optional title is displayed as a tool-tip when the cursor is moved over the image; both are useful but not essential.\n\n
Escape\n
If you want your message to include a character which is also used in Markdown coding, you can prevent it from being read by Markdown as a formatting code by 'escaping' it. To do this, place a backslash in front of the character. You can, however, type 'diaspora*' or 'D*' without the asterisk becoming a formatting code!\n\n
Special characters\n
You can create the following symbols and other special characters using a combination of characters:\n
(c) = © ; (r) = ® ; x^2 = x²"</string>
<string name="donate_text">If you like the app fell free to donate to the devoloper of the original \"DiasporaNativeWebApp\":</string>
<string name="donate_1">Via Bitcoin</string>
<string name="about_yes">Visit projectsite on Github</string>
<string name="about_no">OK</string>
<string name="about_title" translatable="false">Copyright © 2016 by scoute-dich</string>
<string name="about_text">First of all: I am not a developer. I understand a few basics and most of my work is done
by copy and paste. This app is a fork of the original \"DiasporaNativeWebApp\"
from \"martinchodev\" (who did most of the work -> big thanks to him), which is released under the GPL-license.\n\n
This program 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.
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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.\n\n
The splashscreen images can be found on flickr: https://www.flickr.com/photos/129581906@N06/sets/72157651933980136/with/16594947123/.
They were published by \"Lydia\" and are licensed under cc by-nc-sa.</string>
<string name="splash_screen_description">Splash screen</string>
<string name="please_reload">Please reload the stream</string>
<string name="normal">Normal</string>
<string name="large">Large</string>
<string name="huge">Huge</string>
<string name="image">Unable to get image</string>
<array name="splash_images">
<item>@drawable/splashscreen1</item>
<item>@drawable/splashscreen2</item>
<item>@drawable/splashscreen3</item>
<item>@drawable/splashscreen4</item>
<item>@drawable/splashscreen5</item>
<item>@drawable/splashscreen6</item>
</array>
</resources>

View file

@ -0,0 +1,25 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="menu_labels_style">
<item name="android:background">@drawable/fab_label_background</item>
<item name="android:textColor">@color/label_text</item>
</style>
</resources>

View file

@ -0,0 +1,15 @@
package de.baumann.diaspora;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}

23
build.gradle Normal file
View file

@ -0,0 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

18
gradle.properties Normal file
View file

@ -0,0 +1,18 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more