Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
000ef08f
Commit
000ef08f
authored
Feb 13, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into fix/un-realm-app-the-app
parents
ab2f8348
93f0a445
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
19 additions
and
214 deletions
+19
-214
build.gradle
app/build.gradle
+0
-7
fragment_login.xml
app/src/main/res/layout/fragment_login.xml
+4
-4
fragment_sidebar_main.xml
app/src/main/res/layout/fragment_sidebar_main.xml
+3
-3
room_side_menu.xml
app/src/main/res/layout/room_side_menu.xml
+3
-3
sidebar.xml
app/src/main/res/layout/sidebar.xml
+1
-1
build.gradle
build.gradle
+5
-0
build.gradle
rocket-chat-android-widgets/build.gradle
+2
-0
fontawesome-webfont.ttf
...t-android-widgets/src/main/assets/fontawesome-webfont.ttf
+0
-0
fontello.ttf
rocket-chat-android-widgets/src/main/assets/fontello.ttf
+0
-0
AbstractCustomFontButton.java
.../chat/rocket/android/widget/AbstractCustomFontButton.java
+0
-40
AbstractCustomFontTextView.java
...hat/rocket/android/widget/AbstractCustomFontTextView.java
+0
-36
FontAwesomeButton.java
...in/java/chat/rocket/android/widget/FontAwesomeButton.java
+0
-26
FontAwesomeTextView.java
.../java/chat/rocket/android/widget/FontAwesomeTextView.java
+0
-26
FontelloTextView.java
...ain/java/chat/rocket/android/widget/FontelloTextView.java
+0
-26
TypefaceHelper.java
.../main/java/chat/rocket/android/widget/TypefaceHelper.java
+0
-35
room_list_item.xml
...at-android-widgets/src/main/res/layout/room_list_item.xml
+1
-1
fa_strings.xml
...t-chat-android-widgets/src/main/res/values/fa_strings.xml
+0
-6
No files found.
app/build.gradle
View file @
000ef08f
...
...
@@ -81,13 +81,6 @@ play {
track
=
"${track}"
}
repositories
{
mavenCentral
()
maven
{
url
'https://github.com/lijingle1/stetho-realm/raw/master/maven-repo'
}
maven
{
url
'http://dl.bintray.com/amulyakhare/maven'
}
maven
{
url
"https://clojars.org/repo/"
}
//for icepick.
}
dependencies
{
compile
project
(
':log-wrapper'
)
compile
project
(
':android-ddp'
)
...
...
app/src/main/res/layout/fragment_login.xml
View file @
000ef08f
...
...
@@ -19,7 +19,7 @@
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_twitter"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
...
...
@@ -28,7 +28,7 @@
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_facebook"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
...
...
@@ -37,7 +37,7 @@
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_github"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
...
...
@@ -46,7 +46,7 @@
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_google"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
...
...
app/src/main/res/layout/fragment_sidebar_main.xml
View file @
000ef08f
...
...
@@ -103,7 +103,7 @@
android:textAppearance=
"@style/TextAppearance.AppCompat.Body2"
android:textStyle=
"bold"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:id=
"@+id/btn_add_channel"
style=
"@style/Widget.AppCompat.Button.Borderless"
android:layout_width=
"48dp"
...
...
@@ -136,7 +136,7 @@
android:textAppearance=
"@style/TextAppearance.AppCompat.Body2"
android:textStyle=
"bold"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:id=
"@+id/btn_add_direct_message"
style=
"@style/Widget.AppCompat.Button.Borderless"
android:layout_width=
"48dp"
...
...
@@ -223,7 +223,7 @@
android:layout_width=
"48dp"
android:layout_height=
"match_parent"
>
<
chat.rocket
.android.widget.FontAwesomeTextView
<
io.github.yusukeiwaki
.android.widget.FontAwesomeTextView
android:layout_width=
"16dp"
android:layout_height=
"16dp"
android:layout_gravity=
"center"
...
...
app/src/main/res/layout/room_side_menu.xml
View file @
000ef08f
...
...
@@ -6,21 +6,21 @@
android:layout_gravity=
"end"
android:orientation=
"vertical"
>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:enabled=
"false"
android:text=
"@string/fa_search"
android:textSize=
"24dp"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:id=
"@+id/btn_users"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:text=
"@string/fa_users"
android:textSize=
"24dp"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:enabled=
"false"
...
...
app/src/main/res/layout/sidebar.xml
View file @
000ef08f
...
...
@@ -24,7 +24,7 @@
android:layout_margin=
"@dimen/margin_8"
android:src=
"@mipmap/ic_launcher"
/>
<
chat.rocket
.android.widget.FontAwesomeButton
<
io.github.yusukeiwaki
.android.widget.FontAwesomeButton
style=
"@style/Base.Widget.AppCompat.Button.Borderless"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
...
...
build.gradle
View file @
000ef08f
...
...
@@ -4,6 +4,11 @@ apply from: rootProject.file('dependencies.gradle')
allprojects
{
repositories
{
jcenter
()
mavenCentral
()
maven
{
url
'https://github.com/lijingle1/stetho-realm/raw/master/maven-repo'
}
maven
{
url
'http://dl.bintray.com/amulyakhare/maven'
}
//for TextDrawable.
maven
{
url
"https://clojars.org/repo/"
}
//for icepick.
maven
{
url
'https://jitpack.io'
}
//for widget-fontawesome.
}
}
...
...
rocket-chat-android-widgets/build.gradle
View file @
000ef08f
...
...
@@ -44,6 +44,8 @@ dependencies {
compile
rootProject
.
ext
.
okhttp3
compile
rootProject
.
ext
.
boltsTask
compile
'com.github.yusukeiwaki.android-widget:widget-fontawesome:0.0.1'
compile
rootProject
.
ext
.
frescoBase
compile
rootProject
.
ext
.
frescoAnimatedGif
compile
rootProject
.
ext
.
frescoAnimatedWebp
...
...
rocket-chat-android-widgets/src/main/assets/fontawesome-webfont.ttf
deleted
100644 → 0
View file @
ab2f8348
File deleted
rocket-chat-android-widgets/src/main/assets/fontello.ttf
deleted
100644 → 0
View file @
ab2f8348
File deleted
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/AbstractCustomFontButton.java
deleted
100644 → 0
View file @
ab2f8348
package
chat
.
rocket
.
android
.
widget
;
import
android.content.Context
;
import
android.graphics.Typeface
;
import
android.support.v7.widget.AppCompatButton
;
import
android.util.AttributeSet
;
import
android.view.Gravity
;
abstract
class
AbstractCustomFontButton
extends
AppCompatButton
{
public
AbstractCustomFontButton
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
init
();
}
public
AbstractCustomFontButton
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
init
();
}
public
AbstractCustomFontButton
(
Context
context
)
{
super
(
context
);
init
();
}
protected
abstract
String
getFont
();
private
void
init
()
{
String
font
=
getFont
();
if
(
font
!=
null
)
{
Typeface
typeface
=
TypefaceHelper
.
getTypeface
(
getContext
(),
font
);
if
(
typeface
!=
null
)
{
setTypeface
(
typeface
);
}
}
setMinWidth
(
0
);
setMinHeight
(
0
);
setGravity
(
Gravity
.
CENTER
);
}
}
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/AbstractCustomFontTextView.java
deleted
100644 → 0
View file @
ab2f8348
package
chat
.
rocket
.
android
.
widget
;
import
android.content.Context
;
import
android.graphics.Typeface
;
import
android.support.v7.widget.AppCompatTextView
;
import
android.util.AttributeSet
;
abstract
class
AbstractCustomFontTextView
extends
AppCompatTextView
{
public
AbstractCustomFontTextView
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
init
();
}
public
AbstractCustomFontTextView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
init
();
}
public
AbstractCustomFontTextView
(
Context
context
)
{
super
(
context
);
init
();
}
protected
abstract
String
getFont
();
private
void
init
()
{
String
font
=
getFont
();
if
(
font
!=
null
)
{
Typeface
typeface
=
TypefaceHelper
.
getTypeface
(
getContext
(),
font
);
if
(
typeface
!=
null
)
{
setTypeface
(
typeface
);
}
}
}
}
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/FontAwesomeButton.java
deleted
100644 → 0
View file @
ab2f8348
package
chat
.
rocket
.
android
.
widget
;
import
android.content.Context
;
import
android.util.AttributeSet
;
/**
* Button with font-awesome text.
*/
public
class
FontAwesomeButton
extends
AbstractCustomFontButton
{
public
FontAwesomeButton
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
}
public
FontAwesomeButton
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
public
FontAwesomeButton
(
Context
context
)
{
super
(
context
);
}
@Override
protected
String
getFont
()
{
return
"fontawesome-webfont.ttf"
;
}
}
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/FontAwesomeTextView.java
deleted
100644 → 0
View file @
ab2f8348
package
chat
.
rocket
.
android
.
widget
;
import
android.content.Context
;
import
android.util.AttributeSet
;
/**
* TextView with font-awesome.
*/
public
class
FontAwesomeTextView
extends
AbstractCustomFontTextView
{
public
FontAwesomeTextView
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
}
public
FontAwesomeTextView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
public
FontAwesomeTextView
(
Context
context
)
{
super
(
context
);
}
@Override
protected
String
getFont
()
{
return
"fontawesome-webfont.ttf"
;
}
}
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/FontelloTextView.java
deleted
100644 → 0
View file @
ab2f8348
package
chat
.
rocket
.
android
.
widget
;
import
android.content.Context
;
import
android.util.AttributeSet
;
/**
* TextView with fontello.
*/
public
class
FontelloTextView
extends
AbstractCustomFontTextView
{
public
FontelloTextView
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
}
public
FontelloTextView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
public
FontelloTextView
(
Context
context
)
{
super
(
context
);
}
@Override
protected
String
getFont
()
{
return
"fontello.ttf"
;
}
}
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/TypefaceHelper.java
deleted
100644 → 0
View file @
ab2f8348
package
chat
.
rocket
.
android
.
widget
;
import
android.content.Context
;
import
android.graphics.Typeface
;
import
android.util.Log
;
import
java.util.Hashtable
;
/**
* Helper for reading typeface. ref:https://code.google.com/p/android/issues/detail?id=9904#c7
*/
class
TypefaceHelper
{
private
static
final
String
TAG
=
TypefaceHelper
.
class
.
getName
();
private
static
final
Hashtable
<
String
,
Typeface
>
CACHE
=
new
Hashtable
<
String
,
Typeface
>();
/**
* read font in assets directory.
*/
public
static
Typeface
getTypeface
(
Context
context
,
String
assetPath
)
{
synchronized
(
CACHE
)
{
if
(!
CACHE
.
containsKey
(
assetPath
))
{
try
{
Typeface
typeface
=
Typeface
.
createFromAsset
(
context
.
getAssets
(),
assetPath
);
CACHE
.
put
(
assetPath
,
typeface
);
}
catch
(
Exception
exception
)
{
Log
.
e
(
TAG
,
"Could not get typeface '"
+
assetPath
+
"' because "
+
exception
.
getMessage
());
return
null
;
}
}
return
CACHE
.
get
(
assetPath
);
}
}
}
rocket-chat-android-widgets/src/main/res/layout/room_list_item.xml
View file @
000ef08f
...
...
@@ -9,7 +9,7 @@
android:layout_marginEnd=
"16dp"
android:layout_marginRight=
"16dp"
>
<
chat.rocket
.android.widget.FontAwesomeTextView
<
io.github.yusukeiwaki
.android.widget.FontAwesomeTextView
android:id=
"@+id/icon"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
rocket-chat-android-widgets/src/main/res/values/fa_strings.xml
deleted
100644 → 0
View file @
ab2f8348
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string
translatable=
"false"
name=
"fa_hashtag"
>

</string>
<!-- for public rooms -->
<string
translatable=
"false"
name=
"fa_lock"
>

</string>
<!-- for private rooms -->
<string
translatable=
"false"
name=
"fa_at"
>

</string>
<!-- for direct message -->
</resources>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment