Skip to content

Commit

Permalink
current fragment track
Browse files Browse the repository at this point in the history
  • Loading branch information
W3-Aziz committed Dec 20, 2018
1 parent 6abb13f commit 775f94e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.w3engineers.jitpackbottomnav">
xmlns:tools="http://schemas.android.com/tools" package="com.w3engineers.jitpackbottomnav">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>


<application
android:name=".App"
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.w3engineers.jitpackbottomnav

import android.content.BroadcastReceiver
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
Expand All @@ -11,6 +12,8 @@ import androidx.navigation.ui.NavigationUI
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.w3engineers.jitpackbottomnav.util.AnimUtil
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.view.inputmethod.InputMethodManager
import androidx.fragment.app.Fragment
import com.w3engineers.jitpackbottomnav.data.model.User
Expand Down Expand Up @@ -43,6 +46,8 @@ class MainActivity : AppCompatActivity(), NavController.OnNavigatedListener {

navController.addOnNavigatedListener(this)



/**
* This will select the given id fragment
*/
Expand All @@ -61,6 +66,7 @@ class MainActivity : AppCompatActivity(), NavController.OnNavigatedListener {
navController.navigate(HomeFragmentDirections.openChatPage(user))
intent.removeExtra("user")
}

}

override fun onSupportNavigateUp(): Boolean {
Expand All @@ -78,6 +84,7 @@ class MainActivity : AppCompatActivity(), NavController.OnNavigatedListener {
supportActionBar!!.setDisplayHomeAsUpEnabled(false)
toggleBottomView(true)
}

}

private fun toggleBottomView(needToShow: Boolean) {
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">

<solid
android:color="#666666"/>

<size
android:width="20dp"
android:height="20dp"/>
</shape>
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
android:id="@+id/bottom_nav"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/bottom_bar_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
<color name="grey_400">#BDBDBD</color>
<color name="incoming_message_color">#D6FDEE</color>
<color name="outcoming_message_color">#F0F0F0</color>
<color name="bottom_bar_color">#B2DFDB</color>
</resources>

0 comments on commit 775f94e

Please sign in to comment.