小编Dav*_*vid的帖子

如何删除微调器中的分隔线?

如何删除微调器中的分隔线?

例如,如何删除/控制这些白色分隔线?

微调

PS这是行布局:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/black">

    <TextView
    android:id="@+id/catalog_spinner_item_textView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="11dp"
    android:text="@string/CatalogSpinnerItemRowDefaultText"
    android:textSize="18sp"
    android:gravity="center_vertical"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

android separator android-spinner

6
推荐指数
1
解决办法
5317
查看次数

像Chrome应用一样搜索editText动画

我正试图editText在屏幕中间进行搜索,

无论何时按下,都会将动画移动到searchView工具栏中.

正如你可以在chrome app(v46)的新标签中找到的那样.

没有找到任何Github的例子,所以任何想法如何实现?

在此输入图像描述

android android-animation searchview google-chrome-app android-toolbar

6
推荐指数
1
解决办法
1926
查看次数

Boot/ScreenOn广播接收器无法正常工作

我有一个空白的HelloWorld应用程序:

package tutorials.TestReceivers;

import android.app.Activity;
import android.os.Bundle;

public class TestReceiversActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
Run Code Online (Sandbox Code Playgroud)

使用此BootReceiver.Java:

package tutorials.TestReceivers;

import android.content.BroadcastReceiver;

public class BootReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent arg1) {
    Intent intent = new Intent(context, TestReceiversActivity.class);
        context.startActivity(intent);    
    }
}
Run Code Online (Sandbox Code Playgroud)

这个清单:

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".TestReceiversActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <receiver
            android-permission="android.permission.RECEIVE_BOOT_COMPLETED"
            android:name="development.TestReceiversActivity.BootReceiver" >
            <intent-filter …
Run Code Online (Sandbox Code Playgroud)

boot android broadcastreceiver

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

文件资源管理器没有显示任

我正在使用Eclipse Indigo,

我是我的设备上的根.

当我正在运行应用程序并在eclipse中查看File explorer时,我什么也看不见.(完全看不到文件夹)

窗户是空的.

我能做什么?

android root

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

手动暂停和恢复DownloadManager

我需要实现具有暂停和恢复机制的Download-Manager.

下载大型视频文件或任何其他类型需要此管理器.

我想过使用Android的DownloadManager,但据我所知,DownloadManager不支持用户手动暂停和恢复.

除了自己编写这个组件外,我还有哪些其他Android内置选项?或者也许有人知道如何使用DownloadManager手动暂停和恢复?

android download-manager

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

从上到下 - 翻译动画

需要制作下一个动画(在Android 2.2及以上版本):

1.从上到下移动按钮(点击后),

2.从下往上移动(再次点击他).

第一个动画工作正常,但第二个动画没有,btn从下到上"跳跃"而不是动画.

码:

public class MainActivity extends Activity {

static RelativeLayout relativeLayout;
static Button btn;
static Boolean isUp = true;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    btn = (Button) findViewById(R.id.button1);
    relativeLayout = (RelativeLayout) findViewById(R.id.relative_layout);

    btn.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            if(isUp){
                isUp = false;
                v.startAnimation(MainActivity.getVerticalSlideAnimation(0,relativeLayout.getBottom() - v.getHeight(),500,0));
            }else{
                isUp = true;
                v.startAnimation(MainActivity.getVerticalSlideAnimation(relativeLayout.getBottom() - v.getHeight(),0,500,0));
            }
        }
    });
}


