forked from upstream-mirrors/OpenTracks
Apply text gradient only over text, fade out after clicking on image
This commit is contained in:
@@ -24,6 +24,9 @@ limitations under the License.
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent" >
|
||||||
<!-- A gradient on top of the text -->
|
<!-- A gradient on top of the text -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:alpha=".6"
|
android:alpha=".6"
|
||||||
@@ -34,7 +37,7 @@ limitations under the License.
|
|||||||
android:src="@drawable/text_gradient" />
|
android:src="@drawable/text_gradient" />
|
||||||
<!-- Table 1 -->
|
<!-- Table 1 -->
|
||||||
<TableLayout
|
<TableLayout
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
@@ -92,9 +95,9 @@ limitations under the License.
|
|||||||
android:id="@+id/list_item_marker_count_icon"
|
android:id="@+id/list_item_marker_count_icon"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="1dp"
|
||||||
android:layout_marginLeft="2dp"
|
android:layout_marginLeft="2dp"
|
||||||
android:layout_marginRight="2dp"
|
android:layout_marginRight="2dp"
|
||||||
android:layout_marginBottom="1dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
android:src="@drawable/ic_menu_insert_marker" />
|
android:src="@drawable/ic_menu_insert_marker" />
|
||||||
@@ -124,3 +127,4 @@ limitations under the License.
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
</FrameLayout>
|
||||||
@@ -127,6 +127,9 @@ public class MarkerDetailFragment extends Fragment {
|
|||||||
int visibility = waypointInfo.getVisibility() == View.GONE ? View.VISIBLE : View.GONE;
|
int visibility = waypointInfo.getVisibility() == View.GONE ? View.VISIBLE : View.GONE;
|
||||||
textGradient.setVisibility(visibility);
|
textGradient.setVisibility(visibility);
|
||||||
waypointInfo.setVisibility(visibility);
|
waypointInfo.setVisibility(visibility);
|
||||||
|
if (visibility == View.VISIBLE) {
|
||||||
|
handler.postDelayed(hideText, HIDE_TEXT_DELAY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
textGradient = (ImageView) view.findViewById(R.id.marker_detail_waypoint_text_gradient);
|
textGradient = (ImageView) view.findViewById(R.id.marker_detail_waypoint_text_gradient);
|
||||||
|
|||||||
Reference in New Issue
Block a user