小编ano*_*ous的帖子

如何使用appcompat设置视图样式

当主题从Theme.AppCompat.Light.DarkActionBar扩展时,如何在整个应用程序中设置textview,edittexts的样式?

这不起作用,

<style name="myTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="android:textViewStyle">@style/myTextViewStyle</item>
        <item name="textViewStyle">@style/myTextViewStyle</item>
</style>

<style name="myTextViewStyle" parent="android:Widget.TextView">
    <item name="android:layout_marginLeft">5dp</item>
    <item name="android:layout_marginRight">5dp</item>
    <item name="android:layout_marginTop">5dp</item>
    <item name="android:layout_marginBottom">5dp</item>
    <item name="android:textColor">@android:color/black</item>
</style>
Run Code Online (Sandbox Code Playgroud)

android android-appcompat

5
推荐指数
1
解决办法
1412
查看次数

如何在谷歌硬盘上创建空文件夹?

我正在尝试为我的Android应用程序创建空文件夹..

File body = new File();

body.setTitle("title");

java.io.File fileContent = new java.io.File("title");

FileContent mediaContent = new FileContent("application/vnd.google-apps.folder", fileContent);

File file = service.files().insert(body, mediaContent).execute();
Run Code Online (Sandbox Code Playgroud)

这似乎不起作用.....

获得例外:

java.io.FileNotFoundException:/ title打开失败ENOENT(没有这样的文件或目录)

引起:libcore.io.ErrnoException:打开失败:ENOENT(没有这样的文件或目录)

android google-drive-api

4
推荐指数
1
解决办法
4378
查看次数