Permalink
Browse files

reverting part of the last commit

  • Loading branch information...
1 parent 61bf15a commit a1d769adf2694d6b0b64e556d37f7404a4cd48e7 @Xlythe committed Feb 5, 2013
Showing with 9 additions and 6 deletions.
  1. +1 −3 res/layout/history_entry.xml
  2. +2 −2 res/values/colors.xml
  3. +6 −1 src/com/android2/calculator3/Calculator.java
@@ -3,13 +3,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp" >
- <com.android2.calculator3.view.CalculatorEditText
+ <TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/small_display_text_size"
android:textColor="@color/history_input"
- android:enabled="false"
- android:background="@android:color/transparent"
android:id="@+id/base" />
<TextView
android:layout_width="match_parent"
@@ -18,8 +18,8 @@
<color name="magic_flame">#00FFFFFF</color>
<color name="button_text">#FFFFFFFF</color>
<color name="pressed_color">#07547B</color>
- <color name="history_input">#E6E6E6</color>
- <color name="history_result">#999999</color>
+ <color name="history_input">#999999</color>
+ <color name="history_result">#E6E6E6</color>
<color name="background">#FF000000</color>
<color name="grey">#474747</color>
<color name="graph_color">#31B6E7</color>
@@ -25,6 +25,7 @@
import android.content.Intent;
import android.graphics.Point;
import android.os.Bundle;
+import android.text.Html;
import android.view.Display;
import android.view.KeyEvent;
import android.view.Menu;
@@ -66,6 +67,8 @@
private Slider mPulldown;
private Graph mGraph;
+ private EquationFormatter mEquationFormatter;
+
private boolean clingActive = false;
private Direction previousDirection = Direction.DOWN;
@@ -127,6 +130,8 @@ public void onCreate(Bundle state) {
mSmallPager = (CalculatorViewPager) findViewById(R.id.smallPanelswitch);
mLargePager = (CalculatorViewPager) findViewById(R.id.largePanelswitch);
+ mEquationFormatter = new EquationFormatter();
+
if(mClearButton == null) {
mClearButton = findViewById(R.id.clear);
mClearButton.setOnClickListener(mListener);
@@ -481,7 +486,7 @@ private void setUpHistory() {
entry.setHistoryEntry(he);
entry.setHistory(mHistory);
TextView base = (TextView) entry.findViewById(R.id.base);
- base.setText(he.getBase());
+ base.setText(Html.fromHtml(mEquationFormatter.insertSupscripts(he.getBase())));
TextView edited = (TextView) entry.findViewById(R.id.edited);
edited.setText(he.getEdited());
mHistoryView.addView(entry);

0 comments on commit a1d769a

Please sign in to comment.