タグ付けされた質問 「android」

AndroidはGoogleのモバイルオペレーティングシステムであり、デジタルデバイス(スマートフォン、タブレット、自動車、TV、Wear、Glass、IoT)のプログラミングまたは開発に使用されます。Androidに関連するトピックについては、android-intent、android-activity、android-adapterなどのAndroid固有のタグを使用します。開発やプログラミング以外の質問で、Androidフレームワークに関連する質問については、次のリンクを使用してください:https:// android.stackexchange.com。

9
match_parentの幅がRecyclerViewで機能しない
私のRecyclerViewと項目にはmatch_parent幅がありますが、結果は次のとおりです。 <view class="android.support.v7.widget.RecyclerView" android:layout_width="match_parent" とアイテム: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:fab="http://schemas.android.com/apk/res-auto" android:id="@+id/ll_itm" android:orientation="horizontal" android:layout_width="match_parent" フル: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:fab="http://schemas.android.com/apk/res-auto" android:id="@+id/ll_itm" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:weightSum="100" android:gravity="right" > <Button android:layout_width="0dp" android:layout_weight="15" android:layout_height="fill_parent" android:text="ملاحظات" android:id="@+id/button" /> <LinearLayout android:layout_width="0dp" android:layout_height="fill_parent" android:layout_weight="20" android:gravity="center" > <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <com.getbase.floatingactionbutton.FloatingActionButton android:layout_width="fill_parent" android:layout_height="fill_parent" fab:fab_plusIconColor="#ff56ff83" fab:fab_colorNormal="@color/d_red" …

18
AndroidのImageViewにgif画像を追加する
imageViewにアニメーションgif画像を追加しました。gif画像で見ることができません。アニメーションはありません。静止画のように見えます。GIF画像で表示する方法を教えてください。
135 android  imageview  gif 


2
ConnectionTimeoutとSocketTimeout
使用しているライブラリに問題があります。ライブラリか、それとも私が間違って使用しているのかもしれません。 基本的に、これを行うと(ミリ秒単位のタイムアウト) _ignitedHttp.setConnectionTimeout(1); // v short _ignitedHttp.setSocketTimeout(60000); // 60 seconds タイムアウト例外は生成されず、正常に動作しますが、以下を実行すると、 _ignitedHttp.setConnectionTimeout(60000); // 60 seconds _ignitedHttp.setSocketTimeout(1); // v short ソケット例外が発生します。 だから、私の質問は、なぜ接続例外をシミュレートできないのですか?ソケットと接続タイムアウトの違いを誤解していますか?ライブラリはここにあります(まだ正式にリリースされていません)。

9
AndroidRuntime:致命的な例外:androidmapsapi-ZoomTableManager
Google Maps SDK(v2)を使用する私のアプリが次の例外でクラッシュし始めました: Process: com.currentlocation.android, PID: 7328 java.lang.ArrayIndexOutOfBoundsException: length=1; index=12 at com.google.maps.api.android.lib6.gmm6.vector.ct.<init>(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):9) at com.google.maps.api.android.lib6.gmm6.vector.cv.a(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):23) at com.google.maps.api.android.lib6.gmm6.util.m.run(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):14) at java.lang.Thread.run(Thread.java:919) v3ベータSDKでは、スタックトレースは次のとおりです。 2020-04-23 15:59:06.064 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example, PID: 22717 java.lang.ArrayIndexOutOfBoundsException: length=1; index=12 at com.google.android.libraries.maps.bv.zzbs.<init>(ZoomTable.java:24) at com.google.android.libraries.maps.bv.zzbv.zza(ZoomTableQuadTree.java:57) at com.google.android.libraries.maps.br.zzd.zza(Unknown Source:4) at com.google.android.libraries.maps.hi.zzas.zza(Suppliers.java:7) at com.google.android.libraries.maps.br.zza.zzh(SharedMapComponentImpl.java:58) at com.google.android.libraries.maps.gu.zzat.zza(RendererFactoryImpl.java:88) at com.google.android.libraries.maps.it.zzav.zza(GoogleMapImpl.java:59) …

11
Android「ウィンドウを追加できません—トークンnullはアプリケーション用ではありません」例外
ダイアログを開こうとすると、次のAndroid例外が発生します。誰かが私に何が起こっているのかを理解するのを手伝ってくれませんか?どうすればこの問題を修正できますか? android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application at android.view.ViewRoot.setView(ViewRoot.java:509) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) at android.app.Dialog.show(Dialog.java:241)

18
より小さなRatingBarを作るには?
レイアウトにRatingBarを追加しました。 <RatingBar android:id="@+id/ratingbar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:numStars="5" android:stepSize="1.0" /> しかし、評価バーのデフォルトのスタイルは大きすぎます。 私はandroidスタイルを追加してそれを変更しようとしました:style="?android:attr/ratingBarStyleSmall" しかし、結果は小さすぎ、このプロパティでレートを設定することは不可能です。 どうすればよいですか?

