Made as much strings translatable as possible+
A lot of smal fixes
This commit is contained in:
parent
a290f55354
commit
35387fbc50
|
@ -32,10 +32,8 @@
|
|||
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" />
|
||||
|
|
|
@ -56,12 +56,9 @@ import android.widget.CheckBox;
|
|||
import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.SimpleAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
|
@ -1877,7 +1874,7 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
new NotificationCompat.Builder(this)
|
||||
.setAutoCancel( true )
|
||||
.setSmallIcon(R.drawable.ic_state)
|
||||
.setContentTitle( "Message from Disroot State!" )
|
||||
.setContentTitle( getString( R.string.NotificationTitle ) )
|
||||
.setContentText(name)//get text Title from json :-)
|
||||
.setContentInfo(message)//get text message from json :-)
|
||||
.setContentIntent(launchStateMessages);
|
||||
|
|
|
@ -2,9 +2,7 @@ package org.disroot.disrootapp.ui;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
|
@ -28,7 +26,6 @@ import org.json.JSONArray;
|
|||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -78,7 +75,6 @@ public class StateMessagesActivity extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.menu_about, menu);
|
||||
return true;
|
||||
}
|
||||
|
@ -86,9 +82,6 @@ public class StateMessagesActivity extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
|
||||
|
@ -255,14 +248,16 @@ public class StateMessagesActivity extends AppCompatActivity {
|
|||
case "Fixed":
|
||||
case "Scheduled":
|
||||
humanStatus.setTextColor(Color.GREEN);
|
||||
humanStatus.setText(R.string.Scheduled);
|
||||
break;
|
||||
case "Investigating":
|
||||
case "Watching":
|
||||
humanStatus.setTextColor(Color.YELLOW);
|
||||
|
||||
humanStatus.setText(R.string.Investigating);
|
||||
break;
|
||||
case "Identified":
|
||||
humanStatus.setTextColor(Color.RED);
|
||||
humanStatus.setText(R.string.Identified);
|
||||
break;
|
||||
}
|
||||
return v;
|
||||
|
|
|
@ -17,7 +17,6 @@ public class Constants {
|
|||
public static final String URL_DisApp_POLL = "https://poll.disroot.org";
|
||||
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";
|
||||
public static final String URL_DisApp_K9HELP = "https://howto.disroot.org/email/email-clients/mobile/androidk9";
|
||||
public static final String URL_DisApp_XMPPHELP = "https://howto.disroot.org/xmpp/mobile/android";
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
android:background="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/DisTheme.PopupOverlay"
|
||||
app:title="@string/app_name">
|
||||
app:title="@string/app_state">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
@ -37,11 +37,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:maxWidth="24dp"
|
||||
android:drawableTop="@drawable/ic_state"
|
||||
android:drawableTint="@color/gray"
|
||||
android:text="@string/state_btn"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="@android:dimen/app_icon_size"
|
||||
android:layout_marginLeft="@android:dimen/app_icon_size"
|
||||
android:layout_marginRight="@android:dimen/app_icon_size"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:textColor="#ffffff"/>
|
||||
android:textColor="@color/gray"/>
|
||||
<Button
|
||||
android:id="@+id/StateMessageBtn"
|
||||
android:shadowColor="@color/bg_primary_blue"
|
||||
|
@ -51,7 +53,8 @@
|
|||
android:drawableTop="@drawable/ic_state"
|
||||
android:text="@string/state_messages_btn"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="@android:dimen/app_icon_size"
|
||||
android:layout_marginLeft="@android:dimen/app_icon_size"
|
||||
android:layout_marginRight="@android:dimen/app_icon_size"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:textColor="#ffffff"/>
|
||||
</android.support.v7.widget.LinearLayoutCompat>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
android:background="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/DisTheme.PopupOverlay"
|
||||
app:title="@string/app_name">
|
||||
app:title="@string/app_state">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
@ -39,7 +39,8 @@
|
|||
android:drawableTop="@drawable/ic_state"
|
||||
android:text="@string/state_btn"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="@android:dimen/app_icon_size"
|
||||
android:layout_marginLeft="@android:dimen/app_icon_size"
|
||||
android:layout_marginRight="@android:dimen/app_icon_size"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:textColor="#ffffff"/>
|
||||
<Button
|
||||
|
@ -49,11 +50,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:maxWidth="24dp"
|
||||
android:drawableTop="@drawable/ic_state"
|
||||
android:drawableTint="@color/gray"
|
||||
android:text="@string/state_messages_btn"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="@android:dimen/app_icon_size"
|
||||
android:layout_marginLeft="@android:dimen/app_icon_size"
|
||||
android:layout_marginRight="@android:dimen/app_icon_size"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:textColor="#ffffff"/>
|
||||
android:textColor="@color/gray"/>
|
||||
</android.support.v7.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
|
|
|
@ -148,4 +148,8 @@
|
|||
<string name="state_messages_btn">Show State messages</string>
|
||||
<string name="state_btn">Show Service State</string>
|
||||
<string name="ScheduledAt">Scheduled at:</string>
|
||||
<string name="NotificationTitle">Message from Disroot State!</string>
|
||||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
</resources>
|
||||
|
|
|
@ -177,4 +177,8 @@
|
|||
<string name="state_messages_btn">Show State messages</string>
|
||||
<string name="state_btn">Show Service State</string>
|
||||
<string name="ScheduledAt">Scheduled at:</string>
|
||||
<string name="NotificationTitle">Message from Disroot State!</string>
|
||||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
</resources>
|
||||
|
|
|
@ -147,4 +147,8 @@
|
|||
<string name="state_messages_btn">Mostra messaggi di stato</string>
|
||||
<string name="state_btn">Mostra stato dei servizi</string>
|
||||
<string name="ScheduledAt">In programma il: \</string>
|
||||
<string name="NotificationTitle">Messaggio dallo Stato di Disroot!</string>
|
||||
<string name="Scheduled">Pianificato</string>
|
||||
<string name="Investigating">Indagando</string>
|
||||
<string name="Identified">Identificato</string>
|
||||
</resources>
|
||||
|
|
|
@ -148,4 +148,8 @@
|
|||
<string name="state_messages_btn">Toon statusberichten</string>
|
||||
<string name="state_btn">Toon Service Status</string>
|
||||
<string name="ScheduledAt">Gepland op: \</string>
|
||||
<string name="NotificationTitle">Bericht van Disroot State!</string>
|
||||
<string name="Scheduled">Gepland</string>
|
||||
<string name="Investigating">Aan het onderzoeken</string>
|
||||
<string name="Identified">Geïdentificeerd</string>
|
||||
</resources>
|
||||
|
|
|
@ -147,4 +147,8 @@
|
|||
<string name="state_messages_btn">Show State messages</string>
|
||||
<string name="state_btn">Show Service State</string>
|
||||
<string name="ScheduledAt">Scheduled at:</string>
|
||||
<string name="NotificationTitle">Message from Disroot State!</string>
|
||||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
</resources>
|
||||
|
|
|
@ -148,4 +148,8 @@
|
|||
<string name="state_messages_btn">Show State messages</string>
|
||||
<string name="state_btn">Show Service State</string>
|
||||
<string name="ScheduledAt">Scheduled at:</string>
|
||||
<string name="NotificationTitle">Message from Disroot State!</string>
|
||||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
</resources>
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
<resources>
|
||||
<color name="bg_primary_blue">#50162d</color>
|
||||
<color name="bg_primary_blue_dark">#1f5c60</color>
|
||||
<color name="gray">#808080</color>
|
||||
</resources>
|
|
@ -148,4 +148,8 @@
|
|||
<string name="state_messages_btn">Show State messages</string>
|
||||
<string name="state_btn">Show Service State</string>
|
||||
<string name="ScheduledAt">Scheduled at: \</string>
|
||||
<string name="NotificationTitle">Message from Disroot State!</string>
|
||||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<changelog>
|
||||
<release version="1.0.2" versioncode="12" >
|
||||
<release version="1.1.0" versioncode="12" >
|
||||
<change>State page is api based instead of webview</change>
|
||||
<change>In State page is possible to view state messages</change>
|
||||
<change>State page is ordered by status</change>
|
||||
|
@ -8,6 +8,11 @@
|
|||
<change>Fixed app lanuch in state on fresh install</change>
|
||||
<change>Refresh state data to update state events</change>
|
||||
<change>Added app notification on new state events</change>
|
||||
<change>Notifications make sound</change>
|
||||
<change>Notification text comes from json data</change>
|
||||
<change>Tapping on notification launches StateMessagesActivity</change>
|
||||
<change>Made as much strings translatable as possible</change>
|
||||
<change>A lot of smal fixes</change>
|
||||
</release>
|
||||
<release version="1.0.2" versioncode="12" >
|
||||
<change>Third partie cookies disabled</change>
|
||||
|
|
Loading…
Reference in New Issue