public static Animation getVerticalSlideAnimation(int fromYPosition, final int toYPosition, int duration, int startOffset)
{
  TranslateAnimation translateAnimation = …
Run Code Online (Sandbox Code Playgroud)

animation android translate-animation

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

Google Analytics v3不会显示实时数据

在接下来的指示后我非常仔细地遵循

https://developers.google.com/analytics/devguides/collection/android/v3/

我在日志中看到一些事件,但仍然无法获得实时数据

(这是我可以确保分析工作的方式)

堆栈跟踪:

921    4319-4319/com.company.appname V/GAV3: Thread[main,5,main]: [EasyTracker] sample rate loaded: 100.0
09-09 08:26:57.931    4319-4319/com.company.appname V/GAV3: Thread[main,5,main]:     [EasyTracker] dispatch period loaded: 1800
09-09 08:26:57.931    4319-4319/com.company.appname V/GAV3: Thread[main,5,main]: Dispatch period set with null handler. Dispatch will run once initialization is complete.
09-09 08:26:57.931    4319-4319/com.company.appname V/GAV3: Thread[main,5,main]: [EasyTracker] session timeout loaded: 30000
09-09 08:26:57.931    4319-4319/com.company.appname V/GAV3: Thread[main,5,main]: [EasyTracker] auto activity tracking loaded: true
09-09 08:26:57.931    4319-4319/com.company.appname V/GAV3: Thread[main,5,main]:  ExceptionReporter created, original handler is   com.android.internal.os.RuntimeInit$UncaughtHandler
09-09 08:26:57.931    4319-4319/com.company.appname V/GAV3: Thread[main,5,main]: [EasyTracker] …
Run Code Online (Sandbox Code Playgroud)

android google-analytics real-time

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

获取设备网络网址调用

我正在尝试构建一个应用程序,为用户提供有关其网络使用情况的统计信息,

从3G/Wifi冲浪到应用网络使用.

我正在寻找的主要重要数据是网络呼叫的网址.

我有下一个代码,找到浏览器历史记录:

private void getBrowserHistory()
{
    String[] proj = new String[]{Browser.BookmarkColumns.TITLE, Browser.BookmarkColumns.URL};
    String sel = Browser.BookmarkColumns.BOOKMARK + " = 0"; // 0 = history, 1 = bookmark
    Cursor mCur = this.managedQuery(Browser.BOOKMARKS_URI, proj, sel, null, null);
    this.startManagingCursor(mCur);
    mCur.moveToFirst();

    if (mCur.moveToFirst() && mCur.getCount() > 0)
    {
        while (mCur.isAfterLast() == false)
        {
            String title = mCur.getString(mCur.getColumnIndex(Browser.BookmarkColumns.TITLE));
            String url = mCur.getString(mCur.getColumnIndex(Browser.BookmarkColumns.URL));
            Log.d(LOG_TAG, "Site title: " + title);
            Log.d(LOG_TAG, "Site url: " + url);
            mCur.moveToNext();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

但要找到应用程序网络使用情况,我需要更像WireShark的东西

我认为该问题的最终解决方案很复杂,但欢迎任何建议.

android network-protocols wireshark

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

相当于Google Play的rss.itunes生成器

我知道这不是一个纯编程问题,

所以我在android.stackexchange.com上问了它,但遗憾的是没有人看到它.

我想了解有关Google Play上应用的统计信息(不是我的应用)

我注意到Apple的这个API:

https://rss.itunes.apple.com/

此API提供有关Apple应用商店的统计信息

是否有Android Play的替代RSS/API?

rss android itunes google-play

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

将标准播放器中的内容播放或转换为VrVideoView

我有一个Android应用程序,使用播放实时/ vod内容QuickPlay.

此QuickPlay播放器/控制器配置为使用ExoPlayer.

我没有写这个应用程序,但要求添加Play in VR功能.

这可能是Cardboard,DayDreamGearVR无所谓.

我找到了Google的SimplyVrVideoActivity样本,

在此示例中,VrWidgetView可以获得两种类型的输入:

  • mVrVideoView.loadVideoFromAsset(LoaclAsset.mp4,options)
  • mVrVideoView.loadVideo(Uri,options)

如果我只是想"投射"已经播放的内容,这有VrVideoView什么想法呢?

android daydream google-cardboard exoplayer vrvideoview

5
推荐指数
0
解决办法
258
查看次数