13
画面から設定を削除/非表示にします
PreferenceActivityを拡張するアクティビティがあります。XMLファイルから設定をロードしています。しかし、場合によっては、アプリの状態に基づいて、設定の1つを画面から完全に非表示にする必要があります。setEnabledメソッドがありますが、それは私が望んでいるものではありません。画面からその設定を完全に削除したいと思います。出来ますか ?


11
Android OnClickListener-ボタンを識別する
私は活動しています: public class Mtest extends Activity { Button b1; Button b2; public void onCreate(Bundle savedInstanceState) { ... b1 = (Button) findViewById(R.id.b1); b2 = (Button) findViewById(R.id.b2); b1.setOnClickListener(myhandler); b2.setOnClickListener(myhandler); ... } View.OnClickListener myhandler = new View.OnClickListener() { public void onClick(View v) { // MY QUESTION STARTS HERE!!! // IF b1 do this …

8
マテリアルデザインガイドラインのように見えるSearchViewを作成する
現在、アプリをマテリアルデザインに変換する方法を学習中ですが、今は少し行き詰まっています。ツールバーを追加し、ナビゲーションドロワーにすべてのコンテンツをオーバーレイしました。私は現在、材料ガイドラインのような拡張可能な検索を作成しようとしています: これは私が今持っているものであり、上記のようにする方法を理解できません: これは私のメニューのxmlです。 <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/action_search" android:icon="@android:drawable/ic_menu_search" android:title="Search" app:showAsAction="always" app:actionViewClass="android.support.v7.widget.SearchView" /> </menu> これで機能し、SearchViewに展開するメニュー項目が表示され、リストを細かくフィルター処理できます。1枚目の写真のようには見えませんが。ホームアイコンを戻る矢印に変更できるように を使用しようとしMenuItemCompat.setOnActionExpandListener()ましたがR.id.action_search、うまくいきません。リスナーでは何も発生しません。それがうまくいったとしても、それでも最初の画像にあまり近づきません。 マテリアルガイドラインのように見える新しいappcompatツールバーでSearchViewを作成するにはどうすればよいですか?


6
通知は古いインテントエクストラを渡します
次のコードを使用してBroadcastReceiver内に通知を作成しています。 String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns); int icon = R.drawable.ic_stat_notification; CharSequence tickerText = "New Notification"; long when = System.currentTimeMillis(); Notification notification = new Notification(icon, tickerText, when); notification.defaults |= Notification.DEFAULT_VIBRATE; long[] vibrate = {0,100,200,200,200,200}; notification.vibrate = vibrate; notification.flags |= Notification.FLAG_AUTO_CANCEL; CharSequence contentTitle = "Title"; CharSequence contentText = …

30
Android emulator-5554オフライン
emulator-5554で問題が発生し、オフラインであると繰り返し表示されます。 adb devicesコマンドラインからaを実行すると、 emulator-5554 offline 新たに再起動した後でも、そのコマンドを試してもオフラインであると表示されます。 問題はabd install <path>、コマンドプロンプトから.apkファイルをエミュレータにインストールしようとすると、オフラインであることを示しています。別のデバイスを作成して実行すると、.apkファイルをインストールしようとすると、接続されているデバイスが多すぎます。つまり、.apkファイルをインストールできません。 一体どうやってそのエミュレーター-5554を取り除くことができますか?再起動するとすべてのデバイスがクリアされるはずですが、動作していないようです。コンピュータの起動時に初期化されているようです。誰かがこの問題に遭遇しましたか? ありがとう

7
Huawei電話の「保護されたアプリ」設定とその処理方法
アプリのテストに使用しているHuawei P8とAndroid 5.0を使用しています。アプリはBLEリージョンを追跡するため、バックグラウンドで実行する必要があります。 Huaweiに、保護されたアプリと呼ばれる「機能」が組み込まれていることを発見しました。この機能は、電話の設定([バッテリーマネージャー]> [保護されたアプリ])からアクセスできます。これにより、画面がオフになった後でも、選出されたアプリを実行し続けることができます。 Huaweiにとっては賢明ですが、残念ながら私にとってはオプトインのように見えます。つまり、アプリはデフォルトでアウトになっているため、手動でそれらを配置する必要があります。これは私がFAQでユーザーにアドバイスしたり印刷したりできるので、ショートッパーではありません修正に関するドキュメントですが、最近(研究目的で)Tinderをインストールしましたが、Tinderが自動的に保護リストに入れられていることに気付きました。 私のアプリでこれを行う方法を誰かが知っていますか?マニフェストの設定ですか?それは人気のあるアプリであるため、HuaweiがTinderに対して有効にしたものですか?

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.