Fixed taiga. Added padland, State, Howto, exit, intent filter and reload

This commit is contained in:
Massimiliano Lentini 2018-09-09 17:41:03 +02:00
parent c66b7de5f7
commit c19049e8cf
17 changed files with 259 additions and 162 deletions

View file

@ -14,8 +14,8 @@
<option name="values">
<map>
<entry key="assetSourceType" value="FILE" />
<entry key="outputName" value="ic_user" />
<entry key="sourceFile" value="$PROJECT_DIR$/../DisIcons/user.svg" />
<entry key="outputName" value="ic_reload" />
<entry key="sourceFile" value="$PROJECT_DIR$/../DisIcons/reload.svg" />
</map>
</option>
</PersistentState>

View file

@ -16,3 +16,7 @@
* Pad icon redirects to Padland
* Added link to disroot's state
* Fixed Blank loading of Taiga board
* Added link to how to
* Added exit button
* Tapping on a disroot domain from external app (such as browser or chat app) opens Disroot app
* Added reload button

View file

@ -15,7 +15,6 @@
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
@ -23,9 +22,18 @@
android:name="org.disroot.disrootapp.ui.MainActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:label="@string/app_name" />
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="*.disroot.org"
android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name="org.disroot.disrootapp.AboutActivity"
android:name="org.disroot.disrootapp.ui.AboutActivity"
android:label="@string/title_activity_about"
android:theme="@style/DisTheme"></activity>
</application>

View file

@ -1,4 +1,4 @@
package org.disroot.disrootapp;
package org.disroot.disrootapp.ui;
import android.support.design.widget.TabLayout;
import android.support.design.widget.FloatingActionButton;

View file

