@ -1 +1 @@ |
|||
1.1.2 |
|||
1.2.0 |
|||
|
@ -1,81 +0,0 @@ |
|||
package mthmmy.utils; |
|||
|
|||
import android.util.Log; |
|||
|
|||
public class Report |
|||
{ |
|||
|
|||
public static void v (String TAG, String message) |
|||
{ |
|||
Log.v(TAG,message); |
|||
} |
|||
|
|||
public static void v (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.v(TAG,message + ": " + tr.getMessage(),tr); |
|||
} |
|||
|
|||
public static void d (String TAG, String message) |
|||
{ |
|||
Log.d(TAG,message); |
|||
} |
|||
|
|||
public static void d (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.d(TAG,message + ": " + tr.getMessage(),tr); |
|||
} |
|||
|
|||
public static void i (String TAG, String message) |
|||
{ |
|||
Log.i(TAG,message); |
|||
} |
|||
|
|||
public static void i (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.i(TAG,message + ": " + tr.getMessage(),tr); |
|||
} |
|||
|
|||
public static void w (String TAG, String message) |
|||
{ |
|||
Log.w(TAG,message); |
|||
} |
|||
|
|||
public static void w (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.w(TAG,message + ": " + tr.getMessage(),tr); |
|||
} |
|||
|
|||
public static void e (String TAG, String message) |
|||
{ |
|||
Log.e(TAG,message); |
|||
} |
|||
|
|||
public static void e (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.e(TAG,message + ": " + tr.getMessage(),tr); |
|||
} |
|||
|
|||
public static void wtf (String TAG, String message) |
|||
{ |
|||
Log.wtf(TAG,message); |
|||
} |
|||
|
|||
public static void wtf (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.wtf(TAG,message + ": " + tr.getMessage(),tr); |
|||
} |
|||
|
|||
/** |
|||
* Prints long messages in logcat (debug level). |
|||
*/ |
|||
public static void longMessage(String TAG, String message) |
|||
{ |
|||
int maxLogSize = 1000; |
|||
for(int i = 0; i <= message.length() / maxLogSize; i++) { |
|||
int start = i * maxLogSize; |
|||
int end = (i+1) * maxLogSize; |
|||
end = end > message.length() ? message.length() : end; |
|||
Report.d(TAG, message.substring(start, end)); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,263 @@ |
|||
package gr.thmmy.mthmmy.activities.topic; |
|||
|
|||
import android.util.Log; |
|||
|
|||
import org.jsoup.Jsoup; |
|||
import org.jsoup.nodes.Document; |
|||
|
|||
import java.io.IOException; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
import java.util.regex.Matcher; |
|||
|
|||
import okhttp3.Response; |
|||
|
|||
class Posting { |
|||
enum REPLY_STATUS { |
|||
SUCCESSFUL, NO_SUBJECT, EMPTY_BODY, NEW_REPLY_WHILE_POSTING, NOT_FOUND, SESSION_ENDED, OTHER_ERROR |
|||
} |
|||
|
|||
static REPLY_STATUS replyStatus(Response response) throws IOException { |
|||
if (response.code() == 404) return REPLY_STATUS.NOT_FOUND; |
|||
if (response.code() < 200 || response.code() >= 400) return REPLY_STATUS.OTHER_ERROR; |
|||
String finalUrl = response.request().url().toString(); |
|||
if (finalUrl.contains("action=post")) { |
|||
Document postErrorPage = Jsoup.parse(response.body().string()); |
|||
String[] errors = postErrorPage.select("tr[id=errors] div[id=error_list]").first() |
|||
.toString().split("<br>"); |
|||
for (int i = 0; i < errors.length; ++i) { //TODO test
|
|||
Log.d("TAG", String.valueOf(i)); |
|||
Log.d("TAG", errors[i]); |
|||
} |
|||
for (String error : errors) { |
|||
if (error.contains("Your session timed out while posting") || |
|||
error.contains("Υπερβήκατε τον μέγιστο χρόνο σύνδεσης κατά την αποστολή")) |
|||
return REPLY_STATUS.SESSION_ENDED; |
|||
if (error.contains("No subject was filled in") |
|||
|| error.contains("Δεν δόθηκε τίτλος")) |
|||
return REPLY_STATUS.NO_SUBJECT; |
|||
if (error.contains("The message body was left empty") |
|||
|| error.contains("Δεν δόθηκε κείμενο για το μήνυμα")) |
|||
return REPLY_STATUS.EMPTY_BODY; |
|||
} |
|||
return REPLY_STATUS.NEW_REPLY_WHILE_POSTING; |
|||
} |
|||
return REPLY_STATUS.SUCCESSFUL; |
|||
} |
|||
|
|||
static String htmlToBBcode(String html) { |
|||
Map<String, String> bbMap = new HashMap<>(); |
|||
Map<String, String> smileysMap1 = new HashMap<>(); |
|||
Map<String, String> smileysMap2 = new HashMap<>(); |
|||
smileysMap1.put("Smiley", ":)"); |
|||
smileysMap1.put("Wink", ";)"); |
|||
smileysMap1.put("Cheesy", ":D"); |
|||
smileysMap1.put("Grin", ";D"); |
|||
smileysMap1.put("Angry", ">:("); |
|||
smileysMap1.put("Sad", ":("); |
|||
smileysMap1.put("Shocked", ":o"); |
|||
smileysMap1.put("Cool", "8))"); |
|||
smileysMap1.put("Huh", ":???:"); |
|||
smileysMap1.put("Roll Eyes", "::)"); |
|||
smileysMap1.put("Tongue", ":P"); |
|||
smileysMap1.put("Embarrassed", ":-["); |
|||
smileysMap1.put("Lips Sealed", ":-X"); |
|||
smileysMap1.put("Kiss", ":-*"); |
|||
smileysMap1.put("Cry", ":'("); |
|||
smileysMap1.put("heart", "<3"); |
|||
smileysMap1.put("kleidaria", "^locked^"); |
|||
smileysMap1.put("roll_over", "^rollover^"); |
|||
smileysMap1.put("redface", "^redface^"); |
|||
smileysMap1.put("confused", "^confused^"); |
|||
smileysMap1.put("innocent", "^innocent^"); |
|||
smileysMap1.put("sleep", "^sleep^"); |
|||
smileysMap1.put("lips_sealed", "^sealed^"); |
|||
smileysMap1.put("cool", "^cool^"); |
|||
smileysMap1.put("crazy", "^crazy^"); |
|||
smileysMap1.put("mad", "^mad^"); |
|||
smileysMap1.put("wav", "^wav^"); |
|||
smileysMap1.put("BinkyBaby", "^binkybaby^"); |
|||
smileysMap1.put("DontKnow", "^dontknow^"); |
|||
smileysMap1.put("angry4", ":angry4:"); |
|||
smileysMap1.put("angryAndHot", "^angryhot^"); |
|||
smileysMap1.put("angry", "^angry^"); |
|||
smileysMap1.put("bang_head", "^banghead^"); |
|||
smileysMap1.put("CryBaby", "^crybaby^"); |
|||
smileysMap1.put("Hello", "^hello^"); |
|||
smileysMap1.put("jerk", "^jerk^"); |
|||
smileysMap1.put("NoNo", "^nono^"); |
|||
smileysMap1.put("NotWorthy", "^notworthy^"); |
|||
smileysMap1.put("Off-topic", "^off-topic^"); |
|||
smileysMap1.put("Puke", "^puke^"); |
|||
smileysMap1.put("Shout", "^shout^"); |
|||
smileysMap1.put("Slurp", "^slurp^"); |
|||
smileysMap1.put("SuperConfused", "^superconfused^"); |
|||
smileysMap1.put("SuperInnocent", "^superinnocent^"); |
|||
smileysMap1.put("CellPhone", "^cellPhone^"); |
|||
smileysMap1.put("Idiot", "^idiot^"); |
|||
smileysMap1.put("Knuppel", "^knuppel^"); |
|||
smileysMap1.put("TickedOff", "^tickedOff^"); |
|||
smileysMap1.put("Peace", "^peace^"); |
|||
smileysMap1.put("Suspicious", "^suspicious^"); |
|||
smileysMap1.put("Caffine", "^caffine^"); |
|||
smileysMap1.put("argue", "^argue^"); |
|||
smileysMap1.put("banned2", "^banned2^"); |
|||
smileysMap1.put("banned", "^banned^"); |
|||
smileysMap1.put("bath", "^bath^"); |
|||
smileysMap1.put("beg", "^beg^"); |
|||
smileysMap1.put("bluescreen", "^bluescreen^"); |
|||
smileysMap1.put("boil", "^boil^"); |
|||
smileysMap1.put("bye", "^bye^"); |
|||
smileysMap1.put("callmerip", "^callmerip^"); |
|||
smileysMap1.put("carnaval", "^carnaval^"); |
|||
smileysMap1.put("clap", "^clap^"); |
|||
smileysMap1.put("coffepot", "^coffepot^"); |
|||
smileysMap1.put("crap", "^crap^"); |
|||
smileysMap1.put("curses", "^curses^"); |
|||
smileysMap1.put("funny", "^funny^"); |
|||
smileysMap1.put("guitar", "^guitar^"); |
|||
smileysMap1.put("kissy", "^kissy^"); |
|||
smileysMap1.put("band", "^band^"); |
|||
smileysMap1.put("ivres", "^ivres^"); |
|||
smileysMap1.put("kaloe", "^kaloe^"); |
|||
smileysMap1.put("kremala", "^kremala^"); |
|||
smileysMap1.put("moon", "^moon^"); |
|||
smileysMap1.put("mopping", "^mopping^"); |
|||
smileysMap1.put("mountza", "^mountza^"); |
|||
smileysMap1.put("pcsleep", "^pcsleep^"); |
|||
smileysMap1.put("pinokio", "^pinokio^"); |
|||
smileysMap1.put("poke", "^poke^"); |
|||
smileysMap1.put("seestars", "^seestars^"); |
|||
smileysMap1.put("sfyri", "^sfyri^"); |
|||
smileysMap1.put("spam", "^spam^"); |
|||
smileysMap1.put("super", "^super^"); |
|||
smileysMap1.put("tafos", "^tafos^"); |
|||
smileysMap1.put("tomato", "^tomato^"); |
|||
smileysMap1.put("ytold", "^ytold^"); |
|||
smileysMap1.put("beer", "^beer^"); |
|||
smileysMap1.put("ο fritz!!!", "^fritz^"); |
|||
smileysMap1.put("o Wade!!!", "^wade^"); |
|||
smileysMap1.put("bonjour", "^hat^"); |
|||
smileysMap1.put("bonjour2", "^miss^"); |
|||
smileysMap1.put("question", "^que^"); |
|||
smileysMap1.put("shifty", "^shifty^"); |
|||
smileysMap1.put("shy", "^shy^"); |
|||
smileysMap1.put("music_listenning", "^music_listen^"); |
|||
smileysMap1.put("bag_face", "^bagface^"); |
|||
smileysMap1.put("rotation", "^rotate^"); |
|||
smileysMap1.put("love", "^love^"); |
|||
smileysMap1.put("speech", "^speech^"); |
|||
smileysMap1.put("shocked", "^shocked^"); |
|||
smileysMap1.put("extremely_shocked", "^ex_shocked^"); |
|||
smileysMap1.put("smurf", "^smurf^"); |
|||
smileysMap1.put("monster", "^monster^"); |
|||
smileysMap1.put("pig", "^pig^"); |
|||
smileysMap1.put("lol", "^lol^"); |
|||
|
|||
smileysMap2.put("Police", "^Police^"); |
|||
smileysMap2.put("foyska", "^fouska^"); |
|||
smileysMap2.put("nista", "^nysta^"); |
|||
smileysMap2.put("10_7_3", "^sfinaki^"); |
|||
smileysMap2.put("yu", "^yue^"); |
|||
smileysMap2.put("a-eatpaper", "^eatpaper^"); |
|||
smileysMap2.put("lypi", "^lypi^"); |
|||
smileysMap2.put("megashok1wq", "^aytoxeir^"); |
|||
smileysMap2.put("victory", "^victory^"); |
|||
smileysMap2.put("filarakia", "^filarakia^"); |
|||
smileysMap2.put("rofl", "^rolfmao^"); |
|||
smileysMap2.put("locked", "^lock^"); |
|||
smileysMap2.put("facepalm", "^facepalm^"); |
|||
|
|||
//html stuff on the beginning
|
|||
bbMap.put("<link rel=.+\">\n ", ""); |
|||
//quotes and code headers
|
|||
bbMap.put("\n\\s+?<div class=\"quoteheader\">\n (.+?)\n </div>", ""); |
|||
bbMap.put("\n\\s+?<div class=\"codeheader\">\n (.+?)\n </div>", ""); |
|||
bbMap.put("\n\\s+?<div class=\"quote\">\n (.+?)\n </div>", ""); |
|||
bbMap.put("<br>", "\n"); |
|||
//bold
|
|||
bbMap.put("\n\\s+?<b>(.+?)</b>", "\\[b\\]$1\\[/b\\]"); |
|||
//italics
|
|||
bbMap.put("\n\\s+?<i>(.+?)</i>", "\\[i\\]$1\\[/i\\]"); |
|||
//underline
|
|||
bbMap.put("\n\\s+?<span style=\"text-decoration: underline;\">(.+?)</span>", "\\[u\\]$1\\[/u\\]"); |
|||
//deleted
|
|||
bbMap.put("\n\\s+?<del>(.+?)</del>", "\\[s\\]$1\\[/s\\]"); |
|||
//text color
|
|||
bbMap.put("\n\\s+?<span style=\"color: (.+?);\">(.+?)</span>", "\\[color=$1\\]$2\\[/color\\]"); |
|||
//glow
|
|||
bbMap.put("\n\\s+?<span style=\"background-color: (.+?);\">(.+?)</span>", "\\[glow=$1,2,300\\]$2\\[/glow\\]"); |
|||
//shadow
|
|||
bbMap.put("\n\\s+?<span style=\"text-shadow: (.+?) (.+?)\">(.+?)</span>", "\\[shadow=$1,$2\\]$3\\[/shadow\\]"); |
|||
//running text
|
|||
bbMap.put("\\s+?<marquee>\n (.+?)\n </marquee>", "\\[move\\]$1\\[/move\\]"); |
|||
//alignment
|
|||
bbMap.put("\n\\s+?<div align=\"center\">\n (.+?)\n </div>", "\\[center\\]$1\\[/center\\]"); |
|||
bbMap.put("\n\\s+?<div style=\"text-align: (.+?);\">\n (.+?)\n </div>", "\\[$1\\]$2\\[/$1\\]"); |
|||
//preformated
|
|||
bbMap.put("\n\\s+?<pre>(.+?)</pre>", "\\[pre\\]$1\\[/pre\\]"); |
|||
//horizontal rule
|
|||
bbMap.put("\n\\s+?<hr>", "\\[hr\\]"); |
|||
//resize
|
|||
bbMap.put("\n\\s+?<span style=\"font-size: (.+?);(.+?)\">(.+?)</span>", "\\[size=$1\\]$3\\[/size\\]"); |
|||
//font
|
|||
bbMap.put("\n\\s+?<span style=\"font-family: (.+?);\">(.+?)</span>", "\\[font=$1\\]$2\\[/font\\]"); |
|||
//lists
|
|||
bbMap.put("\\s+<li>(.+?)</li>", "\\[li\\]$1\\[/li\\]"); |
|||
bbMap.put("\n\\s+<ul style=\"margin-top: 0; margin-bottom: 0;\">([\\S\\s]+?)\n\\s+</ul>", |
|||
"\\[list\\]\n$1\n\\[/list\\]"); |
|||
//latex code
|
|||
bbMap.put("\n\\s+?<img src=\".+?eq=(.+?)\" .+?\">", "\\[tex\\]$1\\[/tex\\]"); |
|||
//code
|
|||
bbMap.put("\n\\s+?<div class=\"code\">\n (.+?)\n </div>", "\\[code\\]$1\\[/code\\]"); |
|||
//teletype
|
|||
bbMap.put("\n\\s+?<tt>(.+?)</tt>", "\\[tt\\]$1\\[/tt\\]"); |
|||
//superscript/subscript
|
|||
bbMap.put("\n\\s+?<sub>(.+?)</sub>", "\\[sub\\]$1\\[/sub\\]"); |
|||
bbMap.put("\n\\s+?<sup>(.+?)</sup>", "\\[sup\\]$1\\[/sup\\]"); |
|||
//tables
|
|||
bbMap.put("\\s+?<td.+?>([\\S\\s]+?)</td>", "\\[td\\]$1\\[/td\\]"); |
|||
bbMap.put("<tr>([\\S\\s]+?)\n </tr>", "\\[tr\\]$1\\[/tr\\]"); |
|||
bbMap.put("\n\\s+?<table style=\"(.+?)\">\n <tbody>\n ([\\S\\s]+?)\n </tbody>\n </table>" |
|||
, "\\[table\\]$2\\[/table\\]"); |
|||
//videos
|
|||
bbMap.put("\n\\s+?<div class=\"yt\"><a href=\".+?watch\\?v=(.+?)\"((.|\\n)*?)\\/div>\n", |
|||
"[youtube]https://www.youtube.com/watch?v=$1[/youtube]"); |
|||
//ftp
|
|||
bbMap.put("<a href=\"ftp:(.+?)\" .+?>([\\S\\s]+?)</a>", "\\[fpt=ftp:$1\\]$2\\[/ftp\\]"); |
|||
//mailto
|
|||
bbMap.put("\n\\s+?<a href=\"mailto:(.+?)\">([\\S\\s]+?)</a>", "\\[email\\]$2\\[/email\\]"); |
|||
//links
|
|||
bbMap.put("\n\\s+?<a href=\"(.+?)\" .+?>([\\S\\s]+?)</a>", "\\[url=$1\\]$2\\[/url\\]"); |
|||
//smileys
|
|||
for (Map.Entry entry : smileysMap1.entrySet()) { |
|||
bbMap.put("\n <img src=\"(.+?)//www.thmmy.gr/smf/Smileys/default_dither/(.+?) alt=\"" |
|||
+ entry.getKey().toString() + "\" .+?\">", entry.getValue().toString()); |
|||
} |
|||
for (Map.Entry entry : smileysMap2.entrySet()) { //Those that have empty alt tag
|
|||
bbMap.put("\n <img src=\"(.+?)//www.thmmy.gr/smf/Smileys/default_dither/" |
|||
+ entry.getKey().toString() + ".gif\" .+?\">", entry.getValue().toString()); |
|||
} |
|||
|
|||
bbMap.put("\n <img src=\"(.+?)//www.thmmy.gr/smf/Smileys/default_dither/undecided.gif\" alt=\"Undecided\" border=\"0\">" |
|||
, Matcher.quoteReplacement(":-\\")); |
|||
|
|||
//html stuff on the end
|
|||
bbMap.put("\n</div>", ""); |
|||
|
|||
for (Map.Entry entry : bbMap.entrySet()) { |
|||
html = html.replaceAll(entry.getKey().toString(), entry.getValue().toString()); |
|||
} |
|||
|
|||
//img need to be done last or it messes up everything else
|
|||
html = html.replaceAll("\\s+<img src=\"(.+?)\" .+? width=\"(.+?)\" .+? height=\"(.+?)\" .+?>", |
|||
"\\[img width=$2 height=$3\\]$1\\[/img\\]"); |
|||
html = html.replaceAll("\\s+<img src=\"(.+?)\" .+? height=\"(.+?)\" .+? width=\"(.+?)\" .+?>", |
|||
"\\[img height=$2 width=$3\\]$1\\[/img\\]"); |
|||
html = html.replaceAll("\\s+<img src=\"(.+?)\" .+? width=\"(.+?)\" .+?>", "\\[img width=$2\\]$1\\[/img\\]"); |
|||
html = html.replaceAll("\\s+<img src=\"(.+?)\" .+? height=\"(.+?)\" .+?>", "\\[img height=$2\\]$1\\[/img\\]"); |
|||
html = html.replaceAll("\\s+<img src=\"(.+?)\".+?>", "\\[img\\]$1\\[/img\\]"); |
|||
|
|||
return html; |
|||
} |
|||
} |
@ -1,20 +1,23 @@ |
|||
package gr.thmmy.mthmmy.utils; |
|||
|
|||
import android.text.TextPaint; |
|||
import android.text.style.SuperscriptSpan; |
|||
import android.util.Log; |
|||
|
|||
public class CenterVerticalSpan extends SuperscriptSpan { |
|||
public CenterVerticalSpan() { |
|||
} |
|||
import android.graphics.Canvas; |
|||
import android.graphics.Paint; |
|||
import android.graphics.Rect; |
|||
import android.support.annotation.NonNull; |
|||
import android.text.style.ReplacementSpan; |
|||
|
|||
public class CenterVerticalSpan extends ReplacementSpan { |
|||
@Override |
|||
public void updateDrawState(TextPaint textPaint) { |
|||
textPaint.baselineShift -= 7f; |
|||
public int getSize(@NonNull Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) { |
|||
text = text.subSequence(start, end); |
|||
return (int) paint.measureText(text.toString()); |
|||
} |
|||
|
|||
@Override |
|||
public void updateMeasureState(TextPaint tp) { |
|||
updateDrawState(tp); |
|||
public void draw(@NonNull Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom,@NonNull Paint paint) { |
|||
text = text.subSequence(start, end); |
|||
Rect charSize = new Rect(); |
|||
paint.getTextBounds(text.toString(), 0, 1, charSize); |
|||
canvas.drawText(text.toString(), x, (bottom + charSize.height()) / 2f, paint); |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
package gr.thmmy.mthmmy.utils; |
|||
|
|||
import android.util.Log; |
|||
|
|||
import com.google.firebase.crash.FirebaseCrash; |
|||
|
|||
import gr.thmmy.mthmmy.utils.exceptions.UnknownException; |
|||
import timber.log.Timber; |
|||
|
|||
public class CrashReportingTree extends Timber.Tree { |
|||
@Override |
|||
protected void log(int priority, String tag, String message, Throwable t) { |
|||
if (priority == Log.VERBOSE || priority == Log.DEBUG) { |
|||
return; |
|||
} |
|||
|
|||
String level="A"; |
|||
|
|||
if (priority == Log.INFO) |
|||
level = "I"; |
|||
else if (priority == Log.WARN) |
|||
level = "W"; |
|||
else if(priority == Log.ERROR) |
|||
level = "E"; |
|||
|
|||
FirebaseCrash.log(level + "/" + tag + ": " + message); |
|||
|
|||
if(t==null) |
|||
t = new UnknownException("UnknownException"); |
|||
|
|||
if ((priority == Log.ERROR)) |
|||
FirebaseCrash.report(t); |
|||
} |
|||
} |
After Width: | Height: | Size: 595 B |
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 376 B |
After Width: | Height: | Size: 257 B |
After Width: | Height: | Size: 796 B |
After Width: | Height: | Size: 419 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 553 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 729 B |
@ -0,0 +1,118 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<FrameLayout |
|||
xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginBottom="5dp" |
|||
android:paddingEnd="4dp" |
|||
android:paddingStart="4dp"> |
|||
|
|||
<android.support.v7.widget.CardView |
|||
xmlns:card_view="http://schemas.android.com/apk/res-auto" |
|||
android:id="@+id/card_view" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:layout_gravity="center" |
|||
android:foreground="?android:attr/selectableItemBackground" |
|||
card_view:cardBackgroundColor="@color/card_background" |
|||
card_view:cardCornerRadius="5dp" |
|||
card_view:cardElevation="2dp" |
|||
card_view:cardPreventCornerOverlap="false" |
|||
card_view:cardUseCompatPadding="true"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<RelativeLayout |
|||
android:id="@+id/header" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="0dp" |
|||
android:layout_weight="1" |
|||
android:clickable="true" |
|||
android:paddingLeft="16dp" |
|||
android:paddingRight="16dp" |
|||
android:paddingTop="16dp"> |
|||
|
|||
<FrameLayout |
|||
android:id="@+id/thumbnail_holder" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_alignParentTop="true" |
|||
android:layout_centerVertical="true" |
|||
android:layout_marginEnd="16dp"> |
|||
|
|||
<ImageView |
|||
android:id="@+id/thumbnail" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:adjustViewBounds="true" |
|||
android:contentDescription="@string/post_thumbnail" |
|||
android:maxHeight="@dimen/thumbnail_size" |
|||
android:maxWidth="@dimen/thumbnail_size" |
|||
android:src="@drawable/ic_default_user_thumbnail"/> |
|||
</FrameLayout> |
|||
|
|||
<TextView |
|||
android:id="@+id/username" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_alignParentTop="true" |
|||
android:layout_toEndOf="@+id/thumbnail_holder" |
|||
android:ellipsize="end" |
|||
android:maxLines="1" |
|||
android:text="@string/post_author" |
|||
android:textColor="@color/primary_text" |
|||
android:textStyle="bold"/> |
|||
|
|||
<EditText |
|||
android:id="@+id/quick_reply_subject" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_below="@+id/username" |
|||
android:layout_toEndOf="@+id/thumbnail_holder" |
|||
android:hint="@string/quick_reply_subject" |
|||
android:inputType="textMultiLine" |
|||
android:maxLength="80" |
|||
android:textSize="10sp" |
|||
tools:ignore="SmallSp"/> |
|||
</RelativeLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:paddingLeft="16dp" |
|||
android:paddingRight="16dp"> |
|||
|
|||
<android.support.design.widget.TextInputLayout |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_weight="1" |
|||
android:orientation="vertical"> |
|||
|
|||
<EditText |
|||
android:id="@+id/quick_reply_text" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:hint="@string/quick_reply" |
|||
android:inputType="textMultiLine"/> |
|||
</android.support.design.widget.TextInputLayout> |
|||
|
|||
<android.support.v7.widget.AppCompatImageButton |
|||
android:id="@+id/quick_reply_submit" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="bottom" |
|||
android:layout_marginBottom="5dp" |
|||
android:layout_marginEnd="5dp" |
|||
android:background="@color/card_background" |
|||
android:contentDescription="@string/quick_reply_submit" |
|||
android:src="@drawable/ic_send"/> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</android.support.v7.widget.CardView> |
|||
</FrameLayout> |
@ -0,0 +1,33 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:orientation="vertical" |
|||
android:paddingEnd="24dp" |
|||
android:paddingStart="24dp"> |
|||
|
|||
<TextView |
|||
android:id="@+id/dialog_title" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginBottom="20dp" |
|||
android:layout_marginTop="24dp" |
|||
android:textColor="@color/white" |
|||
android:textSize="20sp"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/topic_tree_and_mods" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginBottom="24dp" |
|||
android:textColor="@color/white" |
|||
android:textColorLink="@color/link_color"/> |
|||
|
|||
<TextView |
|||
android:id="@+id/users_viewing" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginBottom="20dp" |
|||
android:textColor="@color/white" |
|||
android:textColorLink="@color/link_color"/> |
|||
</LinearLayout> |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto"> |
|||
<item |
|||
android:id="@+id/menu_bookmark" |
|||
android:icon="@drawable/ic_bookmark_false" |
|||
app:showAsAction="ifRoom" |
|||
android:title="Bookmark"> |
|||
</item> |
|||
<item |
|||
android:id="@+id/menu_info" |
|||
android:icon="@drawable/ic_info" |
|||
app:showAsAction="ifRoom|withText" |
|||
android:title="Info"> |
|||
</item> |
|||
</menu> |
@ -1,96 +0,0 @@ |
|||
package mthmmy.utils; |
|||
|
|||
import com.google.firebase.crash.FirebaseCrash; |
|||
|
|||
import gr.thmmy.mthmmy.utils.exceptions.UnknownException; |
|||
|
|||
public class Report |
|||
{ |
|||
|
|||
public static void v (String TAG, String message) |
|||
{ |
|||
log("V", TAG, message); |
|||
} |
|||
|
|||
public static void v (String TAG, String message, Throwable tr) |
|||
{ |
|||
exception("V", TAG, message, tr); |
|||
} |
|||
|
|||
public static void d (String TAG, String message) |
|||
{ |
|||
log("D", TAG, message); |
|||
} |
|||
|
|||
public static void d (String TAG, String message, Throwable tr) |
|||
{ |
|||
exception("D", TAG, message, tr); |
|||
} |
|||
|
|||
public static void i (String TAG, String message) |
|||
{ |
|||
log("I", TAG, message); |
|||
} |
|||
|
|||
public static void i (String TAG, String message, Throwable tr) |
|||
{ |
|||
exception("I", TAG, message, tr); |
|||
} |
|||
|
|||
public static void w (String TAG, String message) |
|||
{ |
|||
log("W", TAG, message); |
|||
} |
|||
|
|||
public static void w (String TAG, String message, Throwable tr) |
|||
{ |
|||
exception("W", TAG, message, tr); |
|||
} |
|||
|
|||
public static void e (String TAG, String message) |
|||
{ |
|||
log("E", TAG, message); |
|||
} |
|||
|
|||
public static void e (String TAG, String message, Throwable tr) |
|||
{ |
|||
exception("E", TAG, message, tr); |
|||
} |
|||
|
|||
public static void wtf (String TAG, String message) |
|||
{ |
|||
log("WTF", TAG, message); |
|||
} |
|||
|
|||
public static void wtf (String TAG, String message, Throwable tr) |
|||
{ |
|||
exception("WTF", TAG, message, tr); |
|||
} |
|||
|
|||
private static void log(String level, String TAG, String message) |
|||
{ |
|||
if(!level.equals("V")&&!level.equals("D")) //don't log V and D levels
|
|||
{ |
|||
FirebaseCrash.log(level + "/" + TAG + ": " + message); |
|||
if(level.equals("E")||level.equals("WTF")) //report only serious exceptions
|
|||
FirebaseCrash.report(new UnknownException("UnknownException")); |
|||
} |
|||
} |
|||
|
|||
private static void exception(String level, String TAG, String message, Throwable tr) |
|||
{ |
|||
if(!level.equals("V")&&!level.equals("D")) //don't log V and D levels
|
|||
{ |
|||
FirebaseCrash.log(level + "/" + TAG + ": " + message + ": " + tr.getMessage()); |
|||
if(level.equals("E")||level.equals("WTF")) //report only serious exceptions
|
|||
FirebaseCrash.report(tr); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Does nothing in release. |
|||
*/ |
|||
public static void longMessage(String TAG, String level, String message) {return;} |
|||
|
|||
|
|||
} |
@ -1,34 +1,35 @@ |
|||
[center][size=25pt][b]Introduction[/b][/size][/center] |
|||
|
|||
Από τη συζήτηση [url=https://www.thmmy.gr/smf/index.php?topic=67629.0]εδώ[/url], ξεκίνησε ένα project με στόχο τη δημιουργία εφαρμογής για Android κινητά που θα συγκεντρώνει και θα κάνει πιο εύκολη τη πρόσβαση σε μερικές από τις βασικές σελίδες και υπηρεσίες που αφορούν τη σχολή και χρησιμοποιούμε καθημερινά. |
|||
Από τη συζήτηση [url=https://www.thmmy.gr/smf/index.php?topic=67629.0]εδώ[/url], ξεκίνησε ένα project με στόχο τη δημιουργία εφαρμογής για Android κινητά που θα συγκεντρώνει και θα κάνει πιο εύκολη τη πρόσβαση σε μερικές από τις βασικές σελίδες και υπηρεσίες που αφορούν τη σχολή και χρησιμοποιούμε καθημερινά. |
|||
|
|||
Μετά από 2+ μήνες δουλειάς και πάνω από 9000 γραμμές κώδικα [size=9pt](.java, .xml και άλλα)[/size], σήμερα ανεβάσαμε για πρώτη φορά την εφαρμογή (σε closed alpha phase) στο Google Play Store! |
|||
Μετά από 2+ μήνες δουλειάς και πάνω από 9000 γραμμές κώδικα (.java, .xml και άλλα), σήμερα (16/1/2017) ανεβάσαμε για πρώτη φορά την εφαρμογή (σε closed alpha phase) στο Google Play Store! |
|||
|
|||
Προς το παρόν η εφαρμογή υποστηρίζει κάποιες από τις βασικές λειτουργίες του forum. Σταδιακά θα ενσωματώνονται όλο και περισσότερες λειτουργίες, για παράδειγμα ενός συστήματος ειδοποιήσεων για νέες ανακοινώσεις του ethmmy και της σελίδας της γραμματείας, instant chat κ.ά., ανάλογα πάντα με τις ιδέες, τη διάθεση και την ενέργεια όσων θα συμμετέχουν. |
|||
Προς το παρόν η εφαρμογή υποστηρίζει κάποιες από τις βασικές λειτουργίες του forum. Σταδιακά θα ενσωματώνονται όλο και περισσότερες λειτουργίες, για παράδειγμα ενός συστήματος ειδοποιήσεων για νέες ανακοινώσεις του ethmmy και της σελίδας της γραμματείας, instant chat κ.ά., ανάλογα πάντα με τις ιδέες, τη διάθεση και την ενέργεια όσων θα συμμετέχουν. |
|||
|
|||
Αυτή τη στιγμή με το project ασχολούμαστε εγώ και ο L, ενώ έχουν βοηθήσει ο iason1907 και ο [url=https://www.thmmy.gr/smf/index.php?topic=67565.msg1163192#msg1163192]nohponex[/url]. |
|||
Αυτή τη στιγμή με το project ασχολούμαστε εγώ και ο L, ενώ έχουν βοηθήσει ο iason1907 και ο [url=https://www.thmmy.gr/smf/index.php?topic=67565.msg1163192#msg1163192]nohponex[/url]. |
|||
|
|||
[hr] |
|||
[center][size=25pt][b]Κάλεσμα για contributors[/b][/size] |
|||
[center][size=25pt][b]Κάλεσμα για contributors[/b][/size] |
|||
|
|||
[img height=400]https://tctechcrunch2011.files.wordpress.com/2015/04/uncle-sam-we-want-you1-kopie_1.png[/img][/center] |
|||
[img height=200]https://tctechcrunch2011.files.wordpress.com/2015/04/uncle-sam-we-want-you1-kopie_1.png[/img][/center] |
|||
|
|||
Αν ενδιαφέρεσαι κι ΕΣΥ να ασχοληθείς με το project μπορείς να το κάνεις με πολλούς τρόπους: |
|||
Αν ενδιαφέρεσαι κι [b]ΕΣΥ[/b] να ασχοληθείς με το project μπορείς να το κάνεις με πολλούς τρόπους: |
|||
[list] |
|||
[li]Αν ξέρεις προγραμματισμό μπορείς αρχικά να ζητήσεις πρόσβαση στο repository. Χρειάζονται [i]άμεσα[/i] νέοι developers για υλοποιήση καινούργιων χαρακτηριστικών, διόρθωση εντόμων, σύνταξη των javadocs και του documentation γενικότερα, white-box testing, υλοποίηση του backend στο server που στήθηκε πρόσφατα και πολλών άλλων. Αυτό, αρχικά, θα γίνεται με forks και merge requests - και πάντα στο ρυθμό που μπορείς να συνεισφέρεις. |
|||
[/li] |
|||
|
|||
[li] |
|||
Να αναφέρεις bugs, να προτείνεις βελτιώσεις και να συμμετέχεις σε συζητήσεις, είτε στον [url=https://discord.gg/PVRVjth]Discord server[/url], είτε αποκτώντας πρόσβαση στον Issue Tracker μας. |
|||
Να αναφέρεις bugs, να προτείνεις βελτιώσεις και να συμμετέχεις σε συζητήσεις στον [url=https://discord.gg/PVRVjth]Discord server[/url] μας και στον Issue Tracker στο [url=trello.com]Trello[/url] (το link του είναι pinned στο #feedback στο Discord). |
|||
[/li] |
|||
[li] |
|||
Να κατεβάσεις και να δοκιμάσεις την alpha έκδοση της εφαρμογής από [url=https://play.google.com/apps/testing/gr.thmmy.mthmmy]εδώ[/url] αφού πρώτα μας δώσεις ένα gmail για να αποκτήσεις πρόσβαση. |
|||
Να κατεβάσεις και να δοκιμάσεις την alpha έκδοση της εφαρμογής από [url=https://play.google.com/apps/testing/gr.thmmy.mthmmy]εδώ[/url], [b]αφού [/b]πρώτα μας στείλεις το Gmail που έχεις στο Google Play για να αποκτήσεις πρόσβαση. |
|||
[/li] |
|||
[li] |
|||
Να έρθεις σε άμεση επικοινωνία με την ομάδα μέσω του Discord ή στέλνοντας email στο thmmynolife@gmail.com. |
|||
Να έρθεις σε άμεση επικοινωνία με την ομάδα μέσω του [url=https://discord.gg/PVRVjth]Discord[/url] ή στέλνοντας email στο thmmynolife@gmail.com. |
|||
[/li] |
|||
[li]Αν ξέρεις προγραμματισμό μπορείς αρχικά να ζητήσεις πρόσβαση στο repository και να συνεισφέρεις κώδικα με fork και merge requests στους ρυθμούς σου. Χρειάζονται [i]άμεσα[/i] νέοι developers για υλοποιήση καινούργιων χαρακτηριστικών, διόρθωση εντόμων, σύνταξη των javadocs και του documentation γενικότερα, white-box testing, υλοποίηση του backend στο server που στήθηκε πρόσφατα και πολλών άλλων. |
|||
[/li][/list] |
|||
[hr] |
|||
[center][size=25pt][b]Η εφαρμογή[/b][/size][/center] |
|||
[center][size=25pt][b]Η εφαρμογή[/b][/size][/center] |
|||
|
|||
[center][url=https://s6.postimg.org/4mupem3jl/image.png][img width=200]https://s6.postimg.org/4mupem3jl/image.png[/img][/url] [url=https://s6.postimg.org/ovdhmldgx/image.png][img width=200]https://s6.postimg.org/ovdhmldgx/image.png[/img][/url] [url=https://s6.postimg.org/a9mgycgoh/image.png][img width=200]https://s6.postimg.org/a9mgycgoh/image.png[/img][/url] [url=https://s6.postimg.org/5jwj9qpo1/image.png][img width=200]https://s6.postimg.org/5jwj9qpo1/image.png[/img][/url] [url=https://s6.postimg.org/fjrfpn0xd/image.png][img width=200]https://s6.postimg.org/fjrfpn0xd/image.png[/img][/url] [url=https://s6.postimg.org/z0c5c5w1d/image.png][img width=200]https://s6.postimg.org/z0c5c5w1d/image.png[/img][/url][/center] |
|||
[center][url=https://s6.postimg.org/v9mseb7n5/image.png][img width=200]https://s6.postimg.org/v9mseb7n5/image.png[/img][/url] [url=https://s6.postimg.org/3nk0tmoa9/image2.png][img width=200]https://s6.postimg.org/3nk0tmoa9/image2.png[/img][/url] [url=https://s6.postimg.org/i813ogj8x/image3.png][img width=200]https://s6.postimg.org/i813ogj8x/image3.png[/img][/url] [url=https://s6.postimg.org/4to0sfckx/image4.png][img width=200]https://s6.postimg.org/4to0sfckx/image4.png[/img][/url] [url=https://s6.postimg.org/69zjakfht/image5.png][img width=200]https://s6.postimg.org/69zjakfht/image5.png[/img][/url] [url=https://s6.postimg.org/rkx3etxm9/image6.png][img width=200]https://s6.postimg.org/rkx3etxm9/image6.png[/img][/url][/center] |
|||
|
|||
Αυτή τη στιγμή στην εφαρμογή μπορείς να κάνεις login και logout, να δεις τα "Πρόσφατα", να περιηγηθείς στα boards, topics και user profiles και να κατεβάσεις αρχεία συνημμένα σε post. |
|||
Αυτή τη στιγμή στην εφαρμογή μπορείς να κάνεις login και logout, να δεις τα "Πρόσφατα", να περιηγηθείς στα boards, topics και user profiles, να κατεβάσεις αρχεία από τα downloads και από συνημμένα σε post. |
@ -1,6 +1,6 @@ |
|||
#Mon Dec 28 10:00:20 PST 2015 |
|||
#Wed Mar 08 11:25:21 EET 2017 |
|||
distributionBase=GRADLE_USER_HOME |
|||
distributionPath=wrapper/dists |
|||
zipStoreBase=GRADLE_USER_HOME |
|||
zipStorePath=wrapper/dists |
|||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip |
|||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip |
|||
|