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

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

17
水平線形レイアウトAndroidでウィジェットを右揃えする方法は?
これは私が使用しているコードであり、機能していません: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <TextView android:text="TextView" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right"> </TextView> </LinearLayout>
206 android  alignment 


10
コンソールからのAndroidアプリの停止
コンソールからAndroidアプリを停止することはできますか?何かのようなもの: adb stop com.my.app.package テストプロセスが大幅にスピードアップします。現在、毎回アプリをアンインストール/インストールして、手動テストケースがクリーンな状態で開始することを確認しています。
205 android  testing  adb 

6
Android-パッケージ名の規則
android.comの「Hello World」の例の場合、パッケージ名は "package com.example.helloandroid;" このパッケージに名前を付けるためのガイドライン/標準はありますか?(参照がいいでしょう)
205 android  naming 

6
ConstraintLayoutで要素を中央に配置する方法
私が使用していConstraintLayoutたアプリケーションのレイアウトを作るために自分のアプリケーションに。画面を作成wheren一つに私がしようとしていますEditTextし、Button中央にあるべきであり、Button以下のでなければなりませんEditTextmarginTopだけ16dpで。 これが私のレイアウトとスクリーンショットです。 activity_authenticate_content.xml <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" android:paddingLeft="16dp" android:paddingRight="16dp" tools:context="com.icici.iciciappathon.login.AuthenticationActivity"> <android.support.design.widget.TextInputLayout android:id="@+id/client_id_input_layout" android:layout_width="0dp" android:layout_height="wrap_content" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent"> <android.support.design.widget.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/login_client_id" android:inputType="textEmailAddress" /> </android.support.design.widget.TextInputLayout> <android.support.v7.widget.AppCompatButton android:id="@+id/authenticate" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:text="@string/login_auth" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="@id/client_id_input_layout" app:layout_constraintRight_toRightOf="@id/client_id_input_layout" app:layout_constraintTop_toTopOf="@id/client_id_input_layout" /> </android.support.constraint.ConstraintLayout>

5
DecimalFormatの小数点記号をコンマからドット/ポイントに変更する方法は?
BigDecimal値を見やすく読みやすい文字列に変換する、この少しクレイジーなメソッドがあります。 private String formatBigDecimal(BigDecimal bd){ DecimalFormat df = new DecimalFormat(); df.setMinimumFractionDigits(3); df.setMaximumFractionDigits(3); df.setMinimumIntegerDigits(1); df.setMaximumIntegerDigits(3); df.setGroupingSize(20); return df.format(bd); } ただし、これは、","すべての値を次のように出力する、いわゆるグループ化区切り文字も生成します。 xxx,xxx 区切り文字は、カンマではなくドットまたはポイントにする必要があります。誰かがこの小さな偉業を達成する方法の手がかりを持っていますか? 私はこれを読み、特にこれを今は死ぬまで読んだことがありますが、これを成し遂げる方法を見つけることができません。私はこれに間違った方法でアプローチしていますか?これを行うよりエレガントな方法はありますか?おそらく、カンマはヨーロッパの基準で完璧であるため、さまざまな市内番号表現を考慮したソリューションでさえあるかもしれません。

6
Androidで一時ファイルを作成する
Androidで一時ファイルを作成する最良の方法は何ですか? File.createTempFileは使用できますか?ドキュメントは非常にあいまいです。 特に、で作成された一時ファイルがいつFile.createTempFile削除されるかは明らかではありません。


13
画像のズーム機能を取得するにはどうすればよいですか?
大きな画像を表示し、ユーザーが画像を拡大および縮小してパンできるようにする一般的な方法はありますか? 今まで、私は2つの方法を見つけました: ImageViewを上書きします。これは、このような一般的な問題には少し多すぎるようです。 WebViewを使用しますが、全体的なレイアウトなどの制御が不十分です。
204 android  zoom  imageview 

22
リムーバブルSDカードの場所を見つける
外付けSDカードの場所を見つける一般的な方法はありますか? 外部ストレージと混同しないでください。 Environment.getExternalStorageState()「/ mnt / sdcard」のような内部SDマウントポイントへのパスを返します。しかし、問題は外部SDについてです。「/ mnt / sdcard / external_sd」のようなパスを取得するにはどうすればよいですか(デバイスによって異なる場合があります)? mountファイルシステム名によるコマンドの出力のフィルタリングで終わると思います。しかし、この方法が十分に堅牢であるかどうかはわかりません。

10
アクションバーのナビゲーションモードはAndroid Lで廃止されました
Androidの「L」プレビュー用のAPIの差分レポートを見てみると、私が見ることでナビゲーションモードに関連するすべてのメソッドActionBarクラス(のようなsetNavigationMode()、addTab()、selectTab()、&​​C)。廃止されました。 ドキュメントは説明します: アクションバーのナビゲーションモードは非推奨であり、インラインツールバーのアクションバーではサポートされていません。代わりに、他の一般的なナビゲーションパターンの使用を検討してください。 想定される代替品は何ですか? また、「インラインツールバーアクションバー」は新しい概念ですか?今まで聞いたことがないと思います。


20
EditTextで線の色を変更する方法
レイアウトxmlファイルにEditTextを作成しています しかし、EditTextのカラーラインをHoloから(たとえば)赤に変更したいと思います。それはどのように行うことができますか?
203 android  xml  layout  styles 



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