@ -1,15 +1,13 @@
package org.disroot.disrootapp.ui;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.drawable.BitmapDrawable;
import android.content.SharedPreferences;
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.DisplayMetrics;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Menu;
@ -21,16 +19,12 @@ import android.view.animation.TranslateAnimation;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.example.webview.R;
import org.disroot.disrootapp.AboutActivity;
import org.disroot.disrootapp.utils.Constants;
import org.disroot.disrootapp.utils.DeviceProvider;
import org.disroot.disrootapp.webviews.DisWebChromeClient;
import org.disroot.disrootapp.webviews.DisWebViewClient;
@ -42,6 +36,9 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
private WebView webView;
private DisWebChromeClient disWebChromeClient;
Button button;
SharedPreferences firstStart = null;//first start
@Override
public void onCreate(Bundle savedInstanceState) {
@ -50,6 +47,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
FrameLayout frameLayoutContainer = (FrameLayout) findViewById(R.id.framelayout_container);
ViewGroup viewLoading = (ViewGroup) findViewById(R.id.linearlayout_view_loading_container);
setupWebView(savedInstanceState, frameLayoutContainer, viewLoading);
firstStart = getSharedPreferences("org.disroot.disrootap", MODE_PRIVATE);//fisrt start
// enables the activity icon as a 'home' button. required if "android:targetSdkVersion" > 14
//getActionBar().setHomeButtonEnabled(true);
@ -232,6 +230,16 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
});
button = (Button) findViewById(R.id.HowtoBtn);//AboutBtn
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
webView.loadUrl(Constants.URL_DisApp_HOWTO);
webView.setVisibility(View.VISIBLE);
dashboard.setVisibility(View.GONE);
}
});
button = (Button) findViewById(R.id.AboudBtn);//AboutBtn
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
@ -244,9 +252,9 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
private void showCloudInfo() {
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
builder.setTitle(R.string.MailInfoTitle);
builder.setTitle(R.string.CloudInfoTitle);
//builder.setMessage(getString(R.string.activity_main_manteiners, DeviceProvider.getAppVersion(this)));
builder.setMessage(getString(R.string.MailInfo));
builder.setMessage(getString(R.string.CloudInfo));
builder.setPositiveButton(R.string.global_ok, null);
builder.show();
}
@ -275,6 +283,23 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
super.onResume();
webView.resumeTimers();
webView.onResume();
//inetnt filter get url from external
final ScrollView dashboard = (ScrollView)findViewById(R.id.dashboard);
Uri url = getIntent().getData();
if (url != null) {
Log.d("TAG", "URL Foud");
Log.d("TAG", "Url is :" + url);
webView.setVisibility(View.VISIBLE);
dashboard.setVisibility(View.GONE);
webView.loadUrl(url.toString());
}
//first start
if (firstStart.getBoolean("firstrun", true)) {
// Do first run stuff here then set 'firstrun' as false
showWelcome();
// using the following line to edit/commit prefs
firstStart.edit().putBoolean("firstrun", false).apply();
}
}
@Override
@ -307,7 +332,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
//if(featureId == Window.FEATURE_ACTION_BAR && menu != null){
if(menu.getClass().getSimpleName().equals("MenuBuilder")){
try{
Method m = menu.getClass().getDeclaredMethod(
@SuppressLint("PrivateApi") Method m = menu.getClass().getDeclaredMethod(
"setOptionalIconsVisible", Boolean.TYPE);
m.setAccessible(true);
m.invoke(menu, true);
@ -324,6 +349,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
ScrollView dashboard = (ScrollView)findViewById(R.id.dashboard);
@ -355,113 +381,124 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
}
else
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);
case R.id.action_reload: {
String url = webView.getUrl();
webView.loadUrl(url);
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);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_chat:
String Conversations = "eu.siacs.conversations";
Intent xmpp = getPackageManager().getLaunchIntentForPackage(Conversations);
if(xmpp == null) {
xmpp = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+Conversations));
}
startActivity(xmpp);
return true;
case R.id.action_pad:
webView.loadUrl(Constants.URL_DisApp_PAD);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_calc:
webView.loadUrl(Constants.URL_DisApp_CALC);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_bin:
webView.loadUrl(Constants.URL_DisApp_BIN);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_upload:
webView.loadUrl(Constants.URL_DisApp_UPLOAD);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_searx:
webView.loadUrl(Constants.URL_DisApp_SEARX);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_poll:
webView.loadUrl(Constants.URL_DisApp_POLL);
webView.setVisibility(View.VISIBLE);
dashboard.setVisibility(View.GONE);
return true;
case R.id.action_board:
webView.loadUrl(Constants.URL_DisApp_BOARD);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_user:
webView.loadUrl(Constants.URL_DisApp_USER);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
**/
}
case R.id.action_about:
Intent goAbout = new Intent(MainActivity.this, AboutActivity.class);
MainActivity.this.startActivity(goAbout);
return true;
case R.id.action_exit: {
moveTaskToBack(true);
finish();
return false;
}
/**
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);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_chat:
String Conversations = "eu.siacs.conversations";
Intent xmpp = getPackageManager().getLaunchIntentForPackage(Conversations);
if(xmpp == null) {
xmpp = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id="+Conversations));
}
startActivity(xmpp);
return true;
case R.id.action_pad:
webView.loadUrl(Constants.URL_DisApp_PAD);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_calc:
webView.loadUrl(Constants.URL_DisApp_CALC);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_bin:
webView.loadUrl(Constants.URL_DisApp_BIN);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_upload:
webView.loadUrl(Constants.URL_DisApp_UPLOAD);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_searx:
webView.loadUrl(Constants.URL_DisApp_SEARX);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_poll:
webView.loadUrl(Constants.URL_DisApp_POLL);
webView.setVisibility(View.VISIBLE);
dashboard.setVisibility(View.GONE);
return true;
case R.id.action_board:
webView.loadUrl(Constants.URL_DisApp_BOARD);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
case R.id.action_user:
webView.loadUrl(Constants.URL_DisApp_USER);
animatedown.setDuration(500);
animatedown.setFillAfter(true);
dashboard.startAnimation(animatedown);
dashboard.setVisibility(View.GONE);
webView.setVisibility(View.VISIBLE);
return true;
**/
default:
return super.onOptionsItemSelected(item);
}
@ -475,6 +512,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
* if (actionBar != null)
* actionBar.setTitle("");
}*/
@SuppressLint("SetJavaScriptEnabled")
private void setupWebView(Bundle savedInstanceState, FrameLayout customViewContainer, ViewGroup viewLoading) {
disWebChromeClient = new DisWebChromeClient(this, webView, customViewContainer);
webView = (WebView) findViewById(R.id.webView_content);
@ -488,7 +526,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
webView.getSettings().setSaveFormData(true);
// webView.loadUrl(Constants.URL_DisApp_MAIN_PAGE);
webView.setOnLongClickListener(this);
webView.setVisibility(View.GONE);
// webView.setVisibility(View.GONE);;
}
public void shareCurrentPage() {
@ -508,10 +546,17 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
builder.show();
}
private void showWelcome() {
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
builder.setTitle(R.string.WelcomeTitle);
builder.setMessage(getString(R.string.WelcomeInfo));
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;
}
}

