Skip to content

Commit

Permalink
bunch of work to make it rtl
Browse files Browse the repository at this point in the history
  • Loading branch information
aliab committed Jan 15, 2017
1 parent c2ab06e commit 478d0b7
Show file tree
Hide file tree
Showing 23 changed files with 723 additions and 243 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,19 @@ protected void onCreate(Bundle savedInstanceState) {

// Create a few sample profile
// NOTE you have to define the loader logic too. See the CustomApplication for more details
final IProfile profile = new ProfileDrawerItem().withName("Mike Penz").withEmail("[email protected]").withIcon("https://avatars3.githubusercontent.com/u/1476232?v=3&s=460").withIdentifier(100);
final IProfile profile = new ProfileDrawerItem().withName("Mike Penz").withBackgroundColor("#ff0099").withEmail("[email protected]").withIcon("https://avatars3.githubusercontent.com/u/1476232?v=3&s=460").withIdentifier(100);
final IProfile profile2 = new ProfileDrawerItem().withName("Bernat Borras").withEmail("[email protected]").withIcon(Uri.parse("https://avatars3.githubusercontent.com/u/887462?v=3&s=460")).withIdentifier(101);
final IProfile profile3 = new ProfileDrawerItem().withName("Max Muster").withEmail("[email protected]").withIcon(R.drawable.profile2).withIdentifier(102);
final IProfile profile4 = new ProfileDrawerItem().withName("Felix House").withEmail("[email protected]").withIcon(R.drawable.profile3).withIdentifier(103);
final IProfile profile5 = new ProfileDrawerItem().withName("Mr. X").withEmail("[email protected]").withIcon(R.drawable.profile4).withIdentifier(104);
final IProfile profile6 = new ProfileDrawerItem().withName("Batman").withEmail("[email protected]").withIcon(R.drawable.profile5).withIdentifier(105);
final IProfile profile6 = new ProfileDrawerItem().withName("Batman").withBackgroundImage(R.drawable.default_avatar).withEmail("[email protected]").withIcon(R.drawable.profile5).withIdentifier(105);

// Create the AccountHeader
headerResult = new AccountHeaderBuilder()
.withActivity(this)
.withTranslucentStatusBar(true)
.withHeaderBackground(R.drawable.header)
.withHeaderProfileImage(R.drawable.header)
.withOrgSubtitle("انتخاب سازمان")
.addProfiles(
profile,
profile2,
Expand Down Expand Up @@ -136,8 +137,8 @@ public boolean onProfileChanged(View view, IProfile profile, boolean current) {
new SecondaryDrawerItem().withName("CollapsableItem 2").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_8tracks).withIdentifier(2001)
),
new ExpandableDrawerItem().withName("Collapsable").withIcon(GoogleMaterial.Icon.gmd_collection_case_play).withIdentifier(19).withSelectable(false).withSubItems(
new SecondaryDrawerItem().withName("CollapsableItem").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_8tracks).withIdentifier(2002),
new SecondaryDrawerItem().withName("CollapsableItem 2").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_8tracks).withIdentifier(2003)
new SecondaryDrawerItem().withName("CollapsableItem").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_8tracks).withIdentifier(2002),
new SecondaryDrawerItem().withName("CollapsableItem 2").withLevel(2).withIcon(GoogleMaterial.Icon.gmd_8tracks).withIdentifier(2003)
),
new SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github).withIdentifier(20).withSelectable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(GoogleMaterial.Icon.gmd_format_color_fill).withIdentifier(21).withTag("Bullhorn"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes;
import android.support.annotation.LayoutRes;
import android.support.v4.view.ViewCompat;
Expand Down Expand Up @@ -81,6 +82,16 @@ public StringHolder getEmail() {
return null;
}

@Override
public AccountDividerDrawerItem withOrgSubtitle(String orgSubtitle) {
return null;
}

@Override
public StringHolder getOrgSubtitle() {
return null;
}

@Override
public AccountDividerDrawerItem withIcon(Drawable icon) {
return null;
Expand Down Expand Up @@ -111,11 +122,56 @@ public AccountDividerDrawerItem withIcon(IIcon icon) {
return null;
}

@Override
public AccountDividerDrawerItem withBackgroundImage(Drawable icon) {
return null;
}

@Override
public AccountDividerDrawerItem withBackgroundImage(Bitmap icon) {
return null;
}

@Override
public AccountDividerDrawerItem withBackgroundImage(@DrawableRes int icon) {
return null;
}

@Override
public AccountDividerDrawerItem withBackgroundImage(String icon) {
return null;
}

@Override
public AccountDividerDrawerItem withBackgroundImage(Uri icon) {
return null;
}

@Override
public ImageHolder getIcon() {
return null;
}

@Override
public ImageHolder getBackgroundImage() {
return null;
}

@Override
public int getBackgroundColor() {
return 0;
}

@Override
public AccountDividerDrawerItem withBackgroundColor(@ColorInt int color) {
return null;
}

@Override
public AccountDividerDrawerItem withBackgroundColor(String color) {
return null;
}

public static class ItemFactory implements ViewHolderFactory<ViewHolder> {
public ViewHolder create(View v) {
return new ViewHolder(v);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.novoda:bintray-release:0.3.4'
}
}
Expand Down
36 changes: 26 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
# Maven stuff
## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Sat Jan 14 21:39:04 IRST 2017
systemProp.http.proxyPort=1080
POM_LICENCE_URL=http\://www.apache.org/licenses/LICENSE-2.0.txt
VERSION_NAME=5.8.1
VERSION_CODE=581
POM_DEVELOPER_ID=mikepenz
POM_SCM_DEV_CONNECTION=scm\:[email protected]\:mikepenz/MaterialDrawer.git
POM_SCM_URL=https\://github.com/mikepenz/MaterialDrawer
GROUP=com.mikepenz
POM_DESCRIPTION=MaterialDrawer Library
POM_URL=https://github.com/mikepenz/MaterialDrawer
POM_SCM_URL=https://github.com/mikepenz/MaterialDrawer
POM_SCM_CONNECTION=scm:[email protected]:mikepenz/MaterialDrawer.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:mikepenz/MaterialDrawer.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=mikepenz
POM_DEVELOPER_NAME=Mike Penz
POM_DEVELOPER_NAME=Mike Penz
systemProp.http.proxyHost=127.0.0.1
POM_URL=https\://github.com/mikepenz/MaterialDrawer
POM_SCM_CONNECTION=scm\:[email protected]\:mikepenz/MaterialDrawer.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_DESCRIPTION=MaterialDrawer Library
Loading

0 comments on commit 478d0b7

Please sign in to comment.