Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Takeya-Yuki
RubyLib
提交
98ea27a9
R
RubyLib
项目概览
Takeya-Yuki
/
RubyLib
8 个月 前同步成功
通知
39
Star
19
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
RubyLib
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
98ea27a9
编写于
6月 29, 2017
作者:
T
Takeya Yuki
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Test APP
上级
a5b8bb8c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
51 addition
and
0 deletion
+51
-0
.idea/vcs.xml
.idea/vcs.xml
+6
-0
app/src/main/java/jp/ruby/rubylibrary/MainActivity.java
app/src/main/java/jp/ruby/rubylibrary/MainActivity.java
+29
-0
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/activity_main.xml
+16
-0
未找到文件。
.idea/vcs.xml
0 → 100644
浏览文件 @
98ea27a9
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
app/src/main/java/jp/ruby/rubylibrary/MainActivity.java
0 → 100644
浏览文件 @
98ea27a9
package
jp.ruby.rubylibrary
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.widget.TextView
;
import
java.nio.charset.Charset
;
import
yuki.resource.extended.StorageIOManager
;
public
class
MainActivity
extends
Activity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_main
);
TextView
tv
=(
TextView
)
findViewById
(
R
.
id
.
tv
);
String
s
=
null
;
try
{
StorageIOManager
.
WriteStringToFileSystem
(
getApplicationContext
(),
"/storage/emulated/0/1.txt"
,
"TEST IO"
);
s
=
StorageIOManager
.
ReadStringFromFileSystem
(
getApplicationContext
(),
"/system/bin/sh"
,
true
);
tv
.
setText
(
s
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
tv
.
setText
(
e
.
getLocalizedMessage
());
}
}
}
app/src/main/res/layout/activity_main.xml
0 → 100644
浏览文件 @
98ea27a9
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"jp.ruby.rubylibrary.MainActivity"
>
<TextView
android:id=
"@+id/tv"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"TextView"
tools:layout_editor_absoluteX=
"3dp"
tools:layout_editor_absoluteY=
"2dp"
/>
</android.support.constraint.ConstraintLayout>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录