Skip to content

Commit

Permalink
Add initEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Aghazadeh committed Oct 5, 2018
1 parent 420cae9 commit eb90bec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ dependencies {
implementation "android.arch.lifecycle:extensions:1.1.1"
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"

//implementation 'com.github.ahmadaghazadeh:CodeEditor:1.0.3'
implementation 'com.github.ahmadaghazadeh:CodeEditor:1.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation project(':library')
//implementation project(':library')
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ private void init(Context context, AttributeSet attrs) {

}

public void initEditor(String code,String lang){
setText(code, 1);
setLanguage(LanguageProvider.getLanguage(lang));
}

public void refreshEditor() {
if (editor != null) {
editor.setTextSize(setting.getFontSize());
Expand Down

0 comments on commit eb90bec

Please sign in to comment.