remove unused drawables
|
Before Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 116 B |
|
Before Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 315 B |
|
Before Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 236 B |
|
Before Width: | Height: | Size: 99 B |
|
Before Width: | Height: | Size: 148 B |
|
Before Width: | Height: | Size: 217 B |
|
Before Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 380 B |
BIN
Habitica/res/drawable-mdpi/menu_messages.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
Habitica/res/drawable-mdpi/menu_settings.png
Normal file
|
After Width: | Height: | Size: 727 B |
|
Before Width: | Height: | Size: 371 B |
|
Before Width: | Height: | Size: 135 B |
|
Before Width: | Height: | Size: 247 B |
|
Before Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 674 B |
BIN
Habitica/res/drawable-xhdpi/menu_messages.png
Normal file
|
After Width: | Height: | Size: 735 B |
BIN
Habitica/res/drawable-xhdpi/menu_settings.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 501 B |
|
Before Width: | Height: | Size: 535 B |
|
Before Width: | Height: | Size: 1 KiB |
BIN
Habitica/res/drawable-xxhdpi/menu_messages.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Habitica/res/drawable-xxhdpi/menu_settings.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 650 B |
|
Before Width: | Height: | Size: 690 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -38,14 +38,14 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/ic_message_white_24dp"
|
||||
android:src="@drawable/menu_messages"
|
||||
android:layout_marginLeft="16dp"/>
|
||||
<ImageButton
|
||||
android:id="@+id/settingsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:src="@drawable/ic_settings_white_24dp"
|
||||
android:src="@drawable/menu_settings"
|
||||
android:layout_marginLeft="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import android.app.ActionBar
|
|||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.ActionBarDrawerToggle
|
||||
import android.support.v4.app.DialogFragment
|
||||
import android.support.v4.view.GravityCompat
|
||||
import android.support.v4.widget.DrawerLayout
|
||||
import android.support.v7.app.ActionBarDrawerToggle
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
|
|
@ -33,6 +33,7 @@ import com.habitrpg.android.habitica.ui.fragments.social.TavernFragment
|
|||
import com.habitrpg.android.habitica.ui.fragments.social.challenges.ChallengesOverviewFragment
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.party.PartyFragment
|
||||
import com.habitrpg.android.habitica.ui.fragments.tasks.TasksFragment
|
||||
import com.habitrpg.android.habitica.ui.helpers.NavbarUtils
|
||||
import com.habitrpg.android.habitica.ui.menu.HabiticaDrawerItem
|
||||
import kotlinx.android.synthetic.main.drawer_main.*
|
||||
import rx.Subscription
|
||||
|
|
@ -45,11 +46,6 @@ import rx.functions.Action1
|
|||
*/
|
||||
class NavigationDrawerFragment : DialogFragment() {
|
||||
|
||||
/**
|
||||
* Helper component that ties the action bar to the navigation drawer.
|
||||
*/
|
||||
private var drawerToggle: ActionBarDrawerToggle? = null
|
||||
|
||||
private var drawerLayout: DrawerLayout? = null
|
||||
private var fragmentContainerView: View? = null
|
||||
|
||||
|
|
@ -77,6 +73,8 @@ class NavigationDrawerFragment : DialogFragment() {
|
|||
super.onActivityCreated(savedInstanceState)
|
||||
// Indicate that this fragment would like to influence the set of actions in the action bar.
|
||||
setHasOptionsMenu(true)
|
||||
|
||||
context?.let {recyclerView.setPadding(0, 0, 0, NavbarUtils.getNavbarHeight(it)) }
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||
|
|
@ -222,41 +220,6 @@ class NavigationDrawerFragment : DialogFragment() {
|
|||
// set a custom shadow that overlays the main content when the drawer opens
|
||||
this.drawerLayout?.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START)
|
||||
// set up the drawer's list view with items and click listener
|
||||
|
||||
// ActionBarDrawerToggle ties together the the proper interactions
|
||||
// between the navigation drawer and the action bar app icon.
|
||||
drawerToggle = object : ActionBarDrawerToggle(
|
||||
activity, /* host Activity */
|
||||
this.drawerLayout, /* DrawerLayout object */
|
||||
R.drawable.ic_menu_white_24dp, /* nav drawer image to replace 'Up' caret */
|
||||
R.string.navigation_drawer_open, /* "open drawer" description for accessibility */
|
||||
R.string.navigation_drawer_close /* "close drawer" description for accessibility */
|
||||
) {
|
||||
override fun onDrawerClosed(drawerView: View) {
|
||||
super.onDrawerClosed(drawerView)
|
||||
if (!isAdded) {
|
||||
return
|
||||
}
|
||||
|
||||
activity?.invalidateOptionsMenu() // calls onPrepareOptionsMenu()
|
||||
}
|
||||
|
||||
override fun onDrawerOpened(drawerView: View) {
|
||||
super.onDrawerOpened(drawerView)
|
||||
if (!isAdded) {
|
||||
return
|
||||
}
|
||||
|
||||
activity?.invalidateOptionsMenu() // calls onPrepareOptionsMenu()
|
||||
}
|
||||
}
|
||||
|
||||
drawerToggle?.isDrawerIndicatorEnabled = true
|
||||
|
||||
// Defer code dependent on restoration of previous instance state.
|
||||
this.drawerLayout?.post { drawerToggle?.syncState() }
|
||||
|
||||
//this.drawerLayout?.setDrawerListener(drawerToggle)
|
||||
}
|
||||
|
||||
fun openDrawer() {
|
||||
|
|
@ -289,12 +252,6 @@ class NavigationDrawerFragment : DialogFragment() {
|
|||
outState.putInt(STATE_SELECTED_POSITION, mCurrentSelectedPosition)
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
// Forward the new configuration the drawer toggle component.
|
||||
drawerToggle?.onConfigurationChanged(newConfig)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
const val SIDEBAR_TASKS = "tasks"
|
||||
|
|
|
|||