显示导航抽屉已打开

时间:2015-08-19 12:43:13

标签: android navigation-drawer gravity drawerlayout

我一直在寻找如何显示导航抽屉打开。我已经看到使用Gravity.LEFT制作动画,但我希望在没有动画的情况下完全显示它。

这就是制作动画的原因。

    ((DrawerLayout) findViewById(R.id.drawer_layout)).openDrawer(Gravity.LEFT);

¿如何在没有动画的情况下显示DrawerLayout?

2 个答案:

答案 0 :(得分:1)

在Mike Penz开发的应用中有一个很棒的library来实现NavigationDrawer。

答案 1 :(得分:0)

试试这一行。

<services>
  <service name="ArchiveBoundedContext.WcfService.WcfServices.ArchiveWcfService">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration="QTasBinding" name="QTasEndpoint" contract="ArchiveBoundedContext.WcfService.WcfServices.IArchiveWcfService" />
    <endpoint address="mex" binding="mexTcpBinding" name="QTasMex" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:808/WcfServices/" />
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <serviceSecurityAudit auditLogLocation="Application" serviceAuthorizationAuditLevel="SuccessOrFailure" messageAuthenticationAuditLevel="SuccessOrFailure" suppressAuditFailure="true" />
      <serviceCredentials>
        <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="ArchiveBoundedContext.WcfService.ServiceAuthenticator, ArchiveBoundedContext.WcfService" />
        <serviceCertificate findValue="QtasCert" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" />
        <clientCertificate>
          <authentication certificateValidationMode="None" revocationMode="NoCheck" />
        </clientCertificate>
      </serviceCredentials>
      <serviceAuthorization principalPermissionMode="UseAspNetRoles" />
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>