View file

@ -22,4 +22,5 @@ public class Constants {
public static final String URL_DisApp_BOARD = "https://board.disroot.org";
public static final String URL_DisApp_USER = "https://user.disroot.org";
public static final String URL_DisApp_STATE = "https://state.disroot.org";
public static final String URL_DisApp_HOWTO = "https://howto.disroot.org";
}

View file

@ -31,7 +31,7 @@ public class DisWebViewClient extends WebViewClient {
Context context;
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if(url.startsWith("https")&&url.contains("disroot")&&!url.contains("pod")) {
if(url.startsWith("https")&&url.contains("disroot")) {
view.loadUrl(url);
return super.shouldOverrideUrlLoading(view, url);
}

View file

@ -0,0 +1,5 @@
<vector android:height="24dp" android:viewportHeight="48"
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#fffefe"
android:pathData="m19.5918,40.6612c0,0.8572 0.398,2.9388 -0.9796,2.9388H8.8163C3.949,43.6 0,39.651 0,34.7836V13.2324C0,8.365 3.949,4.416 8.8163,4.416h9.7959c0.5204,0 0.9796,0.4592 0.9796,0.9796 0,0.8571 0.398,2.9388 -0.9796,2.9388H8.8163c-2.6939,0 -4.898,2.2041 -4.898,4.898v21.5512c0,2.6939 2.2041,4.898 4.898,4.898h8.8163c0.7653,0 1.9592,-0.1531 1.9592,0.9796zM48,24.008c0,0.5204 -0.2143,1.0102 -0.5816,1.3776L30.7653,42.0388c-0.3673,0.3673 -0.8571,0.5816 -1.3776,0.5816 -1.0714,0 -1.9592,-0.8878 -1.9592,-1.9592V31.8448H13.7143c-1.0714,0 -1.9592,-0.8878 -1.9592,-1.9592V18.1304c0,-1.0714 0.8878,-1.9592 1.9592,-1.9592H27.4286V7.3548c0,-1.0714 0.8878,-1.9592 1.9592,-1.9592 0.5204,0 1.0102,0.2143 1.3776,0.5816L47.4184,22.6304C47.7857,22.9978 48,23.4876 48,24.008Z" android:strokeWidth="0.03061238"/>
</vector>

View file

@ -0,0 +1,5 @@
<vector android:height="24dp" android:viewportHeight="48"
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#ffffff"
android:pathData="m47.2757,12.0962c0.721,1.0382 0.9229,2.3937 0.5191,3.7203L39.8639,41.9452C39.1429,44.3966 36.605,46.3 34.1248,46.3L7.5059,46.3c-2.9416,0 -6.0852,-2.336 -7.1522,-5.3353 -0.4614,-1.2978 -0.4614,-2.5667 -0.0577,-3.6626 0.0577,-0.5768 0.173,-1.1536 0.2019,-1.8457 0.0288,-0.4614 -0.2307,-0.8363 -0.173,-1.1824 0.1154,-0.6921 0.721,-1.1824 1.1824,-1.9611 0.8652,-1.442 1.8457,-3.778 2.163,-5.2776 0.1442,-0.548 -0.1442,-1.1824 0,-1.6727 0.1442,-0.548 0.6922,-0.9517 0.9805,-1.4708C5.4294,22.565 6.4388,19.9983 6.583,18.6428 6.6407,18.0372 6.3523,17.3739 6.5253,16.9124 6.7272,16.2491 7.3617,15.9607 7.7943,15.3839 8.4864,14.4322 9.64,11.6925 9.813,10.164 9.8707,9.6737 9.5823,9.1834 9.6688,8.6643 9.7842,8.1164 10.4763,7.5396 10.9378,6.8763 12.149,5.0882 12.3798,1.1372 16.0424,2.1754l-0.0288,0.0865c0.4903,-0.1154 0.9805,-0.2596 1.4708,-0.2596h21.9469c1.3555,0 2.5667,0.6056 3.2877,1.615 0.7498,1.0382 0.9229,2.3937 0.5191,3.7491L35.3361,33.4952c-1.3555,4.4413 -2.1053,5.4218 -5.7679,5.4218L4.5065,38.9171c-0.3749,0 -0.8363,0.0865 -1.0959,0.4326 -0.2307,0.3461 -0.2596,0.6056 -0.0288,1.2401 0.5768,1.6727 2.5667,2.0188 4.1529,2.0188L34.1537,42.6085c1.0671,0 2.3072,-0.6056 2.6244,-1.6439L45.43,12.5c0.173,-0.548 0.173,-1.1247 0.1442,-1.6439 0.6633,0.2596 1.2689,0.6633 1.7015,1.2401zM16.5903,12.1539c-0.173,0.5191 0.1154,0.9229 0.6345,0.9229h17.5345c0.4903,0 1.0382,-0.4038 1.2113,-0.9229l0.6056,-1.8457C36.7492,9.7891 36.4608,9.3853 35.9417,9.3853L18.4072,9.3853c-0.4903,0 -1.0382,0.4038 -1.2113,0.9229zM14.1967,19.5368c-0.173,0.5191 0.1154,0.9229 0.6345,0.9229h17.5345c0.4903,0 1.0382,-0.4038 1.2113,-0.9229l0.6056,-1.8457c0.173,-0.5191 -0.1154,-0.9229 -0.6345,-0.9229L16.0136,16.7682c-0.4903,0 -1.0382,0.4038 -1.2113,0.9229z" android:strokeWidth="0.02883961"/>
</vector>

View file

@ -0,0 +1,5 @@
<vector android:height="24dp" android:viewportHeight="48"
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#ffffff"
android:pathData="m48,4v14c0,1.0938 -0.9063,2 -2,2H32C31.1875,20 30.4688,19.5 30.1563,18.75 29.8438,18.0313 30,17.1563 30.5938,16.5938l4.3125,-4.3125C31.9688,9.5625 28.0938,8 24,8 15.1875,8 8,15.1875 8,24c0,8.8125 7.1875,16 16,16 4.9688,0 9.5625,-2.25 12.625,-6.2188 0.1563,-0.2188 0.4375,-0.3438 0.7188,-0.375 0.2813,0 0.5625,0.0938 0.7813,0.2813L42.4063,38c0.375,0.3438 0.375,0.9375 0.0625,1.3438C37.9063,44.8438 31.1563,48 24,48 10.7813,48 0,37.2188 0,24 0,10.7813 10.7813,0 24,0 30.1563,0 36.125,2.4688 40.5313,6.625l4.0625,-4.0313C45.1563,2 46.0313,1.8438 46.7813,2.1563 47.5,2.4688 48,3.1875 48,4Z" android:strokeWidth="0.03125"/>
</vector>

View file

@ -1,9 +1,5 @@
<vector android:height="24dp" android:viewportHeight="48"
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#000000"
android:pathData="M6.1071,28.3929 L2.7589,24.4286 17.8365,9.5231 35.5172,13.4954l9.7239,10.9332 -2.7857,3.4286 -16.4406,12.8992z"
android:strokeAlpha="1" android:strokeColor="#00000000"
android:strokeLineCap="butt" android:strokeLineJoin="miter" android:strokeWidth="1"/>
<path android:fillAlpha="1" android:fillColor="#ffffff"
android:pathData="m34.2857,27.8571h8.1696c-0.3214,0.3482 -0.5357,0.5357 -0.5893,0.5893l-16.6875,16.0714C24.8571,44.8393 24.4286,45 24,45 23.5714,45 23.1429,44.8393 22.8214,44.5179L6.1071,28.3929c-0.0536,-0.0268 -0.2679,-0.2143 -0.5625,-0.5357h9.8839c0.7768,0 1.4732,-0.5357 1.6607,-1.2857l1.875,-7.5268 5.0893,17.8661c0.2143,0.7232 0.8839,1.2321 1.6607,1.2321 0.75,0 1.4196,-0.5089 1.6339,-1.2321l3.9107,-12.9911 1.5,3c0.2946,0.5625 0.8839,0.9375 1.5268,0.9375zM48,16.3929c0,3.0803 -1.3393,5.8928 -2.7589,8.0357h-9.8839l-2.9732,-5.9196c-0.2946,-0.6161 -0.9911,-0.9911 -1.6607,-0.9375 -0.7232,0.0804 -1.3125,0.5357 -1.5,1.2321l-3.4554,11.5179 -5.25,-18.375c-0.2143,-0.7232 -0.8839,-1.2321 -1.6875,-1.2321 -0.7768,0 -1.4464,0.5357 -1.6339,1.2857L14.0893,24.4286H2.7589C1.3393,22.2857 0,19.4732 0,16.3929 0,8.5446 4.7946,3.8571 12.8036,3.8571 17.4911,3.8571 21.8839,7.5536 24,9.6429 26.1161,7.5536 30.5089,3.8571 35.1964,3.8571 43.2054,3.8571 48,8.5446 48,16.3929Z" android:strokeWidth="0.02678571"/>
<path android:fillAlpha="1" android:fillColor="#fbfbfb"
android:pathData="m34.2857,27.4571h8.1696c-0.3214,0.3482 -0.5357,0.5357 -0.5893,0.5893l-16.6875,16.0714C24.8571,44.4393 24.4286,44.6 24,44.6c-0.4286,0 -0.8571,-0.1607 -1.1786,-0.4821l-16.7143,-16.125c-0.0536,-0.0268 -0.2679,-0.2143 -0.5625,-0.5357h9.8839c0.7768,0 1.4732,-0.5357 1.6607,-1.2857l1.875,-7.5268 5.0893,17.8661c0.2143,0.7232 0.8839,1.2321 1.6607,1.2321 0.75,0 1.4196,-0.5089 1.6339,-1.2321l3.9107,-12.9911 1.5,3c0.2946,0.5625 0.8839,0.9375 1.5268,0.9375zM48,15.9929c0,3.0804 -1.3393,5.8929 -2.7589,8.0357h-9.8839l-2.9732,-5.9196c-0.2946,-0.6161 -0.9911,-0.9911 -1.6607,-0.9375 -0.7232,0.0804 -1.3125,0.5357 -1.5,1.2321l-3.4554,11.5179 -5.25,-18.375c-0.2143,-0.7232 -0.8839,-1.2321 -1.6875,-1.2321 -0.7768,0 -1.4464,0.5357 -1.6339,1.2857L14.0893,24.0286H2.7589C1.3393,21.8857 0,19.0732 0,15.9929 0,8.1446 4.7946,3.4571 12.8036,3.4571 17.4911,3.4571 21.8839,7.1536 24,9.2429 26.1161,7.1536 30.5089,3.4571 35.1964,3.4571 43.2054,3.4571 48,8.1446 48,15.9929Z" android:strokeWidth="0.02678571"/>
</vector>

View file

@ -46,13 +46,17 @@
style="?android:attr/borderlessButtonStyle"
android:src="@drawable/logo" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:id="@+id/group1"
android:layout_below="@+id/logo">
<Button
android:id="@+id/MailBtn"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/logo"
android:textColor="#ffffff"
android:text="@string/action_mail"
android:drawableTop="@drawable/ic_mail"/>
@ -62,8 +66,6 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/MailBtn"
android:layout_below="@id/logo"
android:drawableTop="@drawable/ic_cloud"
android:text="@string/action_cloud"
android:textColor="#ffffff" />
@ -73,8 +75,6 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/logo"
android:layout_toRightOf="@+id/CloudBtn"
android:drawableTop="@drawable/ic_diaspora"
android:text="@string/action_diaspora"
android:textColor="#ffffff" />
@ -84,18 +84,22 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/logo"
android:layout_toRightOf="@+id/DiasporaBtn"
android:drawableTop="@drawable/ic_forum"
android:text="@string/action_forum"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:id="@+id/group2"
android:layout_below="@+id/group1">
<Button
android:id="@+id/ChatBtn"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/MailBtn"
android:drawableTop="@drawable/ic_chat"
android:text="@string/action_chat"
android:textColor="#ffffff" />
@ -105,8 +109,6 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/CloudBtn"
android:layout_toRightOf="@+id/ChatBtn"
android:drawableTop="@drawable/ic_pad"
android:text="@string/action_pad"
android:textColor="#ffffff" />
@ -116,8 +118,6 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/DiasporaBtn"
android:layout_toRightOf="@+id/PadBtn"
android:drawableTop="@drawable/ic_calc"
android:text="@string/action_calc"
android:textColor="#ffffff" />
@ -127,18 +127,22 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ForumBtn"
android:layout_toRightOf="@+id/CalcBtn"
android:drawableTop="@drawable/ic_bin"
android:text="@string/action_bin"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:id="@+id/group3"
android:layout_below="@+id/group2">
<Button
android:id="@+id/UploadBtn"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ChatBtn"
android:drawableTop="@drawable/ic_upload"
android:text="@string/action_upload"
android:textColor="#ffffff" />
@ -148,8 +152,6 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/PadBtn"
android:layout_toRightOf="@+id/UploadBtn"
android:drawableTop="@drawable/ic_searx"
android:text="@string/action_searx"
android:textColor="#ffffff" />
@ -159,8 +161,6 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/CalcBtn"
android:layout_toRightOf="@+id/SearxBtn"
android:drawableTop="@drawable/ic_poll"
android:text="@string/action_poll"
android:textColor="#ffffff" />
@ -170,18 +170,22 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/BinBtn"
android:layout_toRightOf="@+id/PollsBtn"
android:drawableTop="@drawable/ic_board"
android:text="@string/action_board"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:id="@+id/group4"
android:layout_below="@+id/group3">
<Button
android:id="@+id/UserBtn"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/UploadBtn"
android:drawableTop="@drawable/ic_poll"
android:text="@string/action_user"
android:textColor="#ffffff" />
@ -191,22 +195,28 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/SearxBtn"
android:layout_toRightOf="@+id/UserBtn"
android:drawableTop="@drawable/ic_state"
android:text="@string/action_state"
android:textColor="#ffffff" />
<Button
android:id="@+id/HowtoBtn"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/ic_howto"
android:text="@string/action_howto"
android:textColor="#ffffff" />
<Button
android:id="@+id/AboudBtn"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/BoardBtn"
android:layout_toRightOf="@+id/StateBtn"
android:drawableTop="@drawable/ic_about"
android:text="@string/action_about"
android:textColor="#ffffff" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
</FrameLayout>

View file

@ -1,7 +1,7 @@
<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.AboutActivity">
tools:context="org.disroot.disrootapp.ui.AboutActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"

View file

@ -18,6 +18,18 @@
<group
android:orderInCategory="101"
app:showAsAction="never">
<item
android:icon="@drawable/ic_reload"
android:id="@+id/action_reload"
android:title="@string/action_reload" />
<item
android:icon="@drawable/ic_about"
android:id="@+id/action_about"
android:title="@string/action_about" />
<item
android:icon="@drawable/ic_exit"
android:id="@+id/action_exit"
android:title="@string/action_exit" />
<!--
<item
android:icon="@drawable/ic_mail"
@ -72,9 +84,6 @@
android:id="@+id/action_user"
android:title="@string/action_user" />
-->
<item
android:icon="@drawable/ic_about"
android:id="@+id/action_about"
android:title="@string/action_about" />
</group>
</menu>

View file

@ -15,9 +15,12 @@
<string name="action_board">Board</string>
<string name="action_user">Password</string>
<string name="action_state">State</string>
<string name="action_howto">How to</string>
<string name="action_about">About</string>
<string name="action_exit">Exit</string>
<string name="action_share">Share</string>
<string name="action_reload">Reload</string>
<string name="action_options">Actions</string>
<string name="activity_main_share_info">share link info</string>
@ -27,11 +30,17 @@
<string name="title_activity_about">AboutActivity</string>
<string name="MailInfoTitle">Mail settings.</string>
<string name="MailInfo">Information about mail settings.\nLike imap port settings etc...\nAnd other stuff like:\nA button to how to page.</string>
<string name="MailInfo">IMAP: disroot.org | SSL Port 993 | Authentication: Normal Password\n\nSMTP: disroot.org | STARTTLS Port 587 | Authentication: Normal Password\n\nPOP: disroot.org | SSL Port 995 | Authentication: Normal Password</string>
<string name="CloudInfoTitle">Nextcloud settings.</string>
<string name="CloudInfo">Information about cloud.\nLike Nextcloud settings etc...\nAnd other stuff like:\nA button to how to page.</string>
<string name="WelcomeTitle">Welcome</string>
<string name="WelcomeInfo">Welcome\nThis window is temporary\nIt will be replaced by welcome activity</string>
<string name="tab_text_1">Help</string>
<string name="tab_text_2">About</string>
<string name="tab_text_3">License</string>
<string name="action_settings">Settings</string>
<string name="section_format">Hello World from section: %1$d</string>
</resources>

View file

@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong