aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/bienvenidoainternet
diff options
context:
space:
mode:
authorLibravatar Renard 2016-05-08 17:47:07 -0300
committerLibravatar Renard 2016-05-08 17:47:07 -0300
commit22e5b86dcf7bd8e20abf7ab0de197a29f77e78d7 (patch)
tree48bef72964fe0009be4b125f51809f1233415739 /app/src/main/java/org/bienvenidoainternet
parent19e44b5af8549fe7c45677df967f0d0b9b1f1eb6 (diff)
downloadBaiApp-1.8.tar.gz
BaiApp-1.8.tar.xz
BaiApp-1.8.zip
1.8v1.8
Diffstat (limited to 'app/src/main/java/org/bienvenidoainternet')
-rw-r--r--app/src/main/java/org/bienvenidoainternet/app/MainActivity.java10
-rw-r--r--app/src/main/java/org/bienvenidoainternet/app/ResponseActivity.java8
-rw-r--r--app/src/main/java/org/bienvenidoainternet/app/ThemeManager.java5
-rw-r--r--app/src/main/java/org/bienvenidoainternet/app/ThreadListAdapter.java5
-rw-r--r--app/src/main/java/org/bienvenidoainternet/app/structure/BoardItem.java3
5 files changed, 28 insertions, 3 deletions
diff --git a/app/src/main/java/org/bienvenidoainternet/app/MainActivity.java b/app/src/main/java/org/bienvenidoainternet/app/MainActivity.java
index 0d266fc..3a1890e 100644
--- a/app/src/main/java/org/bienvenidoainternet/app/MainActivity.java
+++ b/app/src/main/java/org/bienvenidoainternet/app/MainActivity.java
@@ -14,10 +14,12 @@ import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
+import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
+import android.view.Window;
import android.widget.BaseAdapter;
import android.widget.HeaderViewListAdapter;
import android.widget.ListView;
@@ -93,7 +95,9 @@ public class MainActivity extends AppCompatActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
+ getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
super.onCreate(savedInstanceState);
+ Ion.getDefault(getApplicationContext()).configure().setLogging("IonLog", Log.DEBUG);
ThemeManager tm = new ThemeManager(this);
this.setTheme(tm.getThemeForMainActivity());
@@ -231,7 +235,7 @@ public class MainActivity extends AppCompatActivity
}
if (tm.isDarkTheme()){
- navigationView.setBackgroundColor(0xFF888888);
+// navigationView.setBackgroundColor(0xFF888888);
}
}
@@ -437,6 +441,10 @@ public class MainActivity extends AppCompatActivity
sub.add(parsedBoard.getBoardName());
boardList.add(parsedBoard);
}
+// Board polka = new Board("Testing", "polka", 0, true);
+// boardList.add(polka);
+// sub.add("Testing");
+
}catch (JSONException e1) {
Toast.makeText(getApplicationContext(), e1.getMessage(), Toast.LENGTH_LONG).show();
e1.printStackTrace();
diff --git a/app/src/main/java/org/bienvenidoainternet/app/ResponseActivity.java b/app/src/main/java/org/bienvenidoainternet/app/ResponseActivity.java
index 74ac04b..3e74573 100644
--- a/app/src/main/java/org/bienvenidoainternet/app/ResponseActivity.java
+++ b/app/src/main/java/org/bienvenidoainternet/app/ResponseActivity.java
@@ -113,6 +113,14 @@ public class ResponseActivity extends AppCompatActivity {
Button bItalic = (Button) findViewById(R.id.buttonItalic);
Button select = (Button) findViewById(R.id.btnSelectFiles);
+ bBold.setVisibility(View.GONE);
+ bStrike.setVisibility(View.GONE);
+ bList.setVisibility(View.GONE);
+ bCode.setVisibility(View.GONE);
+ bUnder.setVisibility(View.GONE);
+ bItalic.setVisibility(View.GONE);
+
+
bBold.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/app/src/main/java/org/bienvenidoainternet/app/ThemeManager.java b/app/src/main/java/org/bienvenidoainternet/app/ThemeManager.java
index 04ed3fd..3c6722d 100644
--- a/app/src/main/java/org/bienvenidoainternet/app/ThemeManager.java
+++ b/app/src/main/java/org/bienvenidoainternet/app/ThemeManager.java
@@ -137,4 +137,9 @@ public class ThemeManager {
public int getCurrentThemeId() {
return currentThemeId;
}
+
+ public int getQuoteColor() {
+ TypedArray a = activity.getTheme().obtainStyledAttributes(currentThemeId, new int[]{R.attr.quoteColor});
+ return a.getColor(0, Color.CYAN);
+ }
}
diff --git a/app/src/main/java/org/bienvenidoainternet/app/ThreadListAdapter.java b/app/src/main/java/org/bienvenidoainternet/app/ThreadListAdapter.java
index d5f8a71..4e6e9cb 100644
--- a/app/src/main/java/org/bienvenidoainternet/app/ThreadListAdapter.java
+++ b/app/src/main/java/org/bienvenidoainternet/app/ThreadListAdapter.java
@@ -113,10 +113,12 @@ public class ThreadListAdapter extends ArrayAdapter<BoardItem>{
int sageColor = tm.getSageColor();
int nameColor = tm.getNameColor();
int tripcodeColor = tm.getTripcodeColor();
+ int quoteColor = tm.getQuoteColor();
String hexColor =intToHexString(boardItem.getIdColor());
String sageHexColor = intToHexString(sageColor);
String nameHexColor = intToHexString(nameColor);
String tripcodeHexColor = intToHexString(tripcodeColor);
+ String quoteHexColor = intToHexString(quoteColor);
String strId = "";
TextView txtTitle = (TextView)listItemView.findViewById(R.id.lv_txtTitle);
@@ -251,7 +253,8 @@ public class ThreadListAdapter extends ArrayAdapter<BoardItem>{
txtPoster.setText(Html.fromHtml("<b>No. " + idToDisplay + "</b> por <font color=" + (boardItem.isSage() ? sageHexColor : nameHexColor) + ">" + boardItem.getName() + "</font> "
+ (boardItem.getTripcode() == "" ? "" : "<font color=" + tripcodeHexColor + ">" + boardItem.getTripcode() + "</font>") + strId + " " + strTimeDiff));
- txtBody.setText(Html.fromHtml(boardItem.getMessage()));
+ String fixedMessage = boardItem.getMessage().replace("$_QUOTECOLOR_$", quoteHexColor);
+ txtBody.setText(Html.fromHtml(fixedMessage));
txtReplies.setVisibility(boardItem.isReply ? View.GONE : View.VISIBLE);
txtReplies.setText(boardItem.getTotalReplies() + " respuestas " + (boardItem.getTotalFiles() == 0 ? "" : ", " + boardItem.getTotalFiles() + " archivos"));
diff --git a/app/src/main/java/org/bienvenidoainternet/app/structure/BoardItem.java b/app/src/main/java/org/bienvenidoainternet/app/structure/BoardItem.java
index 9b81e8b..7a7cb02 100644
--- a/app/src/main/java/org/bienvenidoainternet/app/structure/BoardItem.java
+++ b/app/src/main/java/org/bienvenidoainternet/app/structure/BoardItem.java
@@ -5,6 +5,7 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
+import org.bienvenidoainternet.app.ThemeManager;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
@@ -147,7 +148,7 @@ public class BoardItem implements Parcelable {
}
}
msg.select("img[src]").remove();
- msg.select("span[class=unkfunc]").tagName("font").attr("color", "#8fb56c").wrap("<i></i>");
+ msg.select("span[class=unkfunc]").tagName("font").attr("color", "$_QUOTECOLOR_$").wrap("<i></i>");
msg.select("div[class=yt]").wrap("<font color=red'><i></i></font>");
this.message = msg.html();
}