Fix data indicators in DetailsActivity
This commit is contained in:
parent
6e0657e5db
commit
e9cbbd7b27
@ -442,11 +442,9 @@ public class CurrencyDetailsActivity extends AppCompatActivity {
|
||||
date = getDate(dataChartList.get(index).getTimestamp() * 1000);
|
||||
}
|
||||
|
||||
displayDataIndicators();
|
||||
|
||||
((TextView) findViewById(R.id.volumeHightlight)).setText("Volume : US$" + barChart.getData().getDataSets().get(0).getEntryForIndex(index).getY());
|
||||
((TextView) findViewById(R.id.priceHightlight)).setText("Price : US$" + e.getY());
|
||||
((TextView) findViewById(R.id.timestampHightlight)).setText("Date : " + date);
|
||||
((TextView) findViewById(R.id.volumeHightlight)).setText("Volume\nUS$" + barChart.getData().getDataSets().get(0).getEntryForIndex(index).getY());
|
||||
((TextView) findViewById(R.id.priceHightlight)).setText("Price\nUS$" + e.getY());
|
||||
((TextView) findViewById(R.id.timestampHightlight)).setText("Date\n" + date);
|
||||
|
||||
}
|
||||
|
||||
@ -463,18 +461,11 @@ public class CurrencyDetailsActivity extends AppCompatActivity {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void displayDataIndicators()
|
||||
{
|
||||
findViewById(R.id.volumeHightlight).setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.priceHightlight).setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.timestampHightlight).setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
private void hideDataIndicators()
|
||||
{
|
||||
findViewById(R.id.volumeHightlight).setVisibility(View.INVISIBLE);
|
||||
findViewById(R.id.priceHightlight).setVisibility(View.INVISIBLE);
|
||||
findViewById(R.id.timestampHightlight).setVisibility(View.INVISIBLE);
|
||||
((TextView) findViewById(R.id.volumeHightlight)).setText("\n");
|
||||
((TextView) findViewById(R.id.priceHightlight)).setText("\n");
|
||||
((TextView) findViewById(R.id.timestampHightlight)).setText("\n");
|
||||
}
|
||||
|
||||
private String getDate(long timeStamp){
|
||||
|
@ -248,7 +248,7 @@ public class HomeLayoutGenerator {
|
||||
int r = Color.red(color);
|
||||
int g = Color.green(color);
|
||||
int b = Color.blue(color);
|
||||
|
||||
|
||||
transColor = Color.argb(alpha, r, g, b);
|
||||
|
||||
return transColor ;
|
||||
|
@ -51,22 +51,28 @@
|
||||
android:id="@+id/timestampHightlight"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:layout_weight="0.33"/>
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_weight="0.33"
|
||||
android:text="\n" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/priceHightlight"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:layout_weight="0.33" />
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_weight="0.33"
|
||||
android:text="\n" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/volumeHightlight"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:layout_weight="0.33"/>
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_weight="0.33"
|
||||
android:text="\n"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -276,25 +282,4 @@
|
||||
app:menu="@menu/navigation_details"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
<!--<android.support.constraint.ConstraintLayout 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"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.nauk.coinfolio.Activities.CurrencyDetailsActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:text="@string/title_home"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
-->
|
||||
</RelativeLayout>
|
Loading…
x
Reference in New Issue
Block a user