-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97c97ec
commit 5cdf520
Showing
6 changed files
with
148 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/jorgecruces/metrometro/customViews/StationView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.jorgecruces.metrometro.customViews; | ||
|
||
import android.content.Context; | ||
import android.util.AttributeSet; | ||
import android.widget.LinearLayout; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
import com.jorgecruces.metrometro.R; | ||
|
||
public class StationView extends LinearLayout{ | ||
|
||
public StationView(Context context) { | ||
super(context); | ||
this.init(); | ||
} | ||
|
||
public StationView(Context context, @Nullable AttributeSet attrs) { | ||
super(context, attrs); | ||
this.init(); | ||
} | ||
|
||
public StationView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { | ||
super(context, attrs, defStyleAttr); | ||
this.init(); | ||
} | ||
|
||
private void init() { | ||
inflate(getContext(), R.layout.station_layout, this); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_horizontal|center_vertical" | ||
android:orientation="vertical"> | ||
|
||
<RelativeLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1"> | ||
|
||
<ImageView | ||
android:id="@+id/imageView2" | ||
android:layout_width="match_parent" | ||
android:layout_height="120dp" | ||
android:layout_centerInParent="true" | ||
android:backgroundTint="#FF0000" | ||
app:srcCompat="@drawable/metro_svg" /> | ||
|
||
<ImageView | ||
android:id="@+id/imageView3" | ||
android:layout_width="match_parent" | ||
android:layout_height="80dp" | ||
android:layout_centerInParent="true" | ||
app:srcCompat="@drawable/ic_baseline_circle_24" /> | ||
</RelativeLayout> | ||
|
||
<TextView | ||
android:id="@+id/textViewStationName" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="TextView" | ||
android:textAlignment="center" /> | ||
|
||
</LinearLayout> |