Skip to content

Commit

Permalink
add reference link + app version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mersad Esalati committed Jul 29, 2018
1 parent 7fa6e1f commit 11fca35
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {
applicationId "org.neshan.sample.starter"
minSdkVersion 19
versionCode 1
versionName "1.0"
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
14 changes: 14 additions & 0 deletions app/src/main/java/org/neshan/sample/starter/DashboardActivity.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package org.neshan.sample.starter;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import org.neshan.sample.starter.activity.AddMarker;
import org.neshan.sample.starter.activity.ChangeCameraBearing;
Expand All @@ -16,13 +18,17 @@
import org.neshan.sample.starter.activity.POILayer;
import org.neshan.sample.starter.activity.TrafficLayer;
import org.neshan.sample.starter.activity.UserLocation;
import org.w3c.dom.Text;

public class DashboardActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);

TextView appVersion = findViewById(R.id.app_version);
appVersion.setText(String.format("نسخه %s", BuildConfig.VERSION_NAME));
}

public void goToAddMarkerActivity(View view) {
Expand Down Expand Up @@ -79,4 +85,12 @@ public void goToDatabaseLayerActivity(View view) {
Intent intent = new Intent(this, DatabaseLayer.class);
startActivity(intent);
}

public void openNeshanLink(View view) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://developer.neshan.org/")));
}

public void openGithubLink(View view) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/NeshanMaps/android-neshan-maps-starter")));
}
}
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/seek_bar_thumb.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
android:shape="rectangle">

<solid
android:color="@color/accentColor" />
Expand Down
107 changes: 107 additions & 0 deletions app/src/main/res/layout/activity_dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
app:layout_constraintBottom_toBottomOf="@id/iv"/>

<TextView
android:id="@+id/tv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/textPrimaryColor"
Expand All @@ -45,6 +46,16 @@
app:layout_constraintEnd_toStartOf="@id/iv"
app:layout_constraintTop_toBottomOf="@id/tv1"/>

<TextView
android:id="@+id/app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/textPrimaryColor"
android:textSize="12sp"
android:layout_marginStart="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/tv2"/>

<android.support.constraint.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
Expand Down Expand Up @@ -524,6 +535,102 @@

</android.support.v7.widget.CardView>

<android.support.v7.widget.CardView
android:id="@+id/item13"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
app:cardBackgroundColor="@color/textSecondaryColorInverse"
app:cardCornerRadius="8dp"
android:layout_marginTop="64dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="4dp"
android:layout_marginStart="4dp"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/item11"
android:onClick="openNeshanLink">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:padding="4dp"
android:background="?attr/selectableItemBackground">

<TextView
android:layout_weight="99"
android:layout_width="0dp"
android:layout_height="match_parent"
android:textColor="@color/accentColor"
android:textSize="15sp"
android:text="پلتفرم نشان"
android:gravity="center"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:layout_marginStart="4dp"/>

<ImageView
android:layout_width="25dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:tint="@color/accentColor"
app:srcCompat="@drawable/ic_neshan_logo"
android:layout_marginEnd="4dp"/>

</LinearLayout>

</android.support.v7.widget.CardView>

<android.support.v7.widget.CardView
android:id="@+id/item14"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
app:cardBackgroundColor="@color/textSecondaryColorInverse"
app:cardCornerRadius="8dp"
android:layout_marginTop="64dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="4dp"
android:layout_marginStart="4dp"
app:layout_constraintStart_toEndOf="@id/guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/item11"
android:onClick="openGithubLink">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:padding="4dp"
android:background="?attr/selectableItemBackground">

<TextView
android:layout_weight="99"
android:layout_width="0dp"
android:layout_height="match_parent"
android:textColor="@color/accentColor"
android:textSize="15sp"
android:text="سورس کد"
android:gravity="center"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:layout_marginStart="4dp"/>

<ImageView
android:layout_width="25dp"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:tint="@color/accentColor"
app:srcCompat="@drawable/ic_github"
android:layout_marginEnd="4dp"/>

</LinearLayout>

</android.support.v7.widget.CardView>

</android.support.constraint.ConstraintLayout>

</ScrollView>

0 comments on commit 11fca35

Please sign in to comment.