Skip to content

Commit a7e78d9

Browse files
committed
About/My blog/Leanote Explore
1 parent 805fa0d commit a7e78d9

8 files changed

Lines changed: 86 additions & 5 deletions

File tree

app/src/main/java/org/houxg/leamonax/ui/AboutActivity.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,17 @@ public void processModel(Note note) {
8080

8181
@OnClick(R.id.ll_github)
8282
void clickedGithub() {
83-
OpenUtils.openUrl(this, "https://github.com/houxg/Leamonax");
83+
OpenUtils.openUrl(this, "https://github.com/leanote/leanote-android");
8484
}
8585

8686
@OnClick(R.id.ll_feedback)
8787
void clickedFeedback() {
88-
OpenUtils.openUrl(this, "https://github.com/houxg/Leamonax/issues");
88+
OpenUtils.openUrl(this, "https://github.com/leanote/leanote-android/issues");
89+
}
90+
91+
@OnClick(R.id.thanks)
92+
void clickedThanks() {
93+
OpenUtils.openUrl(this, "https://github.com/leanote/leanote-android/graphs/contributors");
8994
}
9095

9196
}

app/src/main/java/org/houxg/leamonax/ui/Navigation.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import org.houxg.leamonax.service.AccountService;
4343
import org.houxg.leamonax.service.NotebookService;
4444
import org.houxg.leamonax.utils.DisplayUtils;
45+
import org.houxg.leamonax.utils.OpenUtils;
4546
import org.houxg.leamonax.widget.AlphabetDrawable;
4647
import org.houxg.leamonax.widget.TriangleView;
4748

@@ -506,4 +507,21 @@ public String toString() {
506507
'}';
507508
}
508509
}
510+
511+
@OnClick(R.id.rl_blog)
512+
void clickedMyBlog() {
513+
Account current = AccountService.getCurrent();
514+
String host = current.getHost();
515+
if (host == null || host.equals("")) {
516+
host = "https://leanote.com";
517+
}
518+
519+
host = host.replace("https://", "http://");
520+
OpenUtils.openUrl(mActivity, host + "/blog/" + current.getUserId());
521+
}
522+
523+
@OnClick(R.id.rl_explore)
524+
void clickedExplore() {
525+
OpenUtils.openUrl(mActivity, "http://lea.leanote.com");
526+
}
509527
}
1.58 KB
Loading
3.67 KB
Loading

app/src/main/res/layout/activity_about.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<include layout="@layout/divider" />
8181

8282
<LinearLayout
83+
android:id="@+id/thanks"
8384
style="@style/SettingsPanel"
8485
android:orientation="vertical">
8586

@@ -93,7 +94,7 @@
9394
style="@style/SettingsStatus"
9495
android:layout_width="wrap_content"
9596
android:layout_height="wrap_content"
96-
android:text="@string/leanote" />
97+
android:text="https://github.com/houxg/Leamonax" />
9798

9899
<TextView
99100
style="@style/SettingsStatus"

app/src/main/res/layout/navigation.xml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,60 @@
191191

192192
<include layout="@layout/divider" />
193193

194+
195+
196+
<RelativeLayout
197+
android:id="@+id/rl_blog"
198+
android:layout_width="match_parent"
199+
android:layout_height="wrap_content"
200+
android:background="?android:attr/selectableItemBackground"
201+
android:padding="16dp">
202+
203+
<ImageView
204+
android:layout_width="wrap_content"
205+
android:layout_height="wrap_content"
206+
android:layout_alignParentStart="true"
207+
android:layout_centerVertical="true"
208+
android:src="@drawable/ic_blog" />
209+
210+
<TextView
211+
android:layout_width="wrap_content"
212+
android:layout_height="wrap_content"
213+
android:layout_alignParentStart="true"
214+
android:layout_centerVertical="true"
215+
android:layout_marginStart="48dp"
216+
android:fontFamily="sans-serif-medium"
217+
android:text="@string/my_blog"
218+
android:textColor="@color/primary_text_light"
219+
android:textSize="14sp" />
220+
</RelativeLayout>
221+
222+
<RelativeLayout
223+
android:id="@+id/rl_explore"
224+
android:layout_width="match_parent"
225+
android:layout_height="wrap_content"
226+
android:background="?android:attr/selectableItemBackground"
227+
android:padding="16dp">
228+
229+
<ImageView
230+
android:layout_width="wrap_content"
231+
android:layout_height="wrap_content"
232+
android:layout_alignParentStart="true"
233+
android:layout_centerVertical="true"
234+
android:src="@drawable/ic_leanote" />
235+
236+
<TextView
237+
android:layout_width="wrap_content"
238+
android:layout_height="wrap_content"
239+
android:layout_alignParentStart="true"
240+
android:layout_centerVertical="true"
241+
android:layout_marginStart="48dp"
242+
android:fontFamily="sans-serif-medium"
243+
android:text="@string/explore"
244+
android:textColor="@color/primary_text_light"
245+
android:textSize="14sp" />
246+
</RelativeLayout>
247+
194248
<RelativeLayout
195249
android:id="@+id/rl_settings"
196250
android:layout_width="match_parent"
@@ -217,7 +271,7 @@
217271
android:textColor="@color/primary_text_light"
218272
android:textSize="14sp" />
219273
</RelativeLayout>
220-
274+
221275
<RelativeLayout
222276
android:id="@+id/rl_about"
223277
android:layout_width="match_parent"

app/src/main/res/values-zh/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,6 @@
106106
<string name="leanote">蚂蚁笔记</string>
107107
<string name="conflict_occurs">糟糕,笔记冲突</string>
108108
<string name="host_example">登录接口地址将会是:\n%s/api/login</string>
109+
<string name="my_blog">我的博客</string>
110+
<string name="explore">蚂蚁笔记探索</string>
109111
</resources>

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,6 @@
108108
<string name="generate_random_note">Generate random note</string>
109109
<string name="conflict_occurs">Oops! Conflicts occurs</string>
110110
<string name="host_example">For example, login api will be:\n%s/api/login</string>
111-
111+
<string name="my_blog">My Blog</string>
112+
<string name="explore">Leanote Explore</string>
112113
</resources>

0 commit comments

Comments
